Operating System - HP-UX
1832853 Members
3023 Online
110047 Solutions
New Discussion

Re: Volume Groups are configured with “alternate links"

 
SOLVED
Go to solution
Vipin Singhal
Super Advisor

Volume Groups are configured with “alternate links"

Hi Friends,
I want to know that I am going to create volume groups and I need to make sure that all new Volume Groups are configured with “alternate links”

How will i configured this?
Thanks
Vipin
19 REPLIES 19
Pete Randall
Outstanding Contributor
Solution

Re: Volume Groups are configured with “alternate links"

You need to take a look at the pvcreate man page, particularly the section describing pv_path:

"The block device path name of a physical
volume that will be assigned to the new volume group. You can specify physical volume links (pv-links) for a physical volume providing different paths that reference the same physical volume in the pv_path list. The order in which the paths are listed is important. The first path becomes the primary link to the physical volume, the second becomes an alternate link to the physical volume. The primary link is the default path used to access the physical volume. If the primary link becomes unavailable, LVM automatically switches to the alternate link to access the physical volume. Currently LVM supports a maximum of 8 paths to a physical volume (7 alternate and one primary)."


Pete

Pete
Fabio Ettore
Honored Contributor

Re: Volume Groups are configured with “alternate links"

Hi Vipin,

you can start from

vgdisplay -v /dev/vg*

to check if all VG's are configured correctly and as expected into 'physical volumes' section of output.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Mel Burslan
Honored Contributor

Re: Volume Groups are configured with “alternate links"

lets say your disk has these two paths:

/dev/dsk/c4t2d0
/dev/dsk/c6t2d0

to create a new volume group, lets say vg02, containing only this disk device, you need to execute the following

pvcreate /dev/rdsk/c4t2d0
mkdir /dev/vg02
mknod /dev/vg02/group group c 64 0x020000
(above assumes you do not have minor number 02 used yet)
vgcreate -s 8 /dev/vg02 /dev/dsk/c4t2d0
vgextend /dev/vg02 /dev/dsk/c6t2d0

this will make /dev/dsk/c4t2d0 the primary path and the /dev/dsk/c6t2d0 alternate.

hope this helps
________________________________
UNIX because I majored in cryptology...
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

suppose,
I am going to create this file system using 2 HDDs:

pvcreate /dev/rdsk/c26t6d0
pvcreate /dev/rdsk/c29t6d0
mkdir /dev/vg72
mknod /dev/vg72/group c 64 ox720000
vgcreate /dev/vg72 /dev/dsk/c26t6d0
vgextend /dev/vg72 /dev/dsk/c29t6d0

then will all Volume Groups be configured with â alternate links"?
Mel Burslan
Honored Contributor

Re: Volume Groups are configured with “alternate links"

provided these two disk paths belong to two separate physical disk devices, you will need to find their alternate paths and run a vgextend on the alternate links as well. Otherwise alternate links will not be set.

You do the pvcreate on only one path as it writes LIF info on to the physical disk and you do not need to (or more correctly should not) write this info a second time

You do vgextend on both primary and alternate links to utilize them for data access.

Hope this makes it clearer
________________________________
UNIX because I majored in cryptology...
Pete Randall
Outstanding Contributor

Re: Volume Groups are configured with “alternate links"

No, that will not give you alternate links. That merely defines the VG on one disk and then extends it onto another disk. Alternate paths are specified in the vgcreate command by specifying each of paths:

vgcreate -s 2 /dev/vg00 /dev/dsk/c1t0d0 /dev/dsk/c1t2d0


Pete

Pete
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

ok, if i give this command for my these twon LUNs:
#vgcreate -s 2 /dev/vg72 /dev/dsk/c26t6d0 /dev/dsk/c29t6d0

Will it create the alternate link?

these are my real details of LUNs & VG72 and i have to create new VG.

Please tell me the step by step command for alterlink configuration.
Pete Randall
Outstanding Contributor

Re: Volume Groups are configured with “alternate links"

Are /dev/dsk/c26t6d0 and /dev/dsk/c29t6d0 really two different paths to the same LUN or are they two different LUNs?


Pete

Pete
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

hi,
I am not too much famliar with this.
I need to create some VG.
and when i give the command

# pvdisplay /dev/dsk/c26t6d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c26t6d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c26t6d0".

# pvdisplay /dev/dsk/c29t6d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c29t6d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c29t6d0".

So I am creating new VG using these two devices (c26t6d0 & c29t6d0).

Please suggest me
Mel Burslan
Honored Contributor

Re: Volume Groups are configured with “alternate links"

This message means, these devices has not been introduced to LVM system. You will need to run a pvcreate against them as follows:

pvcreate /dev/rdsk/c26t6d0
pvcreate /dev/rdsk/c29t6d0

after this, your pvdisplay should work.

BUT PROCEED WITH CAUTION:
when you run pvcreate, everything on this volume will be erased.
________________________________
UNIX because I majored in cryptology...
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

when i give the command:
# pvdisplay /dev/dsk/c26t6d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c26t6d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c26t6d0".

# pvdisplay /dev/dsk/c29t6d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c29t6d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c29t6d0".

