Re: LVM resize sanity check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Locke wrote:

Unmounting should only be necessary when "shrinking" a filesystem.  I
thought you were growing /tmp....  But, now that you mention it, I
didn't notice that you were unmounting and fscking /var before lvextend
and resize2fs.

Generally growing should work with just lvextend and resize2fs, because
you are only tacking things on to the end of the filesystem, not
touching most of the existing data structures.

Shrinking is the more interesting challenge, because you are looking at
the potential of "moving" data.  While this is handled just fine by
resize2fs, it is "strongly" recommended to e2fsck beforehand to ensure
you are starting from "stable structures".  So shrinking is normally:
umount, e2fsck, resize2fs, lvreduce, and mount.  The danger is that
lvreduce has no knowledge of the filesystem which resides on top of it,
so is perfectly happy with shrinking into "live" structures.  That's why
I was concerned with you using an "absolute" number for resize2fs and a
relative number for lvreduce earlier.  To easy to slip up and lvreduce
into the filesystem.

Good luck,

--Rob


I've actually just rebooted after doing it from the rescue CD. Looks like everything went fine.

When trying from the GUI, I was only trying to increase the size of VolGroup03 (tmp) and not bothering with reducing /var as it showed that I had enough extra space to bring /tmp to 2GB. I thought I'd try that first. However, the application insisted on unmounting anyway. I'd think that that shouldn't be necessary, but whatever.

I understand about the reduction, and that it's important to reduce the filesystem first.

For posterity, here's what I just did from the rescue CD:

# umount /mnt/sysimage/var
# e2fsck -f /dev/VolGroup00/LogVol04
# resize2fs /dev/VolGroup00/LogVol04 13G
# lvreduce -L13g /dev/VolGroup00/LogVol04 <-- note the small g
# umount /mnt/sysimage/tmp
# e2fsck -f /dev/VolGroup00/LogVol03
# lvextend -L+6g /dev/VolGroup00/LogVol03
# resize2fs /dev/VolGroup00/LogVol03
# exit

Note that I didn't bother to remount because I was using the rescue CD.

That appears to have fixed things. Thanks for your help!

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux