- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Extend LVM - Issue after pvresize
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2009 04:19 AM
тАО02-20-2009 04:19 AM
To do this I added the 2 new disks to RAID array and was able to expand and extend it.
Expand
/usr/sbin/hpacucli ctrl slot=1 ld 1 add drives=allunassigned
Extend
/usr/sbin/hpacucli ctrl slot=1 ld 1 modify size=max
Pots this I needed to resize the LVM.
The new space was not getting recognized by the LVM.
So, the steps I got were:
- pvresize
- lvresize/lvextend
- resize2fs
After doing pvresize, the pvs command still shows the DevSize the old size and is not recognizing the new size.
The output is as below:
% pvs -o +dev_size
PV VG Fmt Attr PSize PFree DevSize
/dev/cciss/c0d0p2 VolGroupHPHA lvm2 a- 339.97G 135.84G 204.90G
% vgdisplay
--- Volume group ---
VG Name VolGroupHPHA
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 11
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 7
Open LV 7
Max PV 0
Cur PV 1
Act PV 1
VG Size 339.97 GB
PE Size 32.00 MB
Total PE 10879
Alloc PE / Size 6532 / 204.12 GB
Free PE / Size 4347 / 135.84 GB
VG UUID wiqLs0-kD3s-0a0E-jEu0-FOD2-xBDZ-K0LR7N
% pvdisplay
--- Physical volume ---
PV Name /dev/cciss/c0d0p2
VG Name VolGroupHPHA
PV Size 340.00 GB / not usable 31.81 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 10879
Free PE 4347
Allocated PE 6532
PV UUID M0zFCv-gwU0-n1y6-S3BB-DM1a-IuWj-13JXP2
And when iexecute the lvresize command, I get following error:
% /usr/sbin/lvresize -L+100G /dev/VolGroupHPHA/LogVol07
Extending logical volume LogVol07 to 284.03 GB
device-mapper: reload ioctl failed: Invalid argument
Failed to suspend LogVol07
Not sure why the increased size is not getting recognized.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2009 05:00 AM
тАО02-20-2009 05:00 AM
Re: Extend LVM - Issue after pvresize
To make LV larger.
lvextend specifying new physical volume to extend to.
Then resize2fs
If you take a LUN on storage for example, and expand it on the storage controller, that change is very unlikely to be recognized at all, even after a reboot of the Linux system.
The way to go is to create a new larger lun on the storage, use storage utilities to clone the data and set up a new logical volume and then file system.
pvresize is not going to recognize a change made on the controller on a running system.
I may have this wrong, but need more details from you to provide further assistance.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2009 05:21 AM
тАО02-20-2009 05:21 AM
Re: Extend LVM - Issue after pvresize
Thanks for the response.
I understand that.
I actually was trying to do a pvcreate instead of pvresize to create the new PV, but that requires a device name. And after adding the 2 new HDDs I could not figure out there device names.
My fdisk output looks as follows:
% fdisk -l
Disk /dev/cciss/c0d0: 366.8 GB, 366870733824 bytes
255 heads, 63 sectors/track, 44602 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 26761 214853310 8e Linux LVM
- Even here I can see the disk size has been increased to 366G.
- How can I figure out the device names for the new HDDs I added?
- Do let me know what other information would be useful for taking this forward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2009 06:35 AM
тАО02-20-2009 06:35 AM
Re: Extend LVM - Issue after pvresize
fdisk -l
Will show device of new disks/LUNS added.
I fear the premise of what you wish to do will fail.
But I will after taking the Sabbath off check back and try and provide further assistance.
Please let the community know how it turns out.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2009 08:48 AM
тАО02-20-2009 08:48 AM
Re: Extend LVM - Issue after pvresize
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2009 04:15 PM
тАО02-21-2009 04:15 PM
Re: Extend LVM - Issue after pvresize
What's the output from this commands?:
* hpacucli controller slot=1 logicaldrive all show
As you are using partitions, you have two options:
1- Delete the second partition (c0d0p2) and recreate it bigger. (that would be done offline, with a rescue cd). Then resize your PV and then you can resize your LVs.
2- Create a third partition (c0d0p3), initialize it as a PV and add it to your VG, then you can resize your LVs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 02:59 AM
тАО02-23-2009 02:59 AM
Re: Extend LVM - Issue after pvresize
During my trials and errors my machine went bad and today I had to reset it up.
Once I had an initial setup again, I started with following steps:
1. Expand
/usr/sbin/hpacucli ctrl slot=1 ld 1 add drives=allunassigned
2. Extend
/usr/sbin/hpacucli ctrl slot=1 ld 1 modify size=max
3. pvresize /dev/cciss/c0d0p2
(This was different from the command I had executed last time. Last time I had executed command: pvresize --setphysicalvolumesize 340G /dev/cciss/c0d0p2)
% pvresize /dev/cciss/c0d0p2
Physical volume "/dev/cciss/c0d0p2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
But this time I did not see change in sizes for any of the commands.
% vgs -v
Finding all volume groups
Finding volume group "VolGroupHPHA"
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
VolGroupHPHA wz--n- 32.00M 1 7 0 204.88G 18.75G d8hKjg-fYg8-WTrR-WMyw-i03r-DIsn-Ji2bZ6
% pvs -v
Scanning for physical volume names
PV VG Fmt Attr PSize PFree DevSize PV UUID
/dev/cciss/c0d0p2 VolGroupHPHA lvm2 a- 204.88G 18.75G 204.90G mh3ZjX-Q0iK-8AZs-Ef0H-pxjF-zjS8-ohE409
The only command which is showing the new size is hpacucli which I think is expected because of the first 2 commands that I executed.
% hpacucli ctrl all show config
Smart Array P400 in Slot 1 (sn: P61620H9SVY0J5)
array A (SAS, Unused Space: 0 MB)
logicaldrive 1 (341.7 GB, RAID 5, OK)
physicaldrive 1I:1:5 (port 1I:box 1:bay 5, SAS, 72 GB, OK)
physicaldrive 1I:1:6 (port 1I:box 1:bay 6, SAS, 72 GB, OK)
physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 72 GB, OK)
physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 72 GB, OK)
physicaldrive 2I:1:3 (port 2I:box 1:bay 3, SAS, 72 GB, OK)
physicaldrive 2I:1:4 (port 2I:box 1:bay 4, SAS, 72 GB, OK)
This time around pvresize (without setphysicalvolumesize parameter) did not detect the correct size and did not resize the pv. I had expected it to comsume all the available bandwidth and be around 340G or so.
My thought is that I am missing something basic, but havent been able to figure that out till now.
I have also tried if I could create a new PV using pvcreate, however on my system I just cannot get the device names for the newly added HDDs so cannot take that approcah either.
Thanks,
Gaurav G.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 02:36 PM