1.does it mean- nothing is here on these devices?

2.may i use these two device for new VG?

3.If yes, what will be the step be step commands for "alternate link" configuration for creation of vg72 using these devices.

4. these devices size is 37.74Gb each (means 2*37.74Gb), is it possible to create the LV of 72 GB?
Deoncia Grayson_1
Honored Contributor

Re: Volume Groups are configured with “alternate links"

you must first do:

pvcreate /dev/rdsk/c29t6d0
pvcreate /dev/rdsk/c26t6d0
mkdir /dev/vg72
mknod /dev/vg72/group group c 64 0x020000
vgcreate /dev/vg72 /dev/dsk/c26t6d0
vgextend /dev/vg72 /dev/dsk/c29t6d0

Before you can do pvdisplay
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

Hi,
when i give the command:
# pvdisplay /dev/dsk/c26t6d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c26t6d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c26t6d0".

# pvdisplay /dev/dsk/c29t6d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c29t6d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c29t6d0".

1.does it mean- nothing is here on these devices?

2.may i use these two device for new VG?

3.If yes, what will be the step be step commands for "alternate link" configuration for creation of vg72 using these devices.

4. these devices size is 37.74Gb each (means 2*37.74Gb), is it possible to create the LV of 72 GB?
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

hello,
please update
Deoncia Grayson_1
Honored Contributor

Re: Volume Groups are configured with “alternate links"

to be absolutely certain there is nothing on these two disks:

strings /etc/lvmtab | grep c?t?d?

if it comes back with nothing and you can't do a pvdisplay on this disk then its a strong probability there is nothing on these disks as they do not belong to any volume groups which is what the error message is stating:
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c29t6d0" belongs.

after you have confirmed there is nothing on these disks, you must start with the steps pvcreate, mkdir, mknod, vgcreate, vgextend,
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Vipin Singhal
Super Advisor

Re: Volume Groups are configured with “alternate links"

yes, no output by using this command
strings /etc/lvmtab | grep c?t?d?

means , i can create the VG

1. what will be the step be step commands for "alternate link" configuration for creation of vg72 using these devices.

2. these devices size is 37.74Gb each (means 2*37.74Gb), is it possible to create the LV of 72 GB?

is these command are correct for creating VG-
vgcreate /dev/vg72 /dev/dsk/c26t6d0
vgextend /dev/vg72 /dev/dsk/c29t6d0

I need "alternate link" configuration.

If no, Please tell me the step by step command.
Thanks a lot to all of yours
Vipin
A. Clay Stephenson
Acclaimed Contributor

Re: Volume Groups are configured with “alternate links"

I love this statement:
QUOTE
to be absolutely certain there is nothing on these two disks:

strings /etc/lvmtab | grep c?t?d?

if it comes back with nothing and you can't do a pvdisplay on this disk then its a strong probability there is nothing on these disks as they do not belong to any volume groups
UNQUOTE

Note that "absolutely certain" somehow got translated to "strong probability".

These pesky raw devices keep coming up. I hope you know what you are doing. I am not pointing this out to ridicule anyone but rather to point out that you are doing something that is inherently dangerous. Whenever I create a new LUN or add a new physical to a system I do 2 things to make sure I don't clobber data.

1) I document what I do.
2) I write a known, unique byte pattern to the 1st 10 blocks or so of the physical device -- and document that byte pattern.

If it ain't broke, I can fix that.
Craig Irvine
Occasional Contributor

Re: Volume Groups are configured with “alternate links"

Greetings,

My understanding was that an alternate link was having more than one path for the host to get to the same device for redundancy in case one path became unavailable for some reason.

eg. 2 different controllers on the same host going to 2 different controllers on the same disk box.

In our case, we have 2 different fibre channel controllers on a host, connecting to 2 different fibre channel switches, which in turn connect to 2 different controllers on the one fibre channel SAN. It's a bit more complex than that with multiple computer rooms and mirroring between them involved but you get the idea.

I don't think you will be able to connect 2 different devices on 2 different controllers and have the host consider them the same device.

When you issue the vgextend from the procedures that people have already mentioned and the host determines that they are the SAME DEVICE (albeit on a different path) then an alternate link is created.

Are you sure that you are not just after a mirror (or other redundant config) between the 2 devices on seperate controllers??

Regards
Craig
Bill Costigan
Honored Contributor

Re: Volume Groups are configured with “alternate links"

I just wanted to point out that checking /etc/lvmtab is not a good way to ensure that the disk isn't being used.

Remember that on a SAN each device file is simply a path to a LUN. There are multiple paths to the same LUN.

For example:

c14t2d1
c20t2d1
c25t2d1
c26t2d1

may all point to the same LUN. The C14 and C20 entries may be in the lvmtab file but not the c25 and c16 entries. All this means is that LVM will only use two of the four paths. If you do a pvcreate -f on the c26 path it will destroy all the data on the disk and the vg using the c14 and c20 paths will lose its data.

You can use the device number to identify the LUN on the SAN array, then use that to find all the device files on all the servers that have access to the LUN.

It looks like you have a clariion, Try the command powermt display dev=all