- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script for transferring LVM Configuration to d...
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
тАО09-03-2004 08:55 AM
тАО09-03-2004 08:55 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2004 09:10 AM
тАО09-03-2004 09:10 AM
Solutionvgdisplay 2>/dev/null | grep "VG Name" | awk '{print $3}' | xargs -n1 | while read VGDIR
do
VG=$(echo "$VGDIR" | sed 's/\/dev\//')
vgexport -p -s -m /root/MAPS/$VG.map $VGDIR
echo "$VG\t$(ls -lrt $VGDIR/group | awk '{print $6}')" >> /root/MAPS/grouplist
done
/root/MAPS directory from the source system should be made available in the DR system.
In the DR system
cat /root/MAPS/grouplist | while read VG MINOR
do
mkdir /dev/$VG
mknod /dev/$VG/group c 64 $MINOR
done
for MAP in $(ls /root/MAPS/*.map)
do
VG=$(echo "$MAP" | sed 's/\.map//')
vgimport -v -s -m $MAP $VG
done
The above script assumes all the volume groups are active in the source system.
and it is just an off-the-fly script, so needs some testing before implementation :-).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2004 09:12 AM
тАО09-03-2004 09:12 AM
Re: Script for transferring LVM Configuration to different server in DR
The best bet for you will be to write your own script that will pvcreate the appropriate disks, create the VGs, create the LVs, newfs the LVs, etc.
You would also have to make sure that you had an input file with the appropriate disk devices listed for the pvcreate and vgcreate commands. You would need to know the size of the disks as well so that you can use the appropriate number of disks to create the VG the size that you need.
There really is no cut-and-dried method for doing this. No script out there will know everything that you need to really automate this, unless you customize it yourself.
I honestly prefer doing a lot of these steps manually, or just have a bare bones script that you can modify once you know disk names and sizes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2004 09:14 AM
тАО09-03-2004 09:14 AM
Re: Script for transferring LVM Configuration to different server in DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2004 12:47 PM
тАО09-03-2004 12:47 PM
Re: Script for transferring LVM Configuration to different server in DR
To simply this, the hardware should be at least compatible with what you have and you should also make sure that your current backup methodology will work at the DR site, disk array of a similar type type, switches if needed and compatible tape drive hardware. As stated by Patrick you can't used vgimport/vgexport unless you plan on shipping the same disk array or use some sort of SRDF (remote data facility)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2004 11:38 PM
тАО09-03-2004 11:38 PM
Re: Script for transferring LVM Configuration to different server in DR
I will prefer what Sunder has suggested as it saves your pains of looking into all VG's and their configuration and that can be automated too..Whenever you do changes on local site servers, run this script so that changes are reflected on secondary.
Thanks
Prashant\