I am running RedHat Linux 8.0. I looked into lvm because of the many advantages, mainly dynamic resizing. I was looking into implementing it on my mail file server, but now I am having a change of heart. One of my test boxes has 3 hard drives. Drive 0: 2GB, Drive 1:3BG and Drive 2: 1.5GB. Drive 0 had a 64MB /boot partition and a 256MB swap partition. All the space on rest of the drives are partitioned as lvm's. So in total I have 3 pv's: /dev/hda3, /dev/hdb1, /dev/hdc1. The vg was named volumes. The vg had 3 logical volumes: a 2GB lv root_volume, mounted as /, a 300MB lv home_volume mounted as /vol/home and a 200MB lv scratch_volume mounted as /vol/scratch.
Ok, everything was going so well. The server was running samba and exported the directories. I left the lvs fairly small because I wanted to play around with lvm before implementin it on a large scale installation. I download a rescue CD from SystemRescueCd homepage
. I expanded the root_volume lv to 1gig more than it was. I used the rescue CD to do this. The volumes were unmounted, but the vg and lvs were active. After expanding, I ran the resize2fs command so that the space will be registered with the filesystem. Resize2fs complained that the lv needed to be fsked with the -f flag, so I did. I then ran resize2fs again, but it still complained that the drive needed to be fsked. No matter how many times I fsked, resize2fs complained. I rebooted the system and to my surprise, the kernel paniced!!!
I couldn't figure out why, so I rebooted to the rescue cd again. I created a directory under mnt, activated the vg and lvs then tried mounting /dev/volumes/root_volume to the directory under /mnt. To my surprise, the same data what is supposed to be in the home_volume lv showed up under the root_volume lv. In fact, ALL
volumes appeared like the home_volume lv. I can't understand why this happened. Anyway, I wiped the machine out and reinstalled.
I did the same thing t another machine and I got exactly the same result. This machine only has 1 hard drive. The machine is in the corrupted state and I plan to leave it like this so that I can figure out what went wrong and if it is possible to fix it. Can someone please help me restore it to the way it was? It's a really good thing that I didn't go lvm on the production server.
Thanks for your help in advance.