Wednesday, December 5. 2007System Recovery Week: Using LVM In Rescue ModeTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Actually, online resizing of ext3 has been possible for quite a while now (since 2.6.10 apparently), as you can see from this blog post:
http://michael-prokop.at/blog/2006/08/01/ext3-online-resizing/ I have done it myself quite a few times. Ryan
Yes -- "online resizing" is available for ext3, but unfortunately only for growing filesystems, not for shrinking them, as the article indicates. I know the filesystem folks are working on this and really look forward to seeing it land!
Looks like I misread your post.
I read "However, you can't (yet) shrink a filesystem while it is mounted" as "However, you can't (yet) resize a filesystem while it is mounted." From what I can tell, you're right, the online resizing is only for growing the filesystem. Ryan
Thank you this is just what I needed.
I followed your steps, and reduced my /dev/VolGroup00/LogVol00 to 70 GB, freeing up 40GB. I do have a question how to proceed, because the LogVolume00 is now reduced in size, but the VolGroup00 is not yet. How could I turn this free space into a /dev/sda3 partition? Here is my situtation: [root@localhost ~]# fdisk -l /dev/sda Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 512 = 8225280 bytes Disk identifier: 0x000d5410 Device Boot Start End Blocks Id System /dev/sda1 1 25 200781 83 Linux /dev/sda2 26 14593 117017460 8e Linux LVM [root@localhost ~]# vgdisplay -v Finding all volume groups Finding volume group "VolGroup00" --- Volume group --- VG Name VolGroup00 Format lvm2 Metadata Areas 1 Metadata Sequence No 6 VG Access read/write VG Status resizable VG Size 111.59 GB PE Size 32.00 MB Total PE 3571 Alloc PE / Size 2302 / 71.94 GB Free PE / Size 1269 / 39.66 GB --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV Write Access read/write LV Status available # open 1 LV Size 70.00 GB Current LE 2240 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:0 --- Logical volume --- LV Name /dev/VolGroup00/LogVol01 VG Name VolGroup00 LV Write Access read/write LV Status available # open 1 LV Size 1.94 GB Current LE 62 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:1 --- Physical volumes --- PV Name /dev/sda2 PV Status allocatable Total PE / Free PE 3571 / 1269 TIA, Sander
Freeing space in a VG creates space that you can use for other LVs, but it's not easy to use that to create free partition space.
In other words, you can easily use the space you've freed up to create another LV for use with Linux (for another filesystem, or for swap space), but can't as easily free it up for use by some other operating system that doesn't use LVM (or uses a different volume management scheme). To create an LV named "test", for example, you could use the command: lvcreate VolGroup00 --size 40GB --name test To free up space for another partition -- again, only required if you want to use it for a non-Linux operating system-- you could use another disk (or external disk) and use pvcreate/vgextend/pvmove/vgreduce to move the data off the main disk temporarily. Then you could use fdisk/pvcreate/vgextend/pvmove/vgreduce to migrate the data off the external disk onto a smaller PV partition, enabling you to use the freed-up space for another operating system. These operations can be done graphically, while the system is running, using the system-config-lvm tool.
Thank you for the tip regarding vgscan and vgdisplay to activate the LVM in system rescue mode. I would like to add a note regardng LVM on top of software RAID as adding the command "raidstart /dev/md*" is needed to start the RAID. I was able to use your procedure to run fsck on my broken CentOS 5 RAID1, LVM home file server that would not restart after a failed suspend/resume event. The system would kernel panic a few lines into the INIT process without any messges I could read( too fast). Using fsck on the filesystem after following your procedure worked to repair the problem. Thanks again.
|
Welcome!The Fedora Daily Package exists to highlight lesser-known Fedora Linux packages each weekday-- with a special article each Wednesday taking a behind-the-scenes look at some of the configuration options and packaging details that make Fedora tick. For more information, please see the Fedora Daily Package Welcome posting. For information on the Fedora package management system and how to install, update, and remove pacakges, see the postings from Package Management Week (especially Using Yum). To suggest a future Fedora Daily Package, use the Suggest a Package box below. TranslationsBooksBooks related to Fedora, including Fedora Linux and X Power Tools by Chris Tyler (this site's editor): Suggest a PackageCategoriesChris Tyler's BlogLooking for a Debugging Mentor
Wednesday, February 20. 2013 Acessing the armv6hl Koji Buildsystem Monday, February 11. 2013 Why the Pi is Great for Teaching and Hacking Friday, January 18. 2013 SBR600 - Winter 2013 Monday, December 17. 2012 The OSTEP Team Wednesday, November 28. 2012 QuicksearchBlog AdministrationLicense![]() Original material in the Fedora Daily Package is Copyright ©2006-2008 by Chris Tyler. This material may be distributed under the Creative Commons Attribution-Share Alike 2.5 Canada License or the Open Publication License. |