- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shortcut to copy layout of my VGs to another m...
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
Forums
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
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
тАО07-14-2004 10:00 PM
тАО07-14-2004 10:00 PM
I would like to copy layout of my VGs to another machine. I know this can be done manually. What I want to know is if there are shortcuts to it.
Many Thanks,
Charlie
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 10:04 PM
тАО07-14-2004 10:04 PM
Re: shortcut to copy layout of my VGs to another machine
/dev/vg* # lvm device files
/etc/lvmconf # Not sure this is the path but similier
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 10:26 PM
тАО07-14-2004 10:26 PM
Re: shortcut to copy layout of my VGs to another machine
You would really need to create the LVM again (mkdir /dev/vgXX and mknod) and then using vgimport mapfiles generated from other system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 10:44 PM
тАО07-14-2004 10:44 PM
Re: shortcut to copy layout of my VGs to another machine
How do i safely copy the VG's configs? Because by using vgexport, i will be removing my VGs?
Thanks,
Charlie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 10:50 PM
тАО07-14-2004 10:50 PM
Re: shortcut to copy layout of my VGs to another machine
I would also suggest if you are relocating disks you familiarise yourself with the "vgchgid" command (no man page available on this one). There are plenty of posting available on this topic, and when done right, it can save you a heap of time and hassle.
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 10:55 PM
тАО07-14-2004 10:55 PM
Solutionvgexport -m vgxx.mapfile -s -p -v /dev/myvg
If you use the -p (preview option) you are just capturing the information of the VG, not removing it. You can then ftp it to the other system.
on system B if you ever needed to import them after obviously moving the physical disk array or cables or whatever:
mkdir /dev/vgxx
mknod /dev/vgxx/group c 64 0x020000
vgimport -m vgxx.mapfile -p -v /dev/myvg (preview)
If really doing it, drop the -p option.
The man pages actually explain some of this stuff.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 10:56 PM
тАО07-14-2004 10:56 PM
Re: shortcut to copy layout of my VGs to another machine
Use vgexport with -m option
this will create a map file and then copy this map file to the other server where you are connecting the disk then use vgimport and give the path of the same map file.
see man vgimport & man vgexport for more details.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 11:18 PM
тАО07-14-2004 11:18 PM
Re: shortcut to copy layout of my VGs to another machine
There is no safe shortcut to do that. Of course you could replicate the disks using dd(1), then change the VGID using vgchgid(1M) and vgimport(1M) that copied disks on the other system... but the only "official" approach would be creation from scratch.
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 11:31 PM
тАО07-14-2004 11:31 PM
Re: shortcut to copy layout of my VGs to another machine
The disks are new and not moving any disks to the new machine. I only need to copy the layout of the many VGs from the old machine to the new machine. I think Michael's suggestion is ok.
Many Thanks,
Charlie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 11:37 PM
тАО07-14-2004 11:37 PM
Re: shortcut to copy layout of my VGs to another machine
on system B if you ever needed to import them after obviously moving the physical disk array or cables or whatever
So that procedure is more moving disks. The vgimport/vgexport DOES NOT change a single bit on the disks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2004 11:40 PM
тАО07-14-2004 11:40 PM
Re: shortcut to copy layout of my VGs to another machine
The man page for vgexport is a bit confusing about -m and -s. -m specifies a specific mapfile location but unless you use -p, the vgexport will remove the VG. -s is excellent for automating restoration of a volume group because the VG serial number is added to the mapfile. However, every disk on every HP-UX box in the world should have a unique identifier (serial number) so the -s option restricts the mapfile to restoring back the the same disks. -s is mostly used in shared disks that are part of a Service Guard cluster.
The mapfile is a plain ASCII file with the minor number (last digits) and lvol name. If -s is used, the file begins with the serial number of the VG. But from the man page for vgimport:
"vgimport assumes that the volume group information has already been created on the physical volumes."
Hummmm, that means that blank disks on the target system will fail because they have no matching information. There are lots of possible complications if vgimport could build a new set of disks, problems like different size disks, mirroring, alternate paths).
So while you can get a list of lvols from the mapfile, you still have to use pvcreate, vgcreate and lvcreate on the target system. All the data you need is in vgdisplay including the VG name, lvol names, size of the lvols, and physical disk info. Just to make sure, I would run diskinfo on each physical disk to see how big they are compared to the target system.
Bill Hassell, sysadmin