Review your favorite Linux distribution.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 05-16-2013, 04:14 AM   #1
Registered: May 2013
Posts: 93

Rep: Reputation: Disabled
How to expand the VG after the LUNs expanded?

the luns have been expanded from the filer side, and all luns in server side are in use, so how to expand the vg to use the expanded luns?

eg: former lun size 100G and all in use in vg1, and now the lun have been expanded to 200G, and the vg is still in use in server side, how to expand the vg to 200G since the pv should be resized?

Thanks in advance!
Old 05-16-2013, 08:31 AM   #2
Registered: Nov 2004
Location: Australia
Distribution: Fedora, Ubuntu
Posts: 55
Blog Entries: 2

Rep: Reputation: 17
I'm not sure if expanding the original pv is possible. You should be able to create a new pv in the spare space and add it to the vg. You should then be able to expand the lv using (I think lvchange). After that you will need to expand any filesystem in the lv using a tool such as ext2resize (sp?).
Old 05-16-2013, 08:39 PM   #3
Registered: May 2013
Posts: 93

Original Poster
Rep: Reputation: Disabled
Please guide how to expand the original pv. Currently situation: lun size on filer:200G, the mapper disk on server sdd size 100G.
Old 05-17-2013, 10:16 AM   #4
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi there, and welcome!

First, make sure you have a good backup!!

Next, let the kernel see the extra space by triggering a rescan. to do this, run:
echo 1 > /sys/block/sd?/device/rescan
where "sd?" is the name of the applicable LUN.

Check that this worked by either looking at the dmesg messages, or running "fdisk -l /dev/sd?".

From here the next steps depend on whether you have a partition table on the LUN or not.

If you do, jmajor's suggestion to add a partition and new PV is the safest. If you really want to expand the existing PV, you should be able to do so with a tool like gparted. Just make sure you have a good backup first :-) Alternately you could use fdisk to delete the partition & recreate it with the same start position and a new size, but this is more risky!

If you don't have a partition table (i.e. you're using the entire /dev/sd? as PV), while I haven't tried this, I found some articles online about how to do this using multipathd, like the article at

Once this is done, you'll need to run the appropriate pvresize, lvextend & resize2fs (or similar, depending on your FS type) commands.

Which Linux distribution & version are you running?

Good luck with this!
Old 05-19-2013, 10:01 PM   #5
Registered: May 2013
Posts: 93

Original Poster
Rep: Reputation: Disabled
Hi cliffordw,

Thanks very much for your post, that's very helpful!

Fortunately, we don't use multipath currently and we don't have a partition table on the pv, so only two steps:
1. rescan
2. pvresize.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Expanded disk linuxgoose Linux - Software 14 03-24-2010 08:49 PM
LXer: Qt gets cuter: 4.6 brings expanded platform support LXer Syndicated Linux News 0 12-02-2009 10:30 AM
Expanded Swap for Hibernate, now what? sixsidepentagon Linux - Newbie 12 10-06-2007 12:58 PM
How to stop Email address from being expanded drmjh Linux - Newbie 2 03-04-2006 03:39 AM
How to del all the files expanded by an tarball file? hkl8324 Debian 18 06-14-2005 05:36 AM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:52 PM.

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