Scary stuff. I started out with the intention of moving from a single physical partition of /
in /dev/hda1
to an LVM-based system with seperate logical volumes for /home
, /var
, /
and swap, and a physical volume for /boot
. Somewhere along the way I blew away the partition table and for a while had an unbootable system.
A long pause, a review of what I’d done and where I was up to, and a lifesaving note on a piece of paper showed me that the LVM partition started at cylinder 12514. A few reboots from an install CD and I got it all back.
Current status:
ajft@fafnir:~$ sudo fdisk -l /dev/hda
Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 1338 10747453+ 83 Linux
/dev/hda4 12514 24321 94847760 8e Linux LVM
ajft@fafnir:~$ sudo lvs
LV VG Attr LSize Origin Snap% Move Copy%
home vg -wi-ao 50.00G
root vg -wi-a- 20.00G
swap vg -wi-ao 1.00G
var vg -wi-ao 15.00G
ajft@fafnir:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 10321208 6055004 3846776 62% /
tmpfs 257968 12 257956 1% /dev/shm
tmpfs 257968 12652 245316 5% /lib/modules/2.6.12-10-686-smp/volatile
/dev/mapper/vg-home 51606140 24624616 24360084 51% /home
/dev/mapper/vg-var 15481840 3136256 11559152 22% /var
Still haven’t managed to move / into LVM and have only /boot on a physical partition.
previously at http://www-personal.monash.edu.au/~ajft/systems/fafnir/20060514