Disk duplicate in 10.20


 
Thread Tools Search this Thread
Operating Systems HP-UX Disk duplicate in 10.20
# 1  
Old 12-18-2006
Disk duplicate in 10.20

HI:
I know this topic already exist in this forum but not exactly with my problem.
I want to duplicate a disk , my source disk is like 2gb size, while the new disk is like 36 gb size.
The problems:

When I use the command dd it fails, I think because the disk sizes, and the sizes of the sectors.īI canīt find any smaller disk!!!

I can use any ignite tools because I have 10.20, and I canīt upgrade to 11, because I have and application that only runs in 10.20

CAn any one help me? does dd has an extra option for different disk sizes??
Thanks alot.
# 2  
Old 12-26-2006
What do you mean by duplicating a disk ?. Does it mean duplicating data in a disk ?. If the latter is the case, you may use MirrorUX to have a mirror copy made of all the lvols on the disk to the 36 GB drive.

OR

Just create a testVG on the 36GB drives and give all the filesystems a "/duplicate" prefix on the new disk and do a cp -R or cpio -pxdm.

Regds,

Kaps
# 3  
Old 12-28-2006
Yes I want to duplicate the data on the disk, but is an operating system disk ( including the boot part), Do you think if I use cp -R to duplicate it, then I can use and I can boot with it?
Also I am tryng to duplicate a disk that is 36 GB of size but currently It only has 4 GB of data. But when I use the "dd" command it takes like 20 hours to duplicate it. What can i do to make it faster?
Thanks
# 4  
Old 12-28-2006
pmoren, a plain cp -R will copy files across, but a boot disk has a lot more than just a bunch of files. Things like the LIF area, the boot block and such will not get copied across. You won't be able to boot from that disk.
# 5  
Old 12-28-2006
You can still use cp -R, but it has very high risk associated with this. Being a boot disk , you will need to re-define the BDRA.

Easiest would be to go for Mirror UX [ It is a priced product ]

Regds,

Kaps
# 6  
Old 01-11-2007
Thank you guys for your answers.
I have this procedure which instead of duplicating all the disk it duplicates volume group by volume group. It is very good because it saves a lot time ( I cant stop my servers for long periods) I did it with smaller disk and it worked very good, but now that I am tryng to duplicate one disk of 4 gigas into a 36 gigas its fails, I guess this happens because the volume group size is bad defined.

THIS IS THE ORIGINAL PROCEDURE THAT GIVE ME HP:
1) Initialize the disk and make it bootable
pvcreate -B /dev/rdsk/c1t6d0
Note: the -B parameter tells pvcreate that this will be a bootable
disk.
mkboot /dev/dsk/c1t6d0
mkboot -a "hpux" /dev/rdsk/c1t6d0
2) Create the volume group
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgcreate /dev/vg01 /dev/dsk/c1t6d0
NOTA : puede ser necesario utilizar esta opcion para limitar el volum group a 4 megas:
vgcreate -s 8 /dev/vg01 /dev/dsk/c0t0d0


