LVM mount with Ubuntu upgrade
Yesterday, I updated .. Ok, attempted to update my Ubuntu 5 system to Ubuntu 6. Everything seemed to go alright, until I had to reboot. Suddenly my system was hosed...Well, I could surely go to the backup copy I had, right? Nopes.. was taking a risk after reading about the smoothness of the Ubuntu dist-upgrade procedure.. Ouch.. that skipped back-up does hurt.
Anyway, today, I booted with the Live Ubuntu 6.06 disc and tried hard to get to my data on my logical volume. I remembered my disk looked like this before the upgrade
/boot 250 MB ext3 /dev/sda1
/ 65 GB reiserfs /dev/sda5 (LVM)
Yes, I now know that it is a BAD idea, but you learn by mistakes. Anyway, just that knowledge was useful. After a lot of reading up on lvm*, pv*, etc.. I am able to access my data with the following commands
sudo pvscan
PV /dev/sda5 VG Ubuntu lvm2 [x.y GB/0 free]
# load device module
modprobe dm-mod
#change logical volumes to active
sudo vgchange -a y
#create mount point
sudo mkdir /mnt/newroot
#list devices for VG ubuntu
sudo ls /dev/Ubuntu
root swap_1
# I want to mount root -- that's where my data is
# remember that it is reiserfs
# I just realized that I also had a swap partition under my logical volume!
sudo mount -t reiserfs /dev/Ubuntu/root /mnt/newroot/
cd /mnt/newroot
cd my_data_dir
ls -al
Wow!! everything is here .. back it up ... fast!! :)