HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: disk copy procedure in HPUX
Operating System - HP-UX
1834936
Members
2197
Online
110071
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
02-17-2005 08:17 AM
02-17-2005 08:17 AM
Hi all,
Assume i have HPUX server with one single hard disk.I need the procedure to copy this disk to another and make it as bootable if the first one fails(something like mirroring).I dont have Mirror UX installed.Let me know how to do this by dd command and also let me know the other way if exists.
regards
shankar
Assume i have HPUX server with one single hard disk.I need the procedure to copy this disk to another and make it as bootable if the first one fails(something like mirroring).I dont have Mirror UX installed.Let me know how to do this by dd command and also let me know the other way if exists.
regards
shankar
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 08:48 AM
02-17-2005 08:48 AM
Solution
Here is the manual way to create a secondary bootable device as a copy of the primary root disk (not a mirror).
Example:
primary disk= /dev/dsk/c0t6d0
seconday disk= /dev/dsk/c4t6d0
mkdir /dev/vgbroot
mknod /dev/vgbroot group c 64 0x020000
Note: make sure minor node is unique - your choice.
pvcreate -fB /dev/rdsk/c4t6d0
mkboot /dev/rdsk/c4t6d0
mkboot -a "hpux -lq" /dev/rdsk/c4t6d0
mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p HPUX -p AUTO -p LABEL -p PAD
/dev/rdsk/c0t8d0
updatediaglif2 it is 64 bit kernel.
lifcp /dev/rdsk/c4t6d0:AUTO -
Note: this is to confirm your AUTO file is ok.
vgcreate /dev/vgbroot /dev/dsk/c4t6d0
lvcreate -L {sizeofstand} -s y -C y -r n -n \ bstand /dev/vgbroot
lvcreate -L {sizeofswap} -s y -C y -c n -r n\ -M n -n bswap /dev/vgbroot
lvcreate -L {sizeofroot} -s y -C y -r n -n broot /dev/vgbroot
lvcreate -L {sizeofusr} -s y -n busr \ /dev/vgbroot
lvcreate -L {sizeoftmp} -s y -n btmp \ /dev/vgbroot
Continue in this manner for every lvol on your primary root disk matching the order on the disk, the size and using any naming convention you want (e.g. blvol1, blvol2, etc) I like broot, bswap, etc. Likewise the volume group can be any name (vgbroot, vg02, vgaltboot, etc)
***Next steps are important or you won't boot from the new disk.
lvlnboot -b /dev/vgbroot/bstand
lvlnboot -r /dev/vgbroot/broot
lvlnboot -s /dev/vgbroot/bswap
lvlnboot -d /dev/vgbroot/bswap
lvlnboot -v
check the output should have vg00 and vgbroot as bootable volume groups.
dd all the lvols on the primary disk to the lvols on the second disk. You can also mount and use cpio if you wish.
Example:
dd if=/dev/vg00/rlvol1 of=/dev/vgbroot/rbstand bs=64k (or whatever bs you want to use)
After your dd's or cpio's are complete, then fsck your filesystems.
Need to edit the fstab on the 2d disk so that it will properly mount file systems.
mkdir /mnt
mount /dev/vgbroot/broot /mnt
cd /mnt/etc
cp fstab Ofstab
edit /mnt/etc/fstab
change the "vg00" to "vgbroot" for all the file systems you put on the second bootable device. Save the file. Also copy the file to /mnt/etc/Bfstab.
umount /dev/vgbroot/broot
You should now be able to boot to the second bootable device (either use setboot -p to change you boot path or interrupt the boot and select the second disk boot path). After that the system should come up and run and include all your other mount points, applications, etc.
This process can be automated and changed, etc.
It has saved us many times and shortened what could have been major outages to a simple reboot.
Example:
primary disk= /dev/dsk/c0t6d0
seconday disk= /dev/dsk/c4t6d0
mkdir /dev/vgbroot
mknod /dev/vgbroot group c 64 0x020000
Note: make sure minor node is unique - your choice.
pvcreate -fB /dev/rdsk/c4t6d0
mkboot /dev/rdsk/c4t6d0
mkboot -a "hpux -lq" /dev/rdsk/c4t6d0
mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p HPUX -p AUTO -p LABEL -p PAD
/dev/rdsk/c0t8d0
updatediaglif2 it is 64 bit kernel.
lifcp /dev/rdsk/c4t6d0:AUTO -
Note: this is to confirm your AUTO file is ok.
vgcreate /dev/vgbroot /dev/dsk/c4t6d0
lvcreate -L {sizeofstand} -s y -C y -r n -n \ bstand /dev/vgbroot
lvcreate -L {sizeofswap} -s y -C y -c n -r n\ -M n -n bswap /dev/vgbroot
lvcreate -L {sizeofroot} -s y -C y -r n -n broot /dev/vgbroot
lvcreate -L {sizeofusr} -s y -n busr \ /dev/vgbroot
lvcreate -L {sizeoftmp} -s y -n btmp \ /dev/vgbroot
Continue in this manner for every lvol on your primary root disk matching the order on the disk, the size and using any naming convention you want (e.g. blvol1, blvol2, etc) I like broot, bswap, etc. Likewise the volume group can be any name (vgbroot, vg02, vgaltboot, etc)
***Next steps are important or you won't boot from the new disk.
lvlnboot -b /dev/vgbroot/bstand
lvlnboot -r /dev/vgbroot/broot
lvlnboot -s /dev/vgbroot/bswap
lvlnboot -d /dev/vgbroot/bswap
lvlnboot -v
check the output should have vg00 and vgbroot as bootable volume groups.
dd all the lvols on the primary disk to the lvols on the second disk. You can also mount and use cpio if you wish.
Example:
dd if=/dev/vg00/rlvol1 of=/dev/vgbroot/rbstand bs=64k (or whatever bs you want to use)
After your dd's or cpio's are complete, then fsck your filesystems.
Need to edit the fstab on the 2d disk so that it will properly mount file systems.
mkdir /mnt
mount /dev/vgbroot/broot /mnt
cd /mnt/etc
cp fstab Ofstab
edit /mnt/etc/fstab
change the "vg00" to "vgbroot" for all the file systems you put on the second bootable device. Save the file. Also copy the file to /mnt/etc/Bfstab.
umount /dev/vgbroot/broot
You should now be able to boot to the second bootable device (either use setboot -p to change you boot path or interrupt the boot and select the second disk boot path). After that the system should come up and run and include all your other mount points, applications, etc.
This process can be automated and changed, etc.
It has saved us many times and shortened what could have been major outages to a simple reboot.
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 08:54 AM
02-17-2005 08:54 AM
Re: disk copy procedure in HPUX
thanks a lot..!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 01:35 PM
02-17-2005 01:35 PM
Re: disk copy procedure in HPUX
if you use 'dd', i suggest switch to single user mode.
primary: /dev/rdsk/c1t12d0
second: /dev/rdsk/c0t12d0
#dd if=/dev/rdsk/c1t12d0 of=/dev/rdsk/c0t12d0 bs=256k
primary: /dev/rdsk/c1t12d0
second: /dev/rdsk/c0t12d0
#dd if=/dev/rdsk/c1t12d0 of=/dev/rdsk/c0t12d0 bs=256k
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP