1829496 Members
2318 Online
109991 Solutions
New Discussion

Disk Mirroring Error

 
Amonario Ramon_1
Occasional Contributor

Disk Mirroring Error

I am trying to mirror one of the HD that I have to my current OS that is running and this is the process that I am using:
# pvcreate —f —B /dev/rdsk/c1t0d0
# vgextend /dev/vg00 /dev/dsk/c1t0d0
# mkboot /dev/rdsk/c1t0d0
# mkboot -a “hpux —lq” /dev/rdsk/c1t0d0
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p LABEL /dev/rdsk/c1t0d0
# for i in /dev/vg00/lvol*
do
lvextend —m 1 $i /dev/rdsk/c1t0d0
done
When I run the for/done I get this error:
lvextend: Physical volume "/dev/rdsk/c1t0d0" is not a block special file.
When I run ioscan -fnC disk I know that I am using the correct HD to mirror.
Any ideas why I can not per
5 REPLIES 5
Michael Tully
Honored Contributor

Re: Disk Mirroring Error

When running the lvextend command, you must use /dev/dsk/c1t0d0 not /dev/rdsk/c1t0d0

You must use block device
Anyone for a Mutiny ?
Sanjay_6
Honored Contributor

Re: Disk Mirroring Error

Hi,

this Need correction,

# for i in /dev/vg00/lvol*
do
lvextend â m 1 $i /dev/rdsk/c1t0d0
done

use /dev/dsk/c1t0d0 in place of /dev/rdsk/c1t0d0

Hope this helps.

Reg
Sridhar Bhaskarla
Honored Contributor

Re: Disk Mirroring Error

Hi Amonario,

Not a good idea to run 'for i in /dev/vg00/lvol*' . If you have logical volumes from lvol1 - lvol12, then lvol11 may appear after lvol1. If you want to use 'for' then use for i in 1 2 3 4 5 6 7 etc.,

Specify /dev/dsk not /dev/rdsk as said before.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Disk Mirroring Error

And to add to the for i in /dev/vg00/lvol* comment, you should note that that list will probably be in lexical order so that lvol1, lvol10, lvol11, lvol1x will come before lvol2 and the first 3 LVOLS must be allocated first and in strict contigious order. The others don't matter but the first three do.

You should really do somethings like this:
LVOLS="lvol1 lvol2 lvol3 lvol4 ... lvol9"
for i in ${LVOLS}
do
....
done

so that you have absolute control over the order of LVOL creation.
If it ain't broke, I can fix that.
Co van Berkel
Regular Advisor

Re: Disk Mirroring Error

To add to the for i in /dev/vg00/lvol* comment..

You can also do somethings like this:

for i in `ls /dev/vg00/lvol*|awk '{print substr($1,1,length($1)}'|sort -n`
do
....
lvextend -m 1 /dev/vg00/lvol${i} /dev/dsk/c1tod0
done

so than the order of LVOL will be correct.

Greetings CvB