LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-23-2016, 03:44 PM   #1
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
To umount or not when extending space on LVM?


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?

thanks
 
Old 01-23-2016, 05:26 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
1 members found this post helpful.
Old 01-23-2016, 07:37 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
+1
.
 
Old 01-24-2016, 08:09 AM   #4
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420

Original Poster
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Good info.

I've only worked with ext3/ext4 in production when it comes to LVM.

Started to lab with xfs when it comes to LVM. Seems a little more restrictive. Surely there is a reason for it.
 
Old 01-24-2016, 09:05 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
Old 01-24-2016, 02:24 PM   #6
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420

Original Poster
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by syg00 View Post
The devs for enterprise tools seems to presume everyone will only ever want to extend. The original LVM suffered from this same short-sightedness.
Well I have yet to lvreduce, vgreduce or pvresize. We are always needing more space...
 
Old 01-25-2016, 08:19 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
  


Reply

Tags
lvm, partition, umount



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending LVM samansniper Linux - Server 2 06-29-2013 02:26 AM
Error in extending LVM... cj_cheema Linux - Server 6 08-03-2009 12:21 PM
Extending LVM partition?? your_shadow03 Linux - Newbie 3 01-16-2009 02:43 AM
LVM - Extending logical volume - Insufficient free space deim Linux - Newbie 0 04-07-2007 09:47 PM
extending ext3 lvm Kroenecker Linux - Newbie 2 12-31-2003 06:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration