- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to Make a "dd-copy" Totally Bootable
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-20-2003 05:56 AM
10-20-2003 05:56 AM
How to Make a "dd-copy" Totally Bootable
If I do a dd-copy of my system boot disk (containing wholly all the OS partitions. ie. root, swap, var, tmp...), what subsequent steps should I do on it so it can be an independent "backup boot" environment -- wihout actually booting from it in maintenance mode?
.
Most root backup routines do dd of each LVOL while the approach that I'd like to take is the Lifeboat method (per A. Clay) and which we are using on Solaris. As the servers I manage are in totally lights out data centers, popping out the dd-clone and inserting it in the failed primary's slot is out of the question. And please no suggestions as in make an ignite recovery -- which we are already using.
.
What I'd like to have is a straight though process that will post-prep this dd-copy so it can be booted independetly. Any "scripts" that anyone can share or that can server as my foundation to come up with my own script?
.
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2003 08:19 AM
10-20-2003 08:19 AM
Re: How to Make a "dd-copy" Totally Bootable
Again, I didnt write it, but a VERY good script for creating an spare boot disk.
---------------- cut here -------------------
# cat vgbroot.script
#!/usr/bin/ksh
exec >/usr/localcw/opt/broot/vgbroot.output 2>&1
mkdir /broot
mkdir /dev/vgbroot
mknod /dev/vgbroot/group c 64 0x030000
pvcreate -fB /dev/rdsk/c0t2d0
mkboot /dev/rdsk/c0t2d0
mkboot -a "hpux -lq" /dev/rdsk/c0t2d0
lifcp /dev/dsk/c0t2d0:AUTO -
vgcreate /dev/vgbroot /dev/dsk/c0t2d0
lvcreate -s y -C y -r n -n bstand vgbroot
lvextend -L 1 /dev/vgbroot/bstand /dev/dsk/c0t2d0
lvextend -L 300 /dev/vgbroot/bstand
lvlnboot -r /dev/vgbroot/bstand /dev/vgbroot
lvlnboot -v
umount /broot/bstand
lvcreate -s y -C y -r n -n bswap vgbroot
lvextend -L 1 /dev/vgbroot/bswap /dev/dsk/c0t2d0
lvextend -L 1000 /dev/vgbroot/bswap
lvlnboot -s /dev/vgbroot/bswap /dev/vgbroot
lvlnboot -v
grep -q "/dev/vgbroot/bswap swap swap pri=0 0 0 0" /etc/fstab
if (( $? != 0 ))
then
print "/dev/vgbroot/bswap swap swap pri=0 0 0 0" >> /etc/fstab
fi
umount /broot/bswap
lvcreate -s y -C y -r n -n broot vgbroot
lvextend -L 1 /dev/vgbroot/broot /dev/dsk/c0t2d0
lvextend -L 252 /dev/vgbroot/broot
lvlnboot -r /dev/vgbroot/broot /dev/vgbroot
lvlnboot -v
umount /broot/broot
lvcreate -s y -C y -n bopt vgbroot
lvextend -L 1 /dev/vgbroot/bopt /dev/dsk/c0t2d0
lvextend -L 1200 /dev/vgbroot/bopt
mkdir /broot/bopt
newfs /dev/vgbroot/rbopt
mount /dev/vgbroot/bopt /broot/bopt
grep -q "/dev/vgbroot/bopt /broot/bopt vxfs delaylog 0 2" /etc/fstab
if (( $? != 0 ))
then
print "/dev/vgbroot/bopt /broot/bopt vxfs delaylog 0 2" >> /etc/fstab
fi
umount /broot/bopt
lvcreate -s y -C y -n busr vgbroot
lvextend -L 1 /dev/vgbroot/busr /dev/dsk/c0t2d0
lvextend -L 1200 /dev/vgbroot/busr
mkdir /broot/busr
newfs /dev/vgbroot/rbusr
mount /dev/vgbroot/busr /broot/busr
grep -q "/dev/vgbroot/busr /broot/busr vxfs delaylog 0 2" /etc/fstab
if (( $? != 0 ))
then
print "/dev/vgbroot/busr /broot/busr vxfs delaylog 0 2" >> /etc/fstab
fi
umount /broot/busr
lvcreate -s y -C y -n bvar vgbroot
lvextend -L 1 /dev/vgbroot/bvar /dev/dsk/c0t2d0
lvextend -L 1600 /dev/vgbroot/bvar
mkdir /broot/bvar
newfs /dev/vgbroot/rbvar
mount /dev/vgbroot/bvar /broot/bvar
grep -q "/dev/vgbroot/bvar /broot/bvar vxfs delaylog 0 2" /etc/fstab
if (( $? != 0 ))
then
print "/dev/vgbroot/bvar /broot/bvar vxfs delaylog 0 2" >> /etc/fstab
fi
umount /broot/bvar
lvcreate -s y -C y -n bopenv vgbroot
lvextend -L 1 /dev/vgbroot/bopenv /dev/dsk/c0t2d0
lvextend -L 2000 /dev/vgbroot/bopenv
mkdir /broot/bopenv
newfs /dev/vgbroot/rbopenv
mount /dev/vgbroot/bopenv /broot/bopenv
grep -q "/dev/vgbroot/bopenv /broot/bopenv vxfs delaylog 0 2" /etc/fstab
if (( $? != 0 ))
then
print "/dev/vgbroot/bopenv /broot/bopenv vxfs delaylog 0 2" >> /etc/fstab
fi
umount /broot/bopenv
lvlnboot -b /dev/vgbroot/bstand
lvlnboot -r /dev/vgbroot/broot
lvlnboot -s /dev/vgbroot/bswap
lvlnboot -v /dev/vgbroot
vgcfgbackup vgbroot
cp /etc/fstab /etc/fstab.19042002
grep -v ^/dev/vgbroot /etc/fstab >/tmp/fstab
cp /tmp/fstab /etc/fstab
echo "-------- dd copy completed - psg"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2003 08:21 AM
10-20-2003 08:21 AM
Re: How to Make a "dd-copy" Totally Bootable
no points for this post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2003 08:38 AM
10-20-2003 08:38 AM
Re: How to Make a "dd-copy" Totally Bootable
The script "looks" familiar ;^) however, the idea is to do a "whole disk copy" via dd -- not dd's of individual lvols and an intermediate "vgbroot" volume group.
.
Whole disk copies (ie. dd if=/dev/rdsk/c0t0d0 of=/dev/rdsk/c2/t1/d0 bs=64k) - is supposed to create an identical clone (so all boot info, partitions, etc... are copied).. What I want is (if it is at all possible..) to do some post-dd processing so I could boot off this disk without an intermediate vgbroot configuration on the running OS..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2003 02:12 AM
10-21-2003 02:12 AM
Re: How to Make a "dd-copy" Totally Bootable
This will make a bootable, Identical copy of your root disk.
This is a very safe way to do what you are looking to do and it is well tested.
We use this as a backup spare root disk incase both our primary and mirror disks fail and it is a good idea to have it on different controler as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2003 03:10 AM
10-21-2003 03:10 AM
Re: How to Make a "dd-copy" Totally Bootable
While it was common to use 'dd' for make boot disks, DEC used to do it for example, in HP-UX the problem is with the bootlif. So while you can 'dd' the whole disk, for some reasons the bootlif seems to get hosed.
I think the block size might be the issue. For raw blocks, 512, for tar, default = 2048.
Use 'lifls' and 'lifcp' to inspect.
# lifls /dev/rdsk/cXtYdZ
Should see 6 to 18 files including AUTO. Depends if diagnostics are loaded. A lot of SA's don't load diag.s on the alternate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 08:45 AM
10-22-2003 08:45 AM
Re: How to Make a "dd-copy" Totally Bootable
The broot disk is a single disk unmirrored unmounted and not in the lvmtab nor in the /etc/fstab... purely a spare disk.
I think the point I was trying to make is this: The root disks are too sensitive to use dd as a copying method. Raw disk copying, is too crude a method for the root disks, imho.
The method I showed, is proven to work and wont take any longer than the dd method if that would even work that way.
My example provided will do everything he was asking for... not sure why dd is the only consideration??? and mine can be done online via cron or commandline...