3) Find the size of each logical volume in vg00
vgdisplay -v /dev/vg00 | more
look at LV Size (Mbytes) for each logical volume and note it.
Note: this example will use these value:
lvol1 84M
lvol2 256M
lvol3 140M
lvol4 500M
lvol5 64M
lvol6 20M
lvol7 500M
lvol8 500M
Note: The size of the new logical volumes needs to be exactly the
same as the size of the logical volumes on the primary root disk.
4) Create the first 3 logical volumes contiguous (needed by the system)
lvol1:
lvcreate -L 84 -C y -r n /dev/vg01
lvol2:
lvcreate -L 256 -C y -r n /dev/vg01
lvol3:
lvcreate -L 140 -C y -r n /dev/vg01
5) Now create the other logical volumes
lvol4:
lvcreate -L 500 /dev/vg01
lvol5:
lvcreate -L 64 /dev/vg01
lvol6:
lvcreate -L 20 /dev/vg01
lvol7:
lvcreate -L 500 /dev/vg01
lvol8:
lvcreate -L 500 /dev/vg01
6) Copy each logical volume except the swap which is usually lvol2.
dd if=/dev/vg00/rlvol1 of=/dev/vg01/rlvol1 bs=1024k
dd if=/dev/vg00/rlvol3 of=/dev/vg01/rlvol3 bs=1024k
dd if=/dev/vg00/rlvol4 of=/dev/vg01/rlvol4 bs=1024k
dd if=/dev/vg00/rlvol5 of=/dev/vg01/rlvol5 bs=1024k
dd if=/dev/vg00/rlvol6 of=/dev/vg01/rlvol6 bs=1024k
dd if=/dev/vg00/rlvol7 of=/dev/vg01/rlvol7 bs=1024k
dd if=/dev/vg00/rlvol8 of=/dev/vg01/rlvol8 bs=1024k
7) Verify the integrity of all the new volume except swap.
Note: The following lines are base on a system with vxfs
filesystems except for /stand (lvol1) which needs to be hfs.
fsck -F hfs /dev/vg01/rlvol1
fsck -F vxfs /dev/vg01/rlvol3 (NOTA puede ser que la opcion correcta se hfs en lugar vxfs , al menos asi funciona)
fsck -F vxfs /dev/vg01/rlvol4
fsck -F vxfs /dev/vg01/rlvol5
fsck -F vxfs /dev/vg01/rlvol6
fsck -F vxfs /dev/vg01/rlvol7
fsck -F vxfs /dev/vg01/rlvol8
8) Now configure the Boot Data Reserved Area (BDRA)
Note: The following commands assume that /stand is lvol1,
swap is lvol2 and / is lvol3
lvlnboot -b /dev/vg01/lvol1 /dev/vg01
lvlnboot -r /dev/vg01/lvol3 /dev/vg01
lvlnboot -s /dev/vg01/lvol2 /dev/vg01
lvlnboot -d /dev/vg01/lvol2 /dev/vg01
9) Modify the fstab file on the new disk.
a) If /tmp_mnt doesn't exist create it
mkdir /tmp_mnt
b) Mount the new root filesystem on /tmp_mnt
mount /dev/vg01/lvol3 /tmp_mnt
c) change to etc directory on the new disk.
cd /tmp/etc
d) Modify all occurence of vg00 in the fstab for vg01
sed "s/vg00/vg01/" fstab > fstab.out
mv fstab fstab.BAK
mv fstab.out fstab
e) Unmount the new root filesystem
cd /
umount /tmp_mnt


WHEN I TRY TO DO, THIS IS THE LOG:

pvcreate -B /dev/rdsk/c0t0d0
mkboot /dev/dsk/c0t0d0
mknod /dev/vg06/group c 64 0x010000

vgcreate /dev/vg01 /dev/dsk/c0t4d0
Increased the number of physical extents per physical volume to 8750.
vgcreate: Volume group "/dev/vg01" could not be created:
File too large

( here is where is the problem, so I should change the default size using 8, but I guess it is not correct)

vgcreate -e 2048 /dev/vg01 /dev/dsk/c0t4d0
Increased the number of physical extents per physical volume to 8750.
vgcreate: Volume group "/dev/vg01" could not be created:
File too large
# vgcreate -s 8 /dev/vg01 /dev/dsk/c0t4d0
Increased the number of physical extents per physical volume to 4375.
Volume group "/dev/vg01" has been successfully created.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

( then when I try to create the logical volumen exactly the same size of the original, it fails)

lvcreate -L 100 -C y -r n /dev/vg01
Warning: rounding up logical volume size to extent boundary at size "104" MB.
Logical volume "/dev/vg01/lvol1" has been successfully created with
character device "/dev/vg01/rlvol1".
Logical volume "/dev/vg01/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.con

lvcreate -L 256 -C y -r n /dev/vg01
Logical volume "/dev/vg01/lvol2" has been successfully created with
character device "/dev/vg01/rlvol2".
Logical volume "/dev/vg01/lvol2" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvcreate -L 3
# lvcreate -L 3980 -C y -r n /dev/vg01 (ESTE LO CREO MAS GRANDE POR SI SE REDUCE POR EL TAMAŅO DE LOS EXTENDS)
Warning: rounding up logical volume size to extent boundary at size "3984" MB.
Logical volume "/dev/vg01/lvol3" has been successfully created with
character device "/dev/vg01/rlvol3".
Logical volume "/dev/vg01/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvcreate -L 20 /dev/vg01
Warning: rounding up logical volume size to extent boundary at size "24" MB.
Logical volume "/dev/vg01/lvol4" has been successfully created with
character device "/dev/vg01/rlvol4".
Logical volume "/dev/vg01/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

Despues copie los discos
dd if=/dev/vg00/rlvol1 of=/dev/vg01/rlvol1 bs=1024k
100+0 records in
100+0 records out
# dd if=/dev/vg00/rlvol3 of=/dev/vg01/rlvol3 bs=1024k
3700+0 records in
3700+0 records out
dd if=/dev/vg00/rlvol4 of=/dev/vg01/rlvol4 bs=1024k
20+0 records in
20+0 records out


