- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Copying logical volume information
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
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
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
10-01-2001 08:21 AM
10-01-2001 08:21 AM
Copying logical volume information
I have two systems both of them are N4000s
connected to a storage array. These systems
are in a different location.
System A
========
vg01 <100 Lvs>
vg02 <100 Lvs>
We are trying to migrate data from System A to System B. I need to re-create logical volumes on system B to what I have on system B.
Is there a better way of doing this without having to manually create the logical volumes on System B.
In effect System A will need to be like System B. I will not be able to mirror across WAN.
Thanks.
Subbu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:31 AM
10-01-2001 08:31 AM
Re: Copying logical volume information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:38 AM
10-01-2001 08:38 AM
Re: Copying logical volume information
I don't think so. How does os will know that that physical disk has valid file sytem until you will create it.
You might know the sequence to create filesystem but I am typing it anyway
#pvcreate /dev/rdsk/c?t?d?
#mkdir /dev/vg??
#mknod /dev/vg??/group c 64 0x0n0000
#chmod 644 /dev/vg??/group
#vgcreate vg?? /dev/dsk/c?t?d?
#lvcreate -l numberofPV -n name /dev/vg?? (and more)
#newfs options (do man newfs for options)
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:41 AM
10-01-2001 08:41 AM
Re: Copying logical volume information
If it were me and I had to recreate 100+ Lvols on another system, I would write a script which
does a strings /etc/lvmtab | grep vg to get each volume group. I would then do a vgdisplay -v for each volume group and use awk or perl to parse for disks and logical volumes.
This does assume that you have the same physical devices. My other approach would be to explore using Ignite.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:46 AM
10-01-2001 08:46 AM
Re: Copying logical volume information
If by "migrate", you mean move the data one-time, I'd do a 'vgexport' from system-A with mapfiles and a 'vgimport' on system-B.
See the man pages for 'vgexport' and 'vgimport'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:47 AM
10-01-2001 08:47 AM
Re: Copying logical volume information
Looking at what you have said so far, machines are in different locations and not sharing the disk devices, the only option is to create new LVs on the new machine and then copy the data.
As far as creating the new LVs is concerned, you are better of writing a small script to get the configuration of the LVs from node 1 and then creating them on the new node.
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:48 AM
10-01-2001 08:48 AM
Re: Copying logical volume information
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2001 08:51 AM
10-01-2001 08:51 AM
Re: Copying logical volume information
YOu need to write scripts to do this for you.
An example is to do something like this.
on system A, write a script to generate a map file something like this
lvol1:30
lvol2:200
lvol3:1000
You can write a script say 'vgshow vg_name' as below
for LV in `vgdisplay $1|grep "LV Name" |awk '{print $3}'`
do
SZ=`lvdisplay $LV |grep "LV Size" |awk '{print $4}'`
LVNAME=$LV
echo $LVNAME:$SZ >> $1.map
done
Now take this map onto system B and then write another script to create lvols for you.
for i in `cat vg01.map`
do
LV=`echo $i |awk '{FS=":";print $1}'|sed 's/\/dev\/vg01\///' `
SZ=`echo $i |awk '{FS=":";print $2}'`
lvcreate -n $LV -L $SZ vg01
YOu can do this for other volume groups. This script may not work straight. But you can use this logic.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 01:09 AM
10-02-2001 01:09 AM
Re: Copying logical volume information
Only if the LVM configuration of System B will be exactly the *same*, i.e. not just similar, as that of System A, then you could use vgcfgbackup and vgcfgrestore (and vgexport (-m -p) and vgimport).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 02:20 PM
10-02-2001 02:20 PM
Re: Copying logical volume information
Ignite could do this for you. Just re-ignite the system.
The other option that immeditately springs to mind is to do a vgcfgbackup for vg01 and vg02 - then do a vgcfgrestore for vg01 and vg02:
#vgcfgbackup vg01
#vgcfgbackup vg02
then restore to other system using
#vgcfgbackup -f
if you want data as well, do this and then run restore/vxrestore as needed.
I'd do it via ignite though because it's automagical.
I'm guessing this is for a DR site?