Computers

All Things Computer Related

LVM And Shrinking The Root Filesystem On CentOs

0

Step 1. Use a live boot cd. I used Knoppix.
Step 2. Don’t mount the filesytem
Step 3. On the CLI type: lvm
Step 4. Once in LVM tpe the following:


See Hotdealster.com for more hot deals...
See HiFiHotDeals.com for more hot deals...
See HowIFixedIt.com/hotdeals for more hot deals...

vgscan # This will show you the name of the Volume Group
vgchange –available y VolGroup00 # Activates the Volume Group and the Logical Volumes in it
lvscan # Shows the Logical Volumes as active; the devices in /dev it mentions should now exist
exit # Exits you to the prompt

Step 5. Resize the filesystem with command:

e2fsck -f /dev/VolGoup00/LogVol00 # fsck on the filesystem
resize2fs /dev/VolGoup00/LogVol00 xxG # resize the file systems to xx GB; xx should be less than the current fs size
e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the filesystem; fix any errors which appear

Step 6. Run lvm again and type:

lvreduce -L xxG /dev/VolGoup00/LogVol00 # Resize the LV to xx GB; xx should be the same as above
exit # Quit, return to the prompt

Step 7. Do another filesystem check:

e2fsck -f /dev/VolGoup00/LogVol00 # Do another fsck on the filesystem; fix any errors which appear

Step 8. Remove the CD and reboot.

How to get more time to boot from CD in VMware using machinebios.bootDelay or bios.bootdelay

0

See Hotdealster.com for more hot deals...
See HiFiHotDeals.com for more hot deals...
See HowIFixedIt.com/hotdeals for more hot deals...

Have you ever tried booting from a CD or .iso in VMware only to find you don’t have enough time to hit f2? To increase the time to allow you to change your boot options edit your .vmx file for the virtual machine in question. Just add:

machinebios.bootDelay = “5000″

or

bios.bootdelay = 5000

For example, a setting of 5000 gives you 5 seconds to hit F2.

Go to Top