Operating System - HP-UX
1752580 Members
5028 Online
108788 Solutions
New Discussion юеВ

How to add a newly presented disk do a volume group?

 
Eric Antunes
Honored Contributor

How to add a newly presented disk do a volume group?

Hi gurus,

I have one newly presented disk from EVA and need to add it to the existing volume group (EVA00). This disk was for backup purposes and had already been presented to both Production and Development boxes. Now it will stay presented to the Production box. Here the output from "ioscan -funCdisk":

Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
...
disk 4 0/3/1/0.1.0.0.0.0.2 sdisk CLAIMED DEVICE HP HSV2 00
/dev/dsk/c4t0d2 /dev/rdsk/c4t0d2
...
disk 5 0/3/1/0.1.1.0.0.0.2 sdisk CLAIMED DEVICE HP HSV2 00
/dev/dsk/c6t0d2 /dev/rdsk/c6t0d2


I already checked that it isn't active/used with "vgscan -pv":

vgscan: Warning: couldn't query physical volume "/dev/dsk/c4t0d2":
The specified path does not correspond to physical volume attached to
this volume group
vgscan: Warning: couldn't query physical volume "/dev/dsk/c6t0d2":
The specified path does not correspond to physical volume attached to
this volume group
vgscan: Warning: couldn't query all of the physical volumes.
vgscan: The physical volume "/dev/dsk/c9t0d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c4t0d1" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c4t0d2" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c6t0d1" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c6t0d2" is already recorded in the "/etc/lvmtab" file.
Current path "/dev/dsk/c6t0d1" is an alternate link, skip.
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument
Physical Volume "/dev/dsk/c4t0d2" contains no LVM information
Physical Volume "/dev/dsk/c6t0d2" contains no LVM information


/dev/vg00
/dev/dsk/c9t0d0



/dev/EVA00
/dev/dsk/c4t0d1
/dev/dsk/c6t0d1

...


/dev/dsk/c6t0d2 is the alternate path to /dev/dsk/c4t0d2.

Also checked with "pvdisplay -v /dev/dsk/c4t0d2":

pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c4t0d2":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c6t0d2":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/EVA01".
pvdisplay: Cannot display physical volume "/dev/dsk/c4t0d2".


Now, what is the safe way to add this disk to vg EVA00?


Can I do a "pvcreate -f /dev/rdsk/c4t0d2"? And after this a "vgextend ..."?


Thanks,

Eric
Each and every day is a good day to learn.
14 REPLIES 14
Torsten.
Acclaimed Contributor

Re: How to add a newly presented disk do a volume group?

"vgscan: The physical volume "/dev/dsk/c6t0d2" is already recorded in the "/etc/lvmtab" file."


Why is it there. Did you do another vgcreate on this disks before?

What is in

# strings /etc/lvmtab

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric Antunes
Honored Contributor

Re: How to add a newly presented disk do a volume group?

Hi Torsten,

Yes, it has already been "pvreated, vgcreated, ..." (on both servers PROD and DEV). The idea was to have a identical configuration for this disk in both servers and use it where it was most needed.

"strings /etc/lvmtab":

strings /etc/lvmtab
/dev/vg00
/dev/dsk/c9t0d0
/dev/EVA00
/dev/dsk/c4t0d1
/dev/dsk/c6t0d1
/dev/EVA01
/dev/dsk/c4t0d2
/dev/dsk/c6t0d2

I may just need to "vgactivate" it? :-)

Thanks,

Eric
Each and every day is a good day to learn.
Torsten.
Acclaimed Contributor

Re: How to add a newly presented disk do a volume group?

If you want to start over, you should vgexport it first to get it out of /etc/lvmtab.
Now you can do a pvcreate -f ... and create the VG again.

But a vgchange -a y ... will probably active the existing VG too.

Consider to unpresent the LUN from your development system to prevent serious problems in the future.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric Antunes
Honored Contributor

Re: How to add a newly presented disk do a volume group?

Hi again,

"vgchange -a y":

Volume group "/dev/vg00" has been successfully changed.
Volume group "/dev/EVA00" has been successfully changed.
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c4t0d2":
Cross-device link
vgchange: Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c4t0d2":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query physical volume "/dev/dsk/c6t0d2":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "/dev/EVA01":
Quorum not present, or some physical volume( s ) are missing.


PS: the LUN has already been unpresented from DEV box.

Thanks,

Eric
Each and every day is a good day to learn.
Torsten.
Acclaimed Contributor

Re: How to add a newly presented disk do a volume group?

Did you really *create* the VG on both servers earlier? Normally you would use the vgexport in preview mode and vgimport the disk on the other server.

Anyway, time for plan B.
vgexport this VG and start over.
Make sure your deal with the correct disk.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric Antunes
Honored Contributor

Re: How to add a newly presented disk do a volume group?

Hi Torsten,

"vgexport -m EVA01.mymap -v /dev/EVA01" successful:

Beginning the export process on Volume Group "/dev/EVA01".
/dev/dsk/c4t0d2
/dev/dsk/c6t0d2
Physical volume "/dev/dsk/c4t0d2" has been successfully deleted from
physical volume group "EVA01".
Physical volume "/dev/dsk/c6t0d2" has been successfully deleted from
physical volume group "EVA01".
Volume group "/dev/EVA01" has been successfully removed.


What about now?

"pvcreate /dev/rdsk/c4t0d2"? (do I need -s disk_size?)

Thanks,

Eric
Each and every day is a good day to learn.
Torsten.
Acclaimed Contributor

Re: How to add a newly presented disk do a volume group?

The disk has still the LVM information, so you need to force pvcreate (-f).

I don't know how large your vdisk is, so I don't know if you need to use a different PE size.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric Antunes
Honored Contributor

Re: How to add a newly presented disk do a volume group?

Hi again,

I already did:

"mkdir /dev/EVA01"
"mknod /dev/EVA01/group c 64 0x030000"

The vdisk size is 30Gb.

"pvcreate -f /dev/rdsk/c4t0d2"?
Each and every day is a good day to learn.
Torsten.
Acclaimed Contributor

Re: How to add a newly presented disk do a volume group?

pvcreate -f /dev/rdsk/c4t0d2

will create new LVM structure on the disk (data will be lost).

With a default PE size of 4MB you will get ~7500 PEs. The maximum per disk is 65535.
So this should be OK, unless you want a much larger disk to tis VG later.

To use all default values, simply run

vgcreate /dev/EVA01 /dev/dsk/c4t0d2

For detailed information see
http://docs.hp.com/en/B2355-60105/vgcreate.1M.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!