Operating System - HP-UX
1849093 Members
8131 Online
104041 Solutions
New Discussion

Expanding Volume after SAN LUN migration

 
A. Kay
Occasional Advisor

Expanding Volume after SAN LUN migration

I have a server attached to my SAN with a volume group in which I want to increase the size. I have decided to migrate the LUN to a bigger one or create a metalun. My problem is that after creating the bigger LUN, how does my OS know about the change in the size of disk and thereby increase the volume group.
I have done this in windows where using diskpart one can just expand to occupy the new disk but not in HP-Unix. Any help will be appreciated.

Thanks
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Expanding Volume after SAN LUN migration

Shalom,

If its within the size limits of the volume group, the OS becomes aware of the increased size of the lun through a reboot.

Its possible with ioscan and some slight of hand to get some systems to recognize the space when connected to some SAN environments.

The reliable way is to boot the box. The increased LUN size will be recognized immediately.

Then lvextend/extendfs. extendfs requires a umount.

fsadm can with Online JFS extend the fileystem without a umount of the filesystem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sathish kannan
Valued Contributor

Re: Expanding Volume after SAN LUN migration

Hi A.Kay,
As HP-UX caches device information, it does not matter if the device files are removed and recreated with "insf -e"; the host will still only remember the original device size.
The best way to clear the cache and have HP-UX rescan for devices is to reboot.

Regards
Sathish
Don't Think too much
A. Kay
Occasional Advisor

Re: Expanding Volume after SAN LUN migration

Unfortunately reboot didn't help me. After reboot all the values about the volume group (Total PE, Alloc PE, Free PE etc) are the same as before reboot even though I had migrated it to a LUN which is about 10GB bigger
A. Clay Stephenson
Acclaimed Contributor

Re: Expanding Volume after SAN LUN migration

Why did you expect a reboot to "fix" this? None of the LVM metadata have changed. LVM doesn't have a clue that the disk has grown. There are some unsupported tools that will alter the LVM metadata but the official "supported" view is that the size of a disk (LUN) is determined when the PV is added to the VG. What you should have done is created another LUN sized to meet your additional needs and add that LUN to your existing VG.
If it ain't broke, I can fix that.
IT_2007
Honored Contributor

Re: Expanding Volume after SAN LUN migration

If it is EMC then run follwoing command

symcfg discover
ioscan -fn
insf -e

this will see new LUN and you can verify it using "sympd list" command for the new LUN.

Once you see the LUN and pvcreate / vgextend / lvextend in the sequence.

Thanks,
Srini
Hilary Palmer
Advisor

Re: Expanding Volume after SAN LUN migration

With HP-UX you cannot expand the LUN size. I don't know why HP doesn't step up and allow this. It seems that they just need to allow LVM to add Physical Extends to the physical disk. Right now all you are stuck with is to create a new larger LUN, create your vg's and lv's, mount everything up in a temporary area, and copy your data over. Then remount your new filesystems in the old location. Then blow away your old filesystems and LUN.
Hilary Palmer
Advisor

Re: Expanding Volume after SAN LUN migration

Or... If you just want to add another LUN to your system you can add it to your existing volume group. BUT A WARNING TO YOU... If you created your VG without adjusting your max PV, PE, and LV then you will not be able to use a LUN larger than the one you already have. You can present a larger one, but you will only have access to the same amount of space as your initial LUN.