LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices



Reply
 
Search this Thread
Old 12-31-2013, 02:11 PM   #1
felbvts
Member
 
Registered: Mar 2009
Posts: 38

Rep: Reputation: 3
Expanding existing lun space using multipath and lvm


The storage team extended an existing lun. (mpath6) I am able to see the space 300G via multpath. I am unable to get lvm to see the space. I have added a second partition to dm-3. but pvresize is not picking it up.

What am I missing? Is there a way to extend the existing partition without risking the data?

mpath6 (360a98000572d4f38466f5732472d5a4d) dm-3 NETAPP,LUN
size=300G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 2:0:3:7 sdbk 67:224 active ready running
| |- 2:0:2:7 sdbc 67:96 active ready running
| |- 1:0:3:7 sdae 65:224 active ready running
| `- 1:0:2:7 sdw 65:96 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
|- 2:0:1:7 sdau 66:224 active ready running
|- 2:0:0:7 sdam 66:96 active ready running
|- 1:0:1:7 sdo 8:224 active ready running
`- 1:0:0:7 sdg 8:96 active ready running

--- Physical volume ---
PV Name /dev/mpath/mpath6p1
VG Name sanvg6
PV Size 200.00 GB / not usable 1.15 MB
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 51199
Free PE 0
Allocated PE 51199
PV UUID gji02f-VErW-jNva-b1xQ-HXMw-zcz1-jPsMtV


[root@hqlinnmnpdbt ~]# fdisk -l /dev/dm-3

Disk /dev/dm-3: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/dm-3p1 1 26108 209712478+ 8e Linux LVM
/dev/dm-3p2 26109 39162 104856255 8e Linux LVM
[root@hqlinnmnpdbt ~]#
[root@hqlinnmnpdbt ~]# pvresize /dev/mpath/mpath6p1
Physical volume "/dev/mpath/mpath6p1" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
[root@hqlinnmnpdbt ~]# pvdisplay /dev/mpath/mpath6p1
--- Physical volume ---
PV Name /dev/mpath/mpath6p1
VG Name sanvg6
PV Size 200.00 GB / not usable 1.15 MB
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 51199
Free PE 0
Allocated PE 51199
PV UUID gji02f-VErW-jNva-b1xQ-HXMw-zcz1-jPsMtV
 
Old 12-31-2013, 02:39 PM   #2
kinneyd
LQ Newbie
 
Registered: Oct 2011
Posts: 21

Rep: Reputation: Disabled
Your physical volume is created on the first partition on the disk. disk=mpath6 partition=mpath6p1. Although the lun has grown, the partition is still the same size. You will need to grow the partition to use the extra space on the disk.
 
Old 01-02-2014, 01:48 PM   #3
felbvts
Member
 
Registered: Mar 2009
Posts: 38

Original Poster
Rep: Reputation: 3
Yes, That is why I created the 2nd partition... How do I expand the first partition without corruption or risk of data loss of the existing dsta on the first partition? Also this is a live running system - I would like to expand without shutting it down.
 
Old 07-29-2014, 02:17 PM   #4
nix1098
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
You're on the right track. I too don't like the idea of deleting an existing partition and re-creating it.

Assuming your second partition is /dev/mpath/mpath6p2 with partition type 8e (Linux LVM)

If you don't see it under /dev/mpath/ yet:

# start_udev

Then:

# vgextend /dev/<VG> /dev/mpath/mpath6p2

# vgdisplay -v <VG> (will now show new space, increased total extents, and mpath6p2)

# lvextend -l <extents> --resizefs /dev/<VG>/<LV>

... and Bob's yer uncle.
 
  


Reply

Tags
expand, extend, lvm, multipath


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
Replacing 200 GB LUN with 100 GB LUN in LVM rajaniyer123 Linux - Enterprise 4 03-27-2012 01:32 PM
LUN has been grown. How to see available space in LVM? z33tec Linux - General 1 11-19-2011 02:01 AM
Expanding LUN, anything I need to do in RHEL4 to? abylin1 Red Hat 10 10-29-2009 08:38 PM
RHEL 3: Steps of expanding file system (add new SCSI disks) to existing SW RAID & LVM atman1974 Linux - General 2 01-12-2006 10:49 PM


All times are GMT -5. The time now is 11:07 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration