HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Mirroring with cpio
Operating System - HP-UX
1832489
Members
4260
Online
110043
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
08-07-2001 12:51 AM
08-07-2001 12:51 AM
Hi All,
Does anybody know of any way you can mirror the system disk's using cpio.
Also what impact doing this would have on the system?
Thanks for any help in Advance,
Colin.
Does anybody know of any way you can mirror the system disk's using cpio.
Also what impact doing this would have on the system?
Thanks for any help in Advance,
Colin.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 01:30 AM
08-07-2001 01:30 AM
Re: Mirroring with cpio
Hello,
I suppose you want a system mirror without using mirror-UX. What i could advise, in order to avoid problems with boot area or whatever, is to use the tool Ignite-UX for such an operation:
- Do a backup of your system by "make_recovery"
- Select a complete free disk and note the Hardware Path
- Boot from the tape containing data from Ignite
- Reinstall your OS on this free disk with right HW Path
You won't see the original disk, but you can boot from both of them on the ISL prompt if once the disk fails.
When the system is in Mutli-user mode,
try to reimport the old "vg00" renaming it and choosing a different major number. (hoping it keeps boot area, and so on)
Then remount all FS with a different root mount point as /save/stand, /save/opt, ...
then do cpio from /opt to /save/opt
...
I don't warrant at all this way of mirroring, but you can try on a test machine if you've got it ! Maybe it works !!!
Regards.
PJA
I suppose you want a system mirror without using mirror-UX. What i could advise, in order to avoid problems with boot area or whatever, is to use the tool Ignite-UX for such an operation:
- Do a backup of your system by "make_recovery"
- Select a complete free disk and note the Hardware Path
- Boot from the tape containing data from Ignite
- Reinstall your OS on this free disk with right HW Path
You won't see the original disk, but you can boot from both of them on the ISL prompt if once the disk fails.
When the system is in Mutli-user mode,
try to reimport the old "vg00" renaming it and choosing a different major number. (hoping it keeps boot area, and so on)
Then remount all FS with a different root mount point as /save/stand, /save/opt, ...
then do cpio from /opt to /save/opt
...
I don't warrant at all this way of mirroring, but you can try on a test machine if you've got it ! Maybe it works !!!
Regards.
PJA
PJA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 02:01 AM
08-07-2001 02:01 AM
Re: Mirroring with cpio
Colin,
If I assume you want a mirrored, bootable, system disk, and you have a spare disk for which you know the h/w path and device name, assume 0/4.1.0 and c1t0d0 respectively:
pvcreate -B /dev/rdsk/c1t0d0
mkdir /dev/vgaltboot
mknod /dev/vgaltboot/group c 64 0x020000
vgcreate /dev/vgaltboot /dev/dsk/c1t0d0
lvcreate -C y -L 48 -r n -n lvol1 /dev/vgaltboot
lvcreate -C y -L 800 -r n -n lvol2 /dev/vgaltboot
lvcreate -C y -L 84 -r n -n lvol3 /dev/vgaltboot
lvcreate -L 600 -r -n n lvol4 /dev/vgaltboot
lvcreate -L 512 -r n -n lvol5 /dev/vgaltboot
lvcreate -L 1024 -r n -n lvol6 /dev/vgaltboot
lvcreate -L 1024 -r n -n lvol7 /dev/vgaltboot
mkboot -l -a "hpux (0/4.1.0;0)/stand/vmunix /dev/rdsk/c1t0d0
lvlnboot -b lvol1 /dev/vgaltboot
lvlnboot -s lvol2 /dev/vgaltboot
lvlnboot -d lvol2 /dev/vgaltboot
lvlnboot -r lvol3 /dev/vgaltboot
mkdir /alt_root
mkdir /alt_var
mkdir /alt_opt
mkdir /alt_usr
mkdir /alt_stand
mkdir /alt_tmp
newfs -F hfs /dev/vgaltboot/rlvol1
newfs -F vxfs /dev/vgaltboot/rlvol3
newfs -F vxfs /dev/vgaltboot/rlvol4
newfs -F vxfs /dev/vgaltboot/rlvol5
newfs -F vxfs /dev/vgaltboot/rlvol6
newfs -F vxfs /dev/vgaltboot/rlvol7
add to /etc/fstab:
/dev/vgaltboot /alt_stand hfs defaults 0 1
/dev/vgaltboot /alt_root vxfs delaylog 0 1
/dev/vgaltboot /alt_opt vxfs delaylog 0 2
/dev/vgaltboot /alt_tmp vxfs delaylog 0 2
/dev/vgaltboot /alt_usr vxfs delaylog 0 2
/dev/vgaltboot /alt_var vxfs delaylog 0 2
copy the data:
mountall
cd /;find . -xdev -depth -print | cpio -puxdm /alt_root
cd /stand;find . -xdev -depth -print | cpio -puxdm /alt_stand
cd /var;find . -xdev -depth -print | cpio -puxdm /alt_var
cd /usr;find . -xdev -depth -print | cpio -puxdm /alt_usr
cd /opt;find . -xdev -depth -print | cpio -puxdm /alt_opt
Create an alternative fstab file:
sed "s/vg00/dummy/" alt_root/etc/fstab | sed "s/vgaltboot/vg00/" | sed "s/dummy/vgaltboot/" > alt_root/etc/fstab/altboot
cp /alt_root/etc/fstab/altboot /alt_root/etc/fstab
You should now be able to boot from the alternative device. Hope I haven't missed anything!!
Rgds, Robin
If I assume you want a mirrored, bootable, system disk, and you have a spare disk for which you know the h/w path and device name, assume 0/4.1.0 and c1t0d0 respectively:
pvcreate -B /dev/rdsk/c1t0d0
mkdir /dev/vgaltboot
mknod /dev/vgaltboot/group c 64 0x020000
vgcreate /dev/vgaltboot /dev/dsk/c1t0d0
lvcreate -C y -L 48 -r n -n lvol1 /dev/vgaltboot
lvcreate -C y -L 800 -r n -n lvol2 /dev/vgaltboot
lvcreate -C y -L 84 -r n -n lvol3 /dev/vgaltboot
lvcreate -L 600 -r -n n lvol4 /dev/vgaltboot
lvcreate -L 512 -r n -n lvol5 /dev/vgaltboot
lvcreate -L 1024 -r n -n lvol6 /dev/vgaltboot
lvcreate -L 1024 -r n -n lvol7 /dev/vgaltboot
mkboot -l -a "hpux (0/4.1.0;0)/stand/vmunix /dev/rdsk/c1t0d0
lvlnboot -b lvol1 /dev/vgaltboot
lvlnboot -s lvol2 /dev/vgaltboot
lvlnboot -d lvol2 /dev/vgaltboot
lvlnboot -r lvol3 /dev/vgaltboot
mkdir /alt_root
mkdir /alt_var
mkdir /alt_opt
mkdir /alt_usr
mkdir /alt_stand
mkdir /alt_tmp
newfs -F hfs /dev/vgaltboot/rlvol1
newfs -F vxfs /dev/vgaltboot/rlvol3
newfs -F vxfs /dev/vgaltboot/rlvol4
newfs -F vxfs /dev/vgaltboot/rlvol5
newfs -F vxfs /dev/vgaltboot/rlvol6
newfs -F vxfs /dev/vgaltboot/rlvol7
add to /etc/fstab:
/dev/vgaltboot /alt_stand hfs defaults 0 1
/dev/vgaltboot /alt_root vxfs delaylog 0 1
/dev/vgaltboot /alt_opt vxfs delaylog 0 2
/dev/vgaltboot /alt_tmp vxfs delaylog 0 2
/dev/vgaltboot /alt_usr vxfs delaylog 0 2
/dev/vgaltboot /alt_var vxfs delaylog 0 2
copy the data:
mountall
cd /;find . -xdev -depth -print | cpio -puxdm /alt_root
cd /stand;find . -xdev -depth -print | cpio -puxdm /alt_stand
cd /var;find . -xdev -depth -print | cpio -puxdm /alt_var
cd /usr;find . -xdev -depth -print | cpio -puxdm /alt_usr
cd /opt;find . -xdev -depth -print | cpio -puxdm /alt_opt
Create an alternative fstab file:
sed "s/vg00/dummy/" alt_root/etc/fstab | sed "s/vgaltboot/vg00/" | sed "s/dummy/vgaltboot/" > alt_root/etc/fstab/altboot
cp /alt_root/etc/fstab/altboot /alt_root/etc/fstab
You should now be able to boot from the alternative device. Hope I haven't missed anything!!
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2001 06:49 AM
08-07-2001 06:49 AM
Solution
Hi Colin:
The best method (and I do it every weekend as a lifeboat) is to copy everything on the disk(s) to identical disk(s) using dd. I do this in addition to mirroring. Mirroring protects me from disk/controller failures but dd'ing to a lifeboat disk protects me from my own stupidity and really bad patches. I have a cron job set to run on each of my machines during the weekend. It's best to do this when the system in relatively quiet. If I need to use the lifeboat, I simply remove the boot disk(s) and replace them with the lifeboat disk(s). The machine comes up and does an fsck (since none of the filesystems were cleanly unmounted) and you're back in business.
You will need to set the SRC and DEST values (in the attached script there are 2 SRC and 2 DEST disks but you can reduce then to 1 each if that is your configuration.)
The beauty of this method is that it gets everything.
Regards, Clay
The best method (and I do it every weekend as a lifeboat) is to copy everything on the disk(s) to identical disk(s) using dd. I do this in addition to mirroring. Mirroring protects me from disk/controller failures but dd'ing to a lifeboat disk protects me from my own stupidity and really bad patches. I have a cron job set to run on each of my machines during the weekend. It's best to do this when the system in relatively quiet. If I need to use the lifeboat, I simply remove the boot disk(s) and replace them with the lifeboat disk(s). The machine comes up and does an fsck (since none of the filesystems were cleanly unmounted) and you're back in business.
You will need to set the SRC and DEST values (in the attached script there are 2 SRC and 2 DEST disks but you can reduce then to 1 each if that is your configuration.)
The beauty of this method is that it gets everything.
Regards, Clay
If it ain't broke, I can fix that.
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