Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I've got 3 hard disks. On the first there is a 100mb boot partition. The rest of that hard-drive and the whole of the other two constitute the physical volumes for an LVM Logical Volume Group.
That Volume Group is then divided into 2 Logical Volumes, a small SWAP partition and the main big one which takes up the remainder of the space. This big partition, which is mounted as my root, has a EXT3 filesystem.
Now I've recently popped in some more ram and want to increase my swap space to compensate.
The trouble is I need to reduce my logical root partition to free up this space first. I can't do this while it's mounted so I try booting from my install (FC3) cd, and running the rescue mode.
If I tell the rescue mode program to mount the system image, the logical volume is mounted and can't be shrunk, so that's no good.
If I tell it not to mount the system image, I can't find the Volume Group anywhere in dev/ nor can I run any of the LVM tools.
So I downloaded a LiveCD from www*sysresccd*org (the *s are .s (I'm not allowed to post URLs in this forum)).
This CD definately has the LVM tools included so that's all good.
I boot up, it's all fine.
I run lvscan, it tells me my Logical Volumes are, as usual, at
/dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol01
The trouble is I look in dev/ and there's no VolGroup00/ there.
I try resize2fs anyway, but obviously it can't find the filesystem.
So vgscan finds the Volume Group and lvscan the Logical Volume, lvdisplay even prints out all the right information for it, but it doesn't exist in dev/ so I can't shrink it.
So that's pretty much as far as I've gotten before running out of ideas.
It may be a difference of using udev versus MAKEDEV or devfs. It's odd that the lvm tools are reporting it, but maybe they are just grabbing their info from fstab or something.
Check the obvious variations:
/dev/vg/
dev/VolGroup/
Otherwise, I don't know for sure what to tell you other than to play with other rescue CD's. I use Gentoo as my rescue CD usually, but I've recently been using Knoppix for it's partimage support. Not pushing anything, but just showing you that there are other rescue options, and maybe trying a few will give you one that works like you expect.
Have RHEL4-ES server which was installed with 100% of the disk space allocated to /dev/mapper/VolGroup00-LogVol00. Wanted to shrink this but since it is mounted as root that's not allowed. Created a LiveCD with LVM2, booted from it but vgscan don't see the LVM2 disk.
Have tried creating the device (mknod) but nothing works.
When you boot for your liveCD, first, make sure it has the correct version of LVM. I use LVM2 on my Debian system, but when I boot Knoppix it only has LVM1. Simple enough to install LVM2 on Knoppix however. You should be able to check versions by using the commandline option --version with any of the commands, e.g., "lvdisplay --version".
After verifying you have the correct version of LVM on your LiveCD, you should run "pvscan" [edit] and "vgscan" [/edit]. Then "vgchange -a y".
Now look at your /dev directory and see if things are there.
Now I've recently popped in some more ram and want to increase my swap space to compensate.
MORE ram actually makes you LESS likely to swap. Run "vmstat -s" and look for "pages swapped in" and "pages swapped out" statistics. If you're not currently swapping much, you shouldn't need more swap space. Alternately, load your system down a bit, so that you're using memory, then monitor what's going on with "vmstat -a 5 30". Ignore the first reading, then look at the "si" and "so" columns. You should run this vmstat command at various times under various load conditions to get a better picture of how your memory subsystem is performing.
Oops - one more post. Madsere - I didn't realize that you had resurected this thread from last year. It's better to start a new topic than to dredge up an old one. I was responding to the OP when I was talking about verifying LVM versions. It wasn't clear that the OP had done that, but you say that you did so it's irrelevent for you. Another reason not to drag up an old thread from the ashes. You asked questions, but my answers were not targeted at you - rather to the OP.
Just a quick follow up for those Google'ing for this out there (I was one of them)....
The current (2007.0) Gentoo live CD includes LVM2 support. I was trying to do the same thing on a Dell PowerEdge 6800. All you have to do is boot w/ the following options:
gentoo dolvm2 doscsi
Obviously, if you aren't using SCSI drives, you don't need the second option. This worked for me flawlessly. It detected my VG fine w/o any extra commands, etc...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.