- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lvm and dd
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
07-24-2000 10:32 AM
07-24-2000 10:32 AM
lvm and dd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 10:40 AM
07-24-2000 10:40 AM
Re: lvm and dd
If you are not concerned with being able to boot off the other disk, dd or cpio will work fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 10:49 AM
07-24-2000 10:49 AM
Re: lvm and dd
What do you say about:
1. making separated mount points and logical volumes for your application
2. build from scrach in the second disk (try to boot from it, if work, add it as Alternative boot path), keep on it a separated fstab, and over night cpio just the application files...
Ignite (free software with HP11, as it was already said it is another option... Or ... Service Guard but this one is even more expensive than Mirror....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 11:32 AM
07-24-2000 11:32 AM
Re: lvm and dd
pvcreate -fB /dev/rdsk/c*t*d*
mkboot /dev/dsk/c*t*d*
vgcreate vg01 /dev/dsk/c*t*d*
create the lvols and filesystems on vg01 to replicate vg00
sed 's/vg00/vg01/g' /etc/fstab > /etc/fstab.root
vi /etc/fstab to add entries for vg01. Have these filesystems mount under /newroot. Make sure the / equivalent mounts first.
setboot -a
lvlnboot -b /dev/vg01/lvol
lvlnboot -r /dev/vg01/lvol3
lvlnboot -s /dev/vg01/lvol2
lvlnboot -d /dev/vg01/lvol2
lvlnboot -v to verify settings.
Then script your periodic data transfers:
mount -a (to mount your vg01 directories)
for FS in / /var /usr /opt /home /stand /tmp
do
cd $FS
find . -depth -xdev | cpio -pdumx /newroot$FS
done
cp /newroot/etc/fstab.root /newroot/etc/fstab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 11:32 AM
07-24-2000 11:32 AM
Re: lvm and dd
Seen apart from Mirror/UX, which whould be the best solution for Disk-HW defects, your approach is ok.
In your case, I would prefer "find ...| cpio" over dd.
The reason is that it allows different disk sizes and is might be even faster if the disk is not filled completly, besides it aut
omatically "defragments" the new FS.
To not copy some directories with find | cpio, use "find . ! -path './Omitt_this_dir/*' -depth | cpio -pdmux
To make sure your disk is really bootable you should check a few things (Assuming your real root/boot VG vg00 is disk c0t6d0 and your standby VG should be VG01 which corresponds to disk c0t5d0)
1.) check that your new disk can be booted (PV must have been prepared with "pvcreate -B") and that it contains a boot-loader(see mkboot, check with "lifls -l /dev/rdsk/c0t6d0")
2.) Create LVs on VG01 same size and Options as on VG00, take care, lvol1+2+3 (/stand, prim. swap/dump and /-FS) MUST be contigous and have bad-block relocate off
3.) create FS in VG01/lvol* like on VG00, lvol1 =^= /stand =^= HFS, Rest vxfs)
4.) mkdir /disk
5.) mount /dev/vg01/lvol3 /disk
6.) create Mount-Points under /disk for each FS (i.e. mkdir /disk/stand /disk/tmp /disk/var /disk/usr /disk/opt /disk/home)
7.) mount -F hfs /vg01/lvol1 /disk/stand
8.) mount all other FSs ( e.g.. mount /dev/vg01/lvolX /disk/YY, ...)
9.) cd / ; find . ! -path './disk/*' -depth | cpio -pdmux /disk
10.) change all entries in /disk/etc/fstab from vg00 to vg01
11.) setboot -a HW-Path_of_your_alternate_disk # check with ioscan
12.) lvlnboot -r /dev/vg01/lvol3 ( or whatever LV / really is)
13.) lvlnboot -s /dev/vg01/lvol2 # or real swap-lvol
14.) lvlnboot -b /dev/vg01/lvol1
15.) lvlnboot -d /dev/vg01/lvol_like_swap
check if bootable wih lvlnboot -v vg01, test booting from this disk !!
Hope it helps,
Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2000 05:22 PM
07-24-2000 05:22 PM
Re: lvm and dd
The reason that dd works for Sun/Solaris is you dump slice 2, which is the whole disk. This also works for HP-UX dd, but you can not do so by logical volume. I.E.
dd if=/dev/dsk/c0t1d0s2 of=/dev/dsk/c0t3d0s2,
and your disk is copied. You can do slices separate too, but usually whole disks are mirrored. I have successfully dumped a whole 9Gb SCSI in HPUX by
dd if=/dev/rdsk/c0t1d0 of=/dev/rdsk/c0t2d0.
this will take care of the boot area, and all lv's, but can not be made active while the other disk is too. The LV's will have the be identical even in name.
The downside is, the only way to test this is to down your system, and boot from the second disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2000 05:52 AM
07-25-2000 05:52 AM
Re: lvm and dd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2000 11:26 PM
07-25-2000 11:26 PM
Re: lvm and dd
Ive just successfully completed the following;
To create an image backup of a system disk (without using the approved methods; ignite or mirror/ux);
dd if=/dev/rdsk/c0t9d0 of=/dev/rdsk/c0t8d0 bs=2k
c9t0d0 is my system disk and c0t0d8 is a completely unused disk, same model and size (essential). Then I rebooted the server, removed the Jamaica disk on SCSI 9 and replaced the backup copy with it (so the boot disk is still on SCSI 9 and thus all the device info is correct) and rebooted successfully off it.
The only problem is that it took 10.5 hours to dd (on a 9GB disk) - because of using such a small block size but you must use 2k to make the copy bootable.
It would probably be quicker to have the second disk partially mounted and use find+cpio as mentioned earlier to make and keep the backup copy in sync rather than using dd, but using dd at least it is an exact copy - apart from what may have changed during the 10.5 hours it took to dd, but as long as no apps running then only a few logfiles etc. should have been modified.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2000 11:57 PM
07-25-2000 11:57 PM
Re: lvm and dd
However, when you want to switch to this disk you either have to change its SCSI address to that of the original disk, which can be messy, or boot first in maintenance mode ("hpux -lm" at the "ISL>"-prompt) and destroy and relink the volumes with "lvrmboot" and "lvlnboot" commands respectively and reboot. If you don't either, you'll get panic "No swap device".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2000 12:07 AM
07-26-2000 12:07 AM
Re: lvm and dd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2000 01:36 AM
07-26-2000 01:36 AM
Re: lvm and dd
Dragan is correct, you dont need to use a miserly block size of 2k, thats for making tapes bootable! Using a blocksize of 1024k it took 25 minutes to make the backup copy (9Gb disk). The 2 disks were on the same bus though, if on separate bus'es that time should be halved or more.
Not only is this the simplest way to make an image backup but also the fastest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2000 07:59 AM
07-26-2000 07:59 AM
Re: lvm and dd
As mentioned above, you can swap the physical drive locations to boot cleanly off of the "copy". IF you have hot swappable drives this might not be an issue for you. Personally, I dislike solutions that require physical access to devices for implementation. An emergency root disk created with LVM can be booted from simply by specifying the path with setboot. I find this to be a more robust (and remotely available) solution. I also find it is easier to talk a remote operator through repointing a boot path (in the event of a hard crash recovery need) than to talk them through a disk swap.
YMMV, of course.