I want to migrate my system to LVM. My current setup is the following:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x6fa8e725 Device Boot Start End Blocks Id System /dev/sda4 662097920 1953523711 645712896 f W95 Ext'd (LBA) /dev/sda5 * 662099968 1945352191 641626112 83 Linux /dev/sda6 1945354240 1953523711 4084736 82 Linux swap / Solaris Note: sector size is 4096 (not 512)
My plan is the following:
- Create LVM partition in unallocated space from 0 to 662097920
- Copy everything to it.
- Delete everything from 662097920 to 1953523711
- Extend LVM to have 100% of the HDD
How can I do this ? I'm on Kubuntu 13.04
Status update: I created a primary partition on the unallocated space, to use pvcreate afterwards on that partition to create the LVM. Next step should be to copy everything to it, and delete the former partitions, and after, extend the primary partition where the LVM resides.