- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Changing array slot of disk in a mirror set?
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
тАО01-18-2010 07:29 AM
тАО01-18-2010 07:29 AM
I've got a system which has a set of volumes mirrored across two external disk arrays, and I want to change it so that all the disks are in a single array, so that I can use the second array for another system. I have enough empty slots in the first array to accommodate all the disks.
I assume that it's not quite as simple as just unplugging a PV in the mirror from the second array and moving it to a free slot in the first array - or is it?
Are there any manual steps (import? rescan?) needed to get the LVM to recognize the new device path to the existing physical volume, or is it smart enough to recognize the PV label on the disk at its new /dev/dsk path and bring it back into the mirror without any drama?
I'd prefer to do it without rebooting, needless to say.
Thanks for any insights you can offer!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 07:40 AM
тАО01-18-2010 07:40 AM
Solutionif this is the case you just have to remove the mirror and vgreduce the disks from the array you want to leave empty:
remove the mirror from all the lvols that have disks beloging to the old array
lvreduce -m 0 /dev/vglol/lvol /dev/dsk/diskoldarray
once no lvol is using the disk reduce the vg:
vgreduce /dev/vglol /dev/dsk/diskoldarray
And if you wan't to redo your mirror with a disk in the new array then, present the new lun,ioscan, insf ..
vgextend /dev/vglol /dev/dsk/newdiskarray
lvextend -m 1 /dev/vglol/lvol /dev/dsk/newdiskarray
no need to stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 07:41 AM
тАО01-18-2010 07:41 AM
Re: Changing array slot of disk in a mirror set?
It looks like you are using LVM mirroring with external disk enclosures (not arrays).
You need to provide more details.
If they are mirrored using LVM , then the relocation of the disks needs to be handled within LVM. The vgexport/vgimport is one method to use. If you have spare disks, vgextend/pvmove/vgreduce is also an option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 07:44 AM
тАО01-18-2010 07:44 AM
Re: Changing array slot of disk in a mirror set?
"move allocated physical extents from one LVM physical volume to other physical volumes"
You would need to set up the new logical volumes (in the same VG, of course), but then you should be able to pvmove the second array's LVs to the new LVs. Then you do what you like with the old LVs.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 08:35 AM
тАО01-18-2010 08:35 AM
Re: Changing array slot of disk in a mirror set?
My hope is that I'd be able to simply unplug the mirror disk from one array, plug it into the other array, perform the appropriate incantation, and it would recognize and resync the existing mirror onto the relocated volume - without having to break the mirror, move the disks, and then recreate it.
Hope that's a bit more clear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 08:50 AM
тАО01-18-2010 08:50 AM
Re: Changing array slot of disk in a mirror set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 09:15 AM
тАО01-18-2010 09:15 AM
Re: Changing array slot of disk in a mirror set?
Sorry to disappoint but that's not going to happen.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 09:35 AM
тАО01-18-2010 09:35 AM
Re: Changing array slot of disk in a mirror set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 09:53 AM
тАО01-18-2010 09:53 AM
Re: Changing array slot of disk in a mirror set?
vgexport -s -m /tmp/vgNN/map
If necessary, recreate /dev/vgNN:
mkdir /dev/vgNN
mknod /dev/vgXX/group c 64 0xNN0000
Then reimport the VG:
vgimport -s -m /tmp/vgNN/map /dev/vgNN
The -s option should go out and look at all the disks LVM headers and "discover" the newly switched disks.
Possibly worth a try but I would want to have a good backup - which you ought to have in any case!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 02:13 PM
тАО01-18-2010 02:13 PM
Re: Changing array slot of disk in a mirror set?
As luck would have it I now have another system that's installed but not yet on the network that I can use to see what happens when a PV changes hardware paths. I'll try it out and post the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 08:00 PM
тАО01-18-2010 08:00 PM
Re: Changing array slot of disk in a mirror set?
if a physical volume changes paths LVM will not recongize it automatically
1. umount all filesystems
2. deactivate volume group
3. export volume group with the -s option
vgexport -s -m /tmp/vgxx.map vgxx
4. move the disks
and plug them in
5. ioscan
6. insf -e
to create the new device files at the new location
Now I would suggest that you spend a little time making sure with ioscan -funCdisk that the disks are all seen at the new location.
7. mkdir /dev/vgxx
mknod /dev/vgxx/group c 64 0xXXXXXXX
8. here is where the magic happens
vgimport -s -m /tmp/vgxx vgxx
the -s option causes the system to scan all of the disks for the VGID. The disks already have a PVID which will tell lvm what pieces are on what disks but the VGID tells LVM what disks belong in the volume group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2010 08:37 PM
тАО01-18-2010 08:37 PM
Re: Changing array slot of disk in a mirror set?
well, simple and straight and reliable.
1. Just do lvreduce and then vgreduce.
2. Your disks are now free to move to anywhere.
3. Connect the disks to the new array.
4. Do ioscan and 'insf -eC disk'
5. Recognize the new disks and do pvcreate on those.
6. Extend those PVs to the VGs and do mirroring with lvextend.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2010 02:10 AM
тАО01-20-2010 02:10 AM
Re: Changing array slot of disk in a mirror set?
Please try with the vgimport/export options with -s switch. It would be easier than lvreduce/vgreduce.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2010 09:57 AM
тАО01-20-2010 09:57 AM
Re: Changing array slot of disk in a mirror set?
Maybe I'm not using proper HP terminology - perhaps "enclosure?" It's a Storageworks 2405 JBOD enclosure, no hardware mirroring or RAID.
Thanks for the suggestion, I think that what you wrote, Emil, is what I was envisoning. I'll let everyone know what turns up from my test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2010 04:12 AM
тАО01-29-2010 04:12 AM
Re: Changing array slot of disk in a mirror set?
Once I started to delve into the process of assuaging the system's confusion, it quickly became apparent that doing paperwork on new disks, doing paperwork on the old disks, and doing a pvmove would be much, much easier.
Thanks for your input, everyone, I appreciate it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2010 04:16 AM
тАО01-29-2010 04:16 AM