- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mirror vg00
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
12-01-2005 10:17 AM
12-01-2005 10:17 AM
Thanks for the help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 10:30 AM
12-01-2005 10:30 AM
SolutionNow a script like this one should do the trick:
RAW=/dev/rdsk/c1t5d0 # your new mirror
COOKED=/dev/dsk/c1t5d0 # ditto
LVOLS="lvol1 lvol2 lvol3 lvol4 lvol5 lvol6 lvol7 lvol8" # match your existing vg00 LVOL's
pvcreate -f -B ${RAW}
vgextend /dev/vg00 ${COOKED}
mkboot ${RAW}
mkboot -a "hpux -lq (;0)/stand/vmunix" ${RAW}
for LVOL in ${LVOLS}
do
echo "Mirroring /dev/vg00/${LVOL}"
lvextend -m 1 /dev/vg00/${LVOL}
done
lvlnboot -R
You should also run the
mkboot -a "hpux -lq (;0)/stand/vmunix" original_boot_disk
command because otherwise you actually make you box less likely to boot unattended because now both disks must be present to boot off the primary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 10:34 AM
12-01-2005 10:34 AM
Re: mirror vg00
pvcreate -B /dev/rdsk/c1t0d0 #use real disk
mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?
If you are running 64-bit OS:
# This section may be different for 11i v2
mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?
vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0
# real disk. repeat for other lvols
lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 11:09 AM
12-01-2005 11:09 AM
Re: mirror vg00
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
After reading both suggestions I tried to do the following and it seemed to work fine. Meaning I didnt get any errors.
Pvcreate â B /dev/rdsk/c2t1d0
Mkboot â l /dev/rdsk/c2t1d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t1d0
mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t1d0
mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t1d0
If my understanding is correct I should be doing the following steps. If you see any problems with this please let me know.
vgextend /dev/vg00 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/depot /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0
lvlnboot -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -b /dev/vg00/lvol1
lvlnboot â R
lvlnboot â v
Where do i get the setboot information from?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 11:18 AM
12-01-2005 11:18 AM
Re: mirror vg00
Your last post suggests an error. You should mirror your logical volumes at least beginning in this order:
'lvol1', 'lvol2, 'lvol3'
You *do* want to mirror your primary swap space. After all, you need that to boot and if your primary disk fails, you want the mirrored copy to boot correctly.
With regard to the 'setboot', yes, be sure to set the alternate boot path after you mirror. Again, you want the secondary disk to automatically bring your server up.
# setboot -a
See the manpages for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 11:26 AM
12-01-2005 11:26 AM
Re: mirror vg00
root: /etc/default ==> bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 524288 197544 324248 38% /
/dev/vg00/lvol1 298928 97592 171440 36% /stand
/dev/vg00/lvol8 4718592 780616 3907264 17% /var
/dev/vg00/lvol7 3538944 1604424 1919432 46% /usr
/dev/vg00/lvol4 212992 8616 202848 4% /tmp
/dev/vg00/depot 2048000 16974 1904094 1% /software
/dev/vg00/lvol6 2719744 2049512 665008 76% /opt
/dev/vg00/lvol5 32768 11448 21200 35% /home
/dev/dsk/c0t0d0 50880 50880 0 100% /cdrom
root: /etc/default ==>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 11:43 AM
12-01-2005 11:43 AM
Re: mirror vg00
No, you won't see '/dev/vg00/lvol2' in a 'bdf' output nor should you record it in 'etc/fstab'. Primary swap is automatically "mounted" at bootup. In fact, if you put it in 'etc/fstab', the next time a 'mount all' was done you see the kernel "complain".
You *can* see it, however, if you do:
# swapinfo -tam
This shows *all* of your current swap devices along with a line for "memory" if you have pseudoswap enabled (you should, but that's a whole other subject).
If you fail to mirror the first three logical volumes of vg00 in the order (1,2,3) then if you do:
# lvlnboot -v
...to see that all is in order, it will appear that the primary swap space (lvol2) isn't mirrored and you won't be able to correct it!
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 12:02 PM
12-01-2005 12:02 PM
Re: mirror vg00
Thanks for the info. I did everything the way I had it listed above with the one exception of doing an lvextend on lvol2 after lvol1 and before lvol3. Here is the lvlnboot -v info.
root: /dev/vg00 ==> lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t0d0 (0/1/1/0.0.0) -- Boot Disk
/dev/dsk/c2t1d0 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t0d0
/dev/dsk/c2t1d0
Root: lvol3 on: /dev/dsk/c2t0d0
/dev/dsk/c2t1d0
Swap: lvol2 on: /dev/dsk/c2t0d0
/dev/dsk/c2t1d0
Dump: lvol2 on: /dev/dsk/c2t0d0, 0
root: /dev/vg00 ==>
Does this look correct? The only thing I havent done is the setboot. When I do a setboot this is what i get.
root: /dev/vg00 ==> setboot
Primary bootpath : 0/1/1/0.0.0
Alternate bootpath : 0/0/2/0.3.0
Autoboot is ON (enabled)
Autosearch is ON (enabled)
Is this the correct command for setboot?
setboot -a 0/1/1/0.1.0
or is it
setboot -a 01.1.0.1.0
Here is the ioscan -fnC disk info for those two drives.
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 12:21 PM
12-01-2005 12:21 PM
Re: mirror vg00
The 'lvlnboot' output looks good (showing both disk for each logical volume), but to be safe, since you say you didn't mirror in the "1,2,3" order, do:
# for N in 1 2 3 4 5 6 7 8
> do
> 'vgreduce -m 0 /dev/vg00/lvol${N} /dev/dsk/c2t1d0
done
# vgreduce -m 0 /dev/vg00/depot /dev/dsk/c2t1d0
...and then mirror everything back in order.
Your setboot command should look like:
# setboot -a 0/1/1/0.1.0
The best test of your exercise is to boot from the mirrored disk.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 04:11 AM
12-02-2005 04:11 AM
Re: mirror vg00
I did do the the lvextend for the lvol1 - lvol8 in order. Earlier I had asked about doing them prior to doing the lvextends. That means that everything should be fine correct? Here is the listing of the lvextends:
root: /dev/vg00 ==> vgextend /dev/vg00 /dev/dsk/c2t1d0
Volume group "/dev/vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol2" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol5" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol6" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol7" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root: /dev/vg00 ==> lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t1d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol8" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
One question I do have with doing this mirroring. If there are other lvol's on the vg00 primary drive and I dont extend them onto the second/mirror drive can i still do that at a later date?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 05:10 AM
12-02-2005 05:10 AM
Re: mirror vg00
You asked, "If there are other lvol's on the vg00 primary drive and I dont extend them onto the second/mirror drive can i still do that at a later date?".
The answer is "yes.". All that I was trying to urge is, why wouldn't you want to mirror every logical volume in your vg00 disk? After all, the goal is high-availability and that means everything possible is ready on a mirror copy when/if you need it!
Regards!
...JRF...