[SOLVED] To umount or not when extending space on LVM?
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So some of the documentation I see in various places either recommends to umount or doesn't even talk about it when adding space to a partition that falls under LVM.
I know to backup the data, however I'm wondering what others think here. Do you umount an LVM partition before growing it or do you even bother with that?
LVs and the filesystems on them can safely be extended online with no problems. (There's always the possibility some issue that hasn't bit you yet bites you when you do an extension which is why you want a backup but it is extremely rare.) I've done extensions of lvm2 for years with no issues mostly on ext2/ext3/ext4 filesystems.
Where you DO want to umount is if you're shrinking an LV and underlying filesystem. Some filesystems tell you they can sometimes shrink on line with no ill effects but your likelihood of something going wrong to a reduction is quite a bit higher. Some filesystems such as XFS don't even allow filesystem shrinking.
The devs for enterprise tools seems to presume everyone will only ever want to extend. The original LVM suffered from this same short-sightedness. Took years to correct. ZFS fanboys keep pontificating about no need for a simple means to reduce a zpool as well.
They all (and XFS devs) need a kick in the arse - simple as that IMHO.
Use a filesystem that does what you need - btrfs in my case, but ext4 is also fine.
On occasion I've had to do reduction but not very often. It usually occurs when we've done initial layout using all space of internal disks and have no SAN attachments to the server. If one filesystem is using more space than originally planned for and another has a fair amount free it makes sense to reduce the one with the free space to expand the one that needs more.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.