despues checo la integridad de los volumenes
fsck -F hfs /dev/vg01/rlvol1
** /dev/vg01/rlvol1
** Last Mounted on /stand
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
25 files, 0 icont, 33403 used, 66266 free (18 frags, 8281 blocks)
***** MARKING FILE SYSTEM CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****
al checar el filesystem 3 marco algunos errores:
# fsck -F hfs /dev/vg01/rlvol3
** /dev/vg01/rlvol3
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=88222
OWNER=root MODE=100664
SIZE=20 MTIME=Nov 17 00:04 2005
CLEAR? y

UNREF FILE I=88257
OWNER=root MODE=100600
SIZE=17846 MTIME=Nov 17 00:04 2005
CLEAR? y

UNREF FILE I=88258
OWNER=root MODE=100600
SIZE=456072 MTIME=Nov 17 00:05 2005
CLEAR? y

FREE INODE COUNT WRONG IN SUPERBLK
FIX? y

** Phase 5 - Check Cyl groups
475 BLK(S) MISSING
BAD CYLINDER GROUPS
FIX? y

** Phase 6 - Salvage Cylinder Groups
76198 files, 0 icont, 3072806 used, 633891 free (10491 frags, 77925 blocks)
***** MARKING FILE SYSTEM CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****
#
# fsck -F hfs /dev/vg01/rlvol4
** /dev/vg01/rlvol4
** Last Mounted on /home
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
6 files, 0 icont, 332 used, 19529 free (33 frags, 2437 blocks)
***** MARKING FILE SYSTEM CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****
#
Hago las ligas del master boot
lvlnboot -b /dev/vg01/lvol1 /dev/vg01
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvlnboot -r /dev/vg01/lvol3 /dev/vg01
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvlnboot -s /dev/vg01/lvol2 /dev/vg01
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvlnboot -d /dev/vg01/lvol2 /dev/vg01
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
#
por ultimo cambio la tabla:
# pwd
/tmp_mnt/etc
# sed "s/vg00/vg01/" fstab > fstab.out
# mv fstab fstab.BAK
# mv fstab.out fstab

Then I try to boot whit my new disk. If the original disk still connected it boots and works, if is not connected,the boot fails.Even if I put the new disk in the same SCSI direction than the original, it doesnt boot.
Do you know how can i define the size of a volume group?
Smilie long post.... I hope you can help me.
Thanks, bye
# 7  
Old 01-11-2007
Quote:
Then I try to boot whit my new disk. If the original disk still connected it boots and works, if is not connected,the boot fails.Even if I put the new disk in the same SCSI direction than the original, it doesnt boot.
Its been long since i havent been messing with hp9000 boot issue but here's just a try:
- do not unplug the original disk and connect the second disk (and note its scsi addr)
- reboot the server, interrompt the boot process by pressing any key ...
- then search for all bootable device by typing: 'SEA' for search
- it will list all scsi of bootable devices (along with a 'fast-path')
- identify your second 'disk's fast path' then type: bo 'fast-path'

It will try to boot to the second disk hopefully ...
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

DISK ARRAY PROTECTION SUSPENDED message displayed following disk replacement

Hello, On 4/20/2018, we performed a disk replacement on our IBM 8202 P7 server. After the disk was rebuilt, the SAS Disk Array sissas0 showed a status of degraded. However, the pdisks in the array all show a status of active. We did see a message in errpt. DISK ARRAY PROTECTION SUSPENDED. ... (1 Reply)
Discussion started by: terrya
1 Replies

2. Shell Programming and Scripting

Find duplicate values in specific column and delete all the duplicate values

Dear folks I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
Discussion started by: sajmar
4 Replies

3. Solaris

Df -k command shows duplicate information in Solaris machine, How to get the exact disk space

While getting the total disk space in solaris machine using df -k command, i am getting the same disk info for every user available in that system. Is there any way to remove it. Filesystem 1024-blocks Used Available Capacity Mounted on rpool/ROOT/solaris 573898752... (3 Replies)
Discussion started by: prasankn
3 Replies

4. Shell Programming and Scripting

Find duplicate based on 'n' fields and mark the duplicate as 'D'

Hi, In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'. In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Discussion started by: machomaddy
7 Replies

5. Solaris

( VxVM ) How to add the removed disk back to previous disk group

Previously , i remove the disk by #vxdg -g testdg -k rmdisk testdg02 But i got error when i -k adddisk bash-2.03# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 auto:none - - online invalid c0t1d0s2 auto:none ... (1 Reply)
Discussion started by: waibabe
1 Replies

6. UNIX for Dummies Questions & Answers

How to duplicate a floppy disk

Hi there, I have a boot disk that I'd like to make a copy of. I can't just copy it through windows because windows obviously doesn't recognise the format. What would I have to do in SCO to just simply make a copy of this disk?? (0 Replies)
Discussion started by: zaphs
0 Replies
Login or Register to Ask a Question