LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-30-2015, 11:47 PM   #1
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Rep: Reputation: 0
Question [RESOLVED]LVExtend on RHEL6


Morning All,
I have rhel6 with partition with 2.5TB size and its gpt
So I already in the past extend the vg so I have another 2.5TB FREE
What I want to do is extend lv to 500gb from 2.5TB from making it 3TB.
The way I figure is
umount partition
run lvextend -L500GB /dev/mapper/chewy-nfs
run resize2fs /dev/mapper/chewy-nfs

and e2fsck -f if needed

Anyone has done this already provide any insight?

GPT makes me nervous.

Last edited by bravored; 11-01-2015 at 12:29 PM.
 
Old 10-31-2015, 12:11 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Code:
umount partition 
lvextend -L500GB /dev/mapper/chewy-nfs
resize2fs /dev/mapper/chewy-nfs
I am not sure what you mean by "partition", and why you want to unmount it. Can you give us the output of pvs and df?

The two other lines look good if /dev/mapper/chewy-nfs
  • is in a volume group that has enough space
  • is currently smaller than 500GB
  • has an ext3 or ext4 filesystem on it


Quote:
GPT makes me nervous.
Why? It's over 15 years old and proven. Besides, you are working with LVM here, not GPT. What makes me nervous is your remark that you want to umount something.
 
Old 10-31-2015, 12:34 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
GPT isn't a problem, not specifying the parms correctly will be.
Code:
-L, --size [+]LogicalVolumeSize[bBsSkKmMgGtTpPeE]
              Extend or set the logical volume size in units of megabytes.  A size suffix of M for megabytes, G  for  gigabytes,  T  for  ter
              abytes,  P  for  petabytes  or E for exabytes is optional.  With the + sign the value is added to the actual size of the logical
              volume and without it, the value is taken as an absolute one.
My emphasis added.

Last edited by syg00; 10-31-2015 at 12:38 AM. Reason: mumble
 
Old 10-31-2015, 07:27 AM   #4
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Original Poster
Rep: Reputation: 0
Thanks for the tips guys!
berndbausch,
/dev/mapper/chewy-nfs /chewy
It an nfs share/partition, what ever u want to call it.

syg0, I've used the +SIZEGB for a long time, never had any issue
lvextend -LSIZEG lvm name i.e lvextend /dev/mapper/vg3-lv1 /dev/sdc2
*lvextend -L+SIZEG lvm name for exisiting size
*lvextend -l +100FREE "" or lvextend -l extents etc..
<response back from server>
# lvextend -L+500GB /dev/mapper/chewy-nfs
Extending logical volume nfs to 3.12 TB
Logical volume nfs successfully resized

I only need to do the lvextend since I was already done with adding the drive, parted expanding the drive and vgextended like months ago.

RIght now I'm stuck at e2fsck, Only 3.7 % completed since this morning.
 
Old 10-31-2015, 05:42 PM   #5
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
lvextend -r ... can also resize the filesystem at the same time.
 
Old 11-01-2015, 08:51 AM   #6
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Original Poster
Rep: Reputation: 0
My e2fsck begun to pick up as soon I shutdown non essential services i.e nfs(nfs server), portmap, auditd, (the main services running for the app has already been turned off)

Hortageno, it says to use fsadm with lvextend -r (I've already done lvextend -L500GB /dev/mapper/chewy-nfs
. I typically do resize2fs /dev/mapper/chewy-nfs after it) It doesn't look it would fit my current scenario.
Thanks for the tip - I will try it on test env.

Thanks
 
Old 11-01-2015, 12:28 PM   #7
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Original Poster
Rep: Reputation: 0
All good
Server is back online with the extended disk of 3.1TB
 
  


Reply



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
regarding lvextend sushdba Linux - Newbie 3 06-17-2013 01:13 AM
lvextend - question jewel464g Linux - Newbie 5 09-28-2010 02:48 PM
lvextend? sachinh Linux - General 3 09-22-2009 07:25 AM
Not enough PE when running lvextend!? Chikne Slackware 6 02-04-2007 10:24 AM
lvextend - where's my data? zdenisl Linux - Software 4 05-13-2006 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:39 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