How to extend partition in Ubuntu from terminal without gparted and livecd
My vm disk was full. Kind VM adminstrator extended disk. How can you extend partition.In Windows 2012 it is easy on the fly operation. In Ubuntu server they (google advisers) offer to boot LiveCD and run GParted. What if boot from CD is not an option? I have only ssh access. Well
(parted) print list
Shows volume already is extended but you have to create and format partition and then mount it somewhere.
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 129GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 129GB 129GB extended
5 257MB 21.0GB 20.7GB logical lvm
- Extend logical partition
$ mkpart logical ext3 21.1GB 129GBCheck that new partition appears in list
Type parted and then type print all
(parted) print all
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 129GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 129GB 129GB extended
5 257MB 21.0GB 20.7GB logical lvm
6 21.0GB 129GB 108GB logical
As you can notice partition is numbered automatically sda6
Nav komentāru:
Ierakstīt komentāru