-   Linux - General (
-   -   Logical Volume Manager (

sidmark-2850 11-20-2003 02:54 AM

Logical Volume Manager
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!!! :mad: :mad: :mad:

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.

Stanley56 12-29-2003 04:20 PM

Putting your / onto LVM is not recommended.
if you want to do it:

hw-tph 12-29-2003 05:43 PM

I wouldn't run my root filesystem on LVM either, but that document you refer to is three years old. You might want to check out the LVM HowTo, especially the part on migrating to an LVM root.


sidmark-2850 01-02-2004 01:25 PM

Hi, thanks for your advice. I was just playing around with lvm to see how it would work. The systems that were hosed were not production systems. Well, lesson learned. Don't put / on a lvm volume. I have not played with lvm in quite some time. We are currently looking at lvm because it seems promissing especially with the disk resizing as this is a bit of a problem here. Sometimes we need more space on disks. Is lvm stable to run on production systems. Has anyone here had any problems with lvm? Anyone ever had the same thing happen to them? What are the strengths and weaknesses to lvm?

Thanks in advance.

All times are GMT -5. The time now is 03:53 PM.