-1
# fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 41940991 20719617 5 Extended
/dev/sda5 501760 41940991 20719616 8e Linux LVM
Disk /dev/mapper/a--vm--vg-swap_1 doesn't contain a valid partition table
Is there a overlap between sda2 and sda5 in terms of start/end?
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/a--vm--vg-root 18180876 3424464 13809828 20% /
My initial disk is 20G, then I expended a LVM partition but it didn't seem to work?
Command (m for help): v
Remaining 41949182 unallocated 512-byte sectors
Command (m for help): p
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00094bdb
It is a VMware vm, I clicked the 'expand' button on the UI, and typed in a volume number. I thought everything should be automated. If not, why we even use LVM instead of mounting disks step by step? – user3201982 – 2014-10-03T13:04:29.297
How does that relate to original question and what exactly are you trying to achieve? – Art Gertner – 2014-10-03T13:08:19.180
I want to expand my disk using LVM. Sorry, I'm newbie. – user3201982 – 2014-10-03T13:10:10.377
Its perfectly OK to be newbie, but you have to be careful with your partitions - otherwise you can lose data. Please read the post carefully. I recommend you to use partitioning tool with graphical interface and try to resize your extended partition first. If in doubt- feel free to post screenshots and questions here. – Art Gertner – 2014-10-03T13:14:02.090
Can I create a new extended partition and then a LVM logic partition inside it? – user3201982 – 2014-10-03T13:16:38.683
And I'm operating on a server, can't see UI. – user3201982 – 2014-10-03T13:17:25.247
Yes, but you would lose all data currently stored on existing partition. – Art Gertner – 2014-10-03T13:18:13.600
Could you tell me how to enlarge sda2(extended partition) by fdisk, without data loss? – user3201982 – 2014-10-03T13:21:32.160
This is a separate question, that is significantly different from the original one you have asked. You can post a new question. – Art Gertner – 2014-10-03T13:42:09.743