- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Extending a disk online by mirroring/pvmoving ...
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
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
тАО03-26-2009 03:18 AM
тАО03-26-2009 03:18 AM
Hi.
I have a disk (100GB) in an EVA storage at about 91% of usage. We're planning to create a bigger disk (200GB) and move all the data from "disk1" to "disk2" without stopping machine's services (that partition is holding Oracle datafiles). After that, I need to remove "disk1" from the system.
I've done a search in older itrc-forum's threads and I found some different options. Please, correct me if anything below this is wrong:
1.- Using pvmove: "pvmove disk1 disk2".
It's (for me) the simplest way to do it. I "pvcreate" disk2 and "vgextend" my vg to add it. Then I just do a "pvmove" of disk1 to disk2 so that all PE are moved. After this, I "vgreduce" disk1 and remove the disk from the EVA.
The questions:
- Is it safe?
- I've read the following on the manpage: """ The first extent of the physical volume can be moved to get extra space for metadata, while vgmodify can use this extra space to expand the metadata. To relocate the first extent, specify 0 after source_pv_path, delimited by a colon (:).". What this that mean? Do I need to do this in order to move my data and "destroy" disk1 after it?
2.- Using "lvextend -m 1" to mirror the disk.
On previous ITRC threads I've read about "lvextending -m 1" the disk, and "lvextending -m 0" after a while. How is supposed to do this (with my "disk1" and "disk2" disks).
My first thought about the above was adding a "disk3" of the same size of "disk1" and mirroring "disk1 - disk3" (for security purposes) and then doing "pvmove" to move "disk1" data to "disk2". After moving data, I lvextend -m 0 the mirror and destroy disk3.
Is the right way? Or can "lvextend -m 1" do the copy disk1 -> disk2 for me although having different sizes?
How can this "type of copy" can be done? :?
3.- Using MirrorDisk/UX.
We have HP-UX 11.23 ENTERPRISE. If I remember correctly, this includes Mirrordisk/UX License.
How would I make the disk1 -> disk2 moving with Mirrordisk?
That's it... the idea is ... which is the best and safer option and how do you recommend me to do the "data move operation"?
Would all the above methods work correctly when moving from a smaller disk to a bigger one? I mean, the resulting disk will have the LVM updated with my "extra" Free_PEs ? I imagine that after the moving, in all cases, I will be able to extend the FS online with fsadm ...
Thanks :)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 03:26 AM
тАО03-26-2009 03:26 AM
Re: Extending a disk online by mirroring/pvmoving it
use vgdisplay -v
If not, you cannot do this online.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 03:31 AM
тАО03-26-2009 03:31 AM
Re: Extending a disk online by mirroring/pvmoving it
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 03:45 AM
тАО03-26-2009 03:45 AM
Re: Extending a disk online by mirroring/pvmoving it
There is little risk involved in pvmove.pvmove is not an atomic operation. Furthermore the command moves data extent by extent and is easily interruptable. If this happens, then the configuration is left in some weird inconsistent state showing an additional pseudo mirror copy for the extents in question. This can be cleaned up only using the lvreduce command.
So the safer way would be mirror all the lv's residing on disk1 to disk2 by specifying the disk2 in command line. Once all lv's are mirrored, you can remove the mirrors from disk1 and remove the disk out from the volume group.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 05:17 AM
тАО03-26-2009 05:17 AM
Re: Extending a disk online by mirroring/pvmoving it
Note that points 2 and 3 are the same. You need Mirror-UX installed in order to use "-m 1" option of lvextend. As others, I think using lvextend / lvreduce is a better way than pvmove.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 05:47 AM
тАО03-26-2009 05:47 AM
Solution1. Check if you can extend you VG with Larger Disk if yes than
#vgextend /dev/vg_name new disk
#lvextend -m 1 /dev/vg_name/lv_name /dev/dsk/newdisk
#lvreduce -m 0 /dev/vg_name/lv_name /dev/dsk/olddisk
#vgreduce /dev/vg_name /dev/dsk/olddisk
its done
Regards
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 07:17 AM
тАО03-26-2009 07:17 AM
Re: Extending a disk online by mirroring/pvmoving it
Multiple answers:
Torsten wrote:
> First of all you need to check your VG
> maximum settings: does it allow to
> vgextend a larger disk?
Yes, because it contains other disks (in the same VG, for other LVs) that are larger or equal the size of the disk I want to add.
Fred Ruffet wrote:
> Note that points 2 and 3 are the same. You
> need Mirror-UX installed in order to use
> "-m 1" option of lvextend. As others, I
> think using lvextend / lvreduce is a
> better way than pvmove.
Something that I don't understand is ... if "-m" is a Mirror-UX option... how is it possible to have in my inherited hp-ux system "mirrored vg00 disks" but Mirrordisk UX software is not installed? Are root-disks LVM mirror created a different package? We have a machine that uses mirrored boot disks but I can't find no Mirrordisk software in it :-???
Sharma Sanjeev wrote:
> #vgextend /dev/vg_name new disk
> #lvextend -m 1 /dev/vg_name/lv_name /dev/dsk/newdisk
> #lvreduce -m 0 /dev/vg_name/lv_name /dev/dsk/olddisk
> #vgreduce /dev/vg_name /dev/dsk/olddisk
How much time should I wait between the -m1 command and the -m0 command (how to see if all the PE have been copied before the vgreduce?).
And, after that, it must follow lvextend + fsadm, right?
Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2009 11:28 AM
тАО03-26-2009 11:28 AM
Re: Extending a disk online by mirroring/pvmoving it
It depends from the size of the lvols. It was something like 1GB for ~3 min.
You can check the progress with lvdisplay command:
lvdisplay -v /dev/vg_xx/lvolX | grep stale | wc -l
>And, after that, it must follow lvextend + >fsadm, right?
No, mirroring is enough.
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2009 12:10 AM
тАО03-27-2009 12:10 AM
Re: Extending a disk online by mirroring/pvmoving it
>> And, after that, it must follow lvextend + >> fsadm, right?
>
>No, mirroring is enough.
??????
But I'm moving lvol1 from disk1 to disk2 because I'm running out of space in disk1...
I imagine that after the "mirroring" to disk2, I still have to lvextend lvol1 (to get the extra space on disk2) and use fsadm to extend the filesystem... but you say that "mirroring is enough" :?
Does the mirroring autoextend the lvol and fs? :?
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2009 12:23 AM
тАО03-27-2009 12:23 AM
Re: Extending a disk online by mirroring/pvmoving it
And of course if you want to extend it use:
#lvextend -L size /dev/vg_xx/lvolX
#fsadm -F vxfs -b sizeM /mountpoint
regards,
ivan