- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mirroring an entire volume group
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
05-10-2003 07:31 AM
05-10-2003 07:31 AM
I have 4 available disks on a seperate SCSI channel that I would like to use as a mirror copy of vg02.
Can I just create another VG and mirror that way or do I need to create PVGs for both sets of disks in the same VG?
Also, the HP's on-line docs recommend using SAM whenever possible to create mirrors. Is this even possible with SAM?
Yes, I do have Mirror Disk/UX installed and running.
Thanks,
David Owens
Ingersoll-Rand
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2003 08:58 AM
05-10-2003 08:58 AM
SolutionMirroring from one SCSI bus to another, (* c1 to c2 *) and from one target on the bus to another, (* c1t3 to c2t3 *) is important because of SCSI bus priorities.
For example mirroring from one disk to another on the same SCSI bus would not only create a single point of failure at the controller but also a I/O performance problem since two different targets with two different bus priorities would be in use, c1t3 to c1t4 for example is not the way to go, nor is c1t3 to c2t4. The targets t3 and t4 have different priorities.
So vgextend in all of those other disks to vg02 and then use lvextend. Use 'pvdisplay' for this.
vgextend /dev/vg## /dev/dsk/cXtYdZ
pvdisplay -v /dev/dsk/cXtYdZ
| more (* review lvols residing on pv *)
lvextend -m 1 /dev/vg##/lvol# /dev/dsk/cXtYdZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2003 09:56 AM
05-10-2003 09:56 AM
Re: Mirroring an entire volume group
MirrorDisk/UX software allows mirroring of logical volumes within volume group ONLY. Thus you need to include these spare disks into VG (vgextend) and then using command line ('lvextend -m' option, do not use SAM) mirror existing or new logical volumes between disks within volume group
Eugeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2003 10:11 AM
05-10-2003 10:11 AM
Re: Mirroring an entire volume group
no, you'll need to add all 8 drives to the same vg.
do I need to create PVGs for both sets of disks in the same VG?
no, you don't need to create pvgs. Using pvgs can make some administration tasks easier to manage but reduces your flexibility. With only 8 discs and 2 logical volumes, I don't think it'll matter if you use them or not.
but if you do stripe your lvs across the 4 disks on one controller. I'd put the set of disk on one controller in one pvg and the set of disks from the other controller in a different pvg.
Also, the HP's on-line docs recommend using SAM whenever possible to create mirrors. Is this even possible with SAM?
I don't know, I've never used SAM to create mirrors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2003 11:00 AM
05-10-2003 11:00 AM
Re: Mirroring an entire volume group
Existing 4 disks in vg01 (say A,B,C,D) on SCSI channel A. The other 4 disks (A2,B2,C2,D2) on SCSI channel B. Now create /etc/lvmpvg ... (see man pages for lvmpvg if not sure of the format of that file). I think it should look like this ..
VG /dev/vg01
PVG pvg1
....
PVG pvg2
....
Before that you would include A2->D2 PVs into you vg01 by vgextending it.
# pvcreate
# vgextend /dev/vg01
and so on ...
Once everything are in place, run vgdisplay to make sure the PVGs are setup. Next thing to do is for you existing LVs (say lvol1 and lvol2) you got to change its behavior to PVG-strict-allocation.
# lvchange -s g /dev/vg01/lvol1
==> repeat for lvol2
Now extend the mirror copy..
# lvextend -m 1 /dev/vg01/lvol1
==> repeat for lvol2
an by doing that the mirrored copies will be placed in pvg2 automatically. Check it by running "pvdisplay" on the disk.
Believe me .. you do not want to use SAM for LVM .. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2003 06:39 PM
05-10-2003 06:39 PM
Re: Mirroring an entire volume group
SAM is useful for getting the commands, if you don't know them.
In the end, its quite cumbersome if you have lots of logical volumes to mirror.
lvextend -m 1 /dev/vg02/lvname /dev/dsk/c1t6d0 /dev/dsk/c-t6do
Thats all you need to do.
I do recommend you have a plan before you start, or you will learn like I did, by building and breaking a ton of mirrors before you're happy with what you get.
Note: These guys above me deserve some points, they gave great detailed answers. My advice is hook them up!
Good Luck.
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
05-11-2003 06:48 AM
05-11-2003 06:48 AM
Re: Mirroring an entire volume group
/dev/dsk/cxtyd0 will be the disk you want to
create a mirror copy for the existing root disk inside the
same vg, vg00
if cxtyd0 already belongs to vg00, pls do a
vgreduce to free this disk first
# vgreduce /dev/vg00 /dev/dsk/cxtyd0
1) pvcreate -B /dev/rdsk/cxtyd0
2) mkboot -l /dev/rdsk/cxtyd0
3) mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cxtyd0
4) vgextend /dev/vg00 /dev/dsk/cxtyd0
5) lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cxtyd0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/cxtyd0
lvextend -m 1 .... lvol3 ..
...
...
6) pls check for if:
lvol1 on /stand (this is boot lv)
lvol3 on / (this is root lv)
lvol2 is swap lv
7) lvlnboot -r /dev/vg00/lvol3 (root on /)
8) lvlnboot -s /dev/vg00/lvol2 (swap)
9) lvlnboot -R /dev/vg00
10)lvlnboot -v (to confirm all correct)
11) vgcfgbackup /dev/vg00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2003 08:49 PM
05-11-2003 08:49 PM
Re: Mirroring an entire volume group
In HPUX LVM you can not mirror volume group, unit of mirroring is Logical volume so the stapes you have to follow is following.
1. pvcreate /dev/rdsk/cxtydz (all four disks)
2. vgextend /dev/vg02 /dev/dsk/cxtydz /dev/dsk/cx... (all 4 disks)
3. lvextend -m 1 /dev/vg02/lvol1
4. lvexpend -m 1 /dev/vg02/lvol2
I assume your logical volume name is lvol1 and lvol2.
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:41 AM
05-13-2003 06:41 AM
Re: Mirroring an entire volume group
1. I my lvmtab output for this VG looks like:
/dev/vg02
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
/dev/dsk/c2t2d0
/dev/dsk/c2t3d0
Since all disks are 9 GB and one of my logical volumes is 26 GB, am I correct in assumming that my disks are striped? If so, shouldn't I create a PVG? I don't see any other way to mirror c2t0d0 to c1t0d0 and so forth.
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:49 AM
05-13-2003 06:49 AM
Re: Mirroring an entire volume group
# lvdisplay /dev/vg02/lvol2|grep -i stripe
If you see ..
Stripes 0
Stripe Size (Kbytes) 0
It means the lvol is not stripe and if that's the case the 26GB LV you're talking about is distributed to probably 3 of your PVs. That's not stripes. You can proceed with the PVG creation I mentioned above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:50 AM
05-13-2003 06:50 AM
Re: Mirroring an entire volume group
From your /etc/lvmttab output it is NOT necessary that the disks are striped. Even without striping you can have a 26GB LV in vg02 which might be spanned across 3 (or even 4) disks. If you want to get more information on that lv:
# lvdisplay -v /dev/vg02/lvol_name
If you suspect H/W stripe, then check the RAID status from SAM or the utility.
In either case, I would suggest you to use PVGs for mirroring the LVs in this case. You can create 2 different PVGs, one with the original and the other with new disks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 06:57 AM
05-13-2003 06:57 AM
Re: Mirroring an entire volume group
An 'lvdisplay' (e.g. lvdisplay /dev/vgNN/lvolX) will reveal whether you are truly striped or using distributed allocation.
If the 'lvdisplay' returnes zero (0) for the "stripes" field, then true striping is being used and you *cannot* mirror.
The 'lvdisplay' "allocation" field will show various values. You need to have "PVG-strict" allocation. You can 'lvchange' to "PVG-strict" if not otherwise set.
See the aan pages for 'lvcreate', 'lvdisplay' and 'lvchange' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 08:07 AM
05-13-2003 08:07 AM
Re: Mirroring an entire volume group
1. Extend vg02 to include the 4 disk from another SCSI channel.
# pvcreate -f /dev/rdsk/c1t0d0
# pvcreate -f /dev/rdsk/c1t1d0
# pvcreate -f /dev/rdsk/c1t2d0
# pvcreate -f /dev/rdsk/c1t3d0
# vgextend /dev/vg02 /dev/dsk/c1t0d0
# vgextend /dev/vg02 /dev/dsk/c1t1d0
# vgextend /dev/vg02 /dev/dsk/c1t2d0
# vgextend /dev/vg02 /dev/dsk/c1t3d0
2. Create a new ASCII text file for /etc/lvmpvg.
VG /dev/vg02
PVG PVG0
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
/dev/dsk/c2t2d0
/dev/dsk/c2t3d0
PVG PVG1
/dev/dsk/c1t0d0
/dev/dsk/c1t1d0
/dev/dsk/c1t2d0
/dev/dsk/c1t3d0
3. Run
# vgdisplay -v /dev/vg02
to insure PVGs are correct.
4. Set logical volumes to strict.
# lvchange -s g /dev/vg02/iman_vol1
# lvchange -s g /dev/vg02/iman_vol2
5. Mirror the logical volumes.
# lvextend -m 1 /dev/vg02/iman_vol1
# lvextend -m 1 /dev/vg02/iman_vol2
6. Check physical volumes.
# pvdisplay -v /dev/dsk/c1t0d0
# pvdisplay -v /dev/dsk/c1t1d0
# pvdisplay -v /dev/dsk/c1t2d0
# pvdisplay -v /dev/dsk/c1t3d0
# pvdisplay -v /dev/dsk/c2t0d0
# pvdisplay -v /dev/dsk/c2t1d0
# pvdisplay -v /dev/dsk/c2t2d0
# pvdisplay -v /dev/dsk/c2t3d0
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 08:46 AM
05-13-2003 08:46 AM
Re: Mirroring an entire volume group
==> After step4
# lvdisplay /dev/vg02/iman_vol1|grep -i allocation
and you should see "pvg-strict" is set. Repeat for "iman_vol2".
==> After step5
# lvdisplay -v /dev/vg02/iman_vol1|more
and make sure the extents are now mirrored to the set of disks in PVG1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 08:48 AM
05-13-2003 08:48 AM
Re: Mirroring an entire volume group
PVG's:
pvcreate -f /dev/rdsk/cXtYdZ
vgcreate -g pvg0 /dev/vg## /dev/dsk/cXtYdZ
One disk currently resides in pvg0. To add a 2nd disk:
vgextend -g pvg0 /dev/vg01 /dev/dsk/cXtYdZ
Or, edit /etc/lvmpvg:
vi /etc/lvmpvg
vg01
pvg0
c1t9d0
c3t8d0
c4t7d0
Note: The advantages gained with striping is via increased I/O performance. Note the above example has 3 different controllers c1, c3 and c4. For you to use one controller c1t9d0, c1t8do, d4t7d0, would probably create an I/O bottleneck. Use 'sar -d 5 5' and observe 'avwait', 'avserv' and '%busy' to detect this.
Finally, creating logical volumes. Use 32kb or 64kb stripe size and ignore adding the disk during the 'lvcreate' operation.
lvcreate -D y -I 64 -s g -r n /dev/vg##
One final comment, I am recommending stripe and mirror because if you don't mirror, I repeat, if you don't mirror and a disk crashes in this configuration then you restore from tape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:12 AM
05-13-2003 09:12 AM
Re: Mirroring an entire volume group
The 'lvcreate' you suggest is illegal.
# lvcreate -D y -I 64 -s g -r n /dev/vg##
...specifies *distributed* (-D y) allocation which requires PVG-strict (-s g) which is fine. *However* you added true striping (-I 64) which requires the addition of '-i' *but* which is *disallowed* with distributed allocaton.
The distributed allocation policy is incompatible with the striped scheduling policy ( -i stripes ). When doing striped scheduling, '-i' and '-I' must be specified together.
I would also not turn off LVM block relocation ('-r n') unless this logical volume where housed in a disk array like an EMC one.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:22 AM
05-13-2003 09:22 AM
Re: Mirroring an entire volume group
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6b8019434a69d711abdc0090277a778c,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 11:22 AM
05-13-2003 11:22 AM
Re: Mirroring an entire volume group
# lvdisplay -v /dev/vg02/lvol_name
You need to make sure that the mirroring is finished and the extents are not in "stale" status. I would also update my recovery tape with new LVM settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2003 10:23 AM
05-17-2003 10:23 AM
Re: Mirroring an entire volume group
1. When running lvdisplay -v on each logical volume, I noticed that by the third disk the PEs for both PVGs were not matching exactly. They were one off. Does that really matter?
2. How will I know when a disk fails?
3. What is the procedure for replacing a bad disk and re-synching?
4. What happens if a SCSI channel fails?
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2003 10:57 AM
05-17-2003 10:57 AM
Re: Mirroring an entire volume group
2. - dd if=/dev/dsk/cXtYdZ of=/dev/null count=1000000
(* if dd commands hangs then bad disk *)
3. - replace disk
- vgcfgrestore -n /dev/vg## /dev/rdsk/cXtYdZ
- vgchange -a y /dev/vg##
- vgsync /dev/vg##
4. - I assume you mean the SCSI controller. If bad then it will show up in ioscan as 'NO_HW'.
ioscan -fnkC ext_bus
My experience with these failing SCSI controllers is they display intermittent errors not a complete failure of the device. Also use the 'sea / search' command from BCH since SCSI device will report in at the firmware/BCH level. If they don't report in then its bad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2003 10:27 AM
05-18-2003 10:27 AM
Re: Mirroring an entire volume group
2) You'll get all kinds of SCSI error messages in /var/adm/syslog/syslog.log, in /etc/dmesg output and perhaps EMS. Depending on what monitoring script you have in place, just make sure you monitor disk failure. We have an LVM monitoring script actively monitors changes in LVM configuration so we will know when a PV is "unavailable" (ie possible disk failure). The LV that resides on the failed disk most likely will show "stale" extents.
3) Assuming /etc/lvmconf/vg02.conf is good. You would first shutdown and replace the failed disk. Make sure the scsi id remains the same on the new disk. Then boot the system up in single user mode ..
ISL> hpux -is (;0)/stand/vmunix
# pvcreate -f /dev/rdsk/cXtXd0
# vgcfgrestore -n /dev/vg02 /dev/rdsk/cXtXd0
# vgchange -a y /dev/vg02
# vgsync /dev/vg02
# shutdown -r 0
4) Same as 2) I would think. This will definately be detected by EMS if you have it running at the first place and root will get the error messages from EMS. All the PVs in PVG1 will be "unavailable" (from the vgdisplay -v output). All LVs will show "stale".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2003 05:51 AM
05-19-2003 05:51 AM
Re: Mirroring an entire volume group
Also, running a daily script to search for stale connections is simple enough. I was just checking to see if mirror disk/ux or HP-UX displayed some type of notification.
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2003 06:12 AM
05-19-2003 06:12 AM
Re: Mirroring an entire volume group
3477 /dev/dsk/c2t1d0 1307 current /dev/dsk/c1t1d0 1307 current
3478 /dev/dsk/c2t1d0 1308 current /dev/dsk/c1t1d0 1308 current
3479 /dev/dsk/c2t1d0 1309 current /dev/dsk/c1t1d0 1309 current
In the distribution of LVs section the total PE/LE for c2t0d0+c2t1d0+c2t2d0 and c1t0d0+c1t1d0+c1t2d0 matches. So at least this is consistent. Can you re-post you output but only show the "output" that you're talking about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2003 06:35 AM
05-19-2003 06:35 AM
Re: Mirroring an entire volume group
4337 /dev/dsk/c2t1d0 2167 current /dev/dsk/c1t1d0 2167 current
4338 /dev/dsk/c2t1d0 2168 current /dev/dsk/c1t1d0 2168 current
4339 /dev/dsk/c2t2d0 0000 current /dev/dsk/c1t1d0 2169 current
4340 /dev/dsk/c2t2d0 0001 current /dev/dsk/c1t2d0 0000 current
4341 /dev/dsk/c2t2d0 0002 current /dev/dsk/c1t2d0 0001 current
4342 /dev/dsk/c2t2d0 0003 current /dev/dsk/c1t2d0 0002 current
4343 /dev/dsk/c2t2d0 0004 current /dev/dsk/c1t2d0 0003 current
4344 /dev/dsk/c2t2d0 0005 current /dev/dsk/c1t2d0 0004 current
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2003 06:43 AM
05-19-2003 06:43 AM
Re: Mirroring an entire volume group
4340 /dev/dsk/c2t2d0 0001 current /dev/dsk/c1t2d0 0000 current..."
I'm fairly certain this is because of the LVM header, which is stored in one PE. I don't believe you need an LVM header on each disk so one is all that is necessary.