1846997 Members
3159 Online
110257 Solutions
New Discussion

Adding disk to VG00

 
SOLVED
Go to solution
joe_91
Super Advisor

Adding disk to VG00

I have two disks on this D class. (c0t8d0 and c0t5d0). this system has just 2 disks and just one VG (vg00). i look into lvmtab and see that only c0t8d0 is configured and c0t5d0 is unused. i want to add this disk to vg00. please let me know if these steps are OK. this is 11.11

1. pvcreate /dev/rdsk/c0t5d0 (is -B required? this disk will not have bootable volumes i guess)
2. vgextend vg00 /dev/dsk/c0t5d0

if we add this disk to VG00 will that portion of the disk be free and unused? Please help me understand this.

Thanks

Joe
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: Adding disk to VG00

No -B option is needed since this will not be a boot disk.

It's not possible to tell you how much of this new disk will be used because you didn't bother to indicate the sizes of these two disks nor the max_pe's value display for vg00. In general, if the additional disk is no larger than the other disks/LUN's which make up the VG, then all of the new disk will be available. If the new disk is larger in capacity than the others in the VG, then (unless max_pe's was explicitly increased above the default value) only the capacity up to the size of the largest other disks in the VG will be available.

Note: This disk cannot be used to extend /stand, primary swap, or / because these LVOL's MUST be on the boot disk and MUST be contiguously allocated bit LVOL's like /usr, /opt, /home, and /var can be extended and do not have to located on the boot disk.
If it ain't broke, I can fix that.
joe_91
Super Advisor

Re: Adding disk to VG00

Clay:

Thanks. this disk is 2gb. the one which vg00 currently uses is 8gb. thanks again.

Joe
joe_91
Super Advisor

Re: Adding disk to VG00

Clay:

Also ran into something strange...

strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t8d0
sd12:root> pvcreate /dev/rdsk/c0t5d0
pvcreate: The physical volume already belongs to a volume group
sd12:root> strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t8d0

dont see any other VG's

Thanks

Joe

James R. Ferguson
Acclaimed Contributor
Solution

Re: Adding disk to VG00

Hi Joe:

The error returned indicates that the physical volume _once did_ belong to a volume group. To force the 'pvcreate' do:

# pvcreate -f /dev/rdsk/c0t5d0

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Adding disk to VG00

Ok, that message just means that prior LVM meta-data has been detected. Your strings /etc/lvmtab means that this disk is not a part of a VG on this box. If I can assume that this is not a shared SCSI bus (which would not be common on a D-box) then all you have to do is add the -f (force) option to pvcreate.
If it ain't broke, I can fix that.
whiteknight
Honored Contributor

Re: Adding disk to VG00

Hi Joe,

please run vgdisplay -v vg00, see c0t5d0 is belongs to vg00 ? Do you plan to wipe off c0t5d0

from /etc/lvmtab output you only have c0t8d0

1. pvcreate -f /dev/rdsk/c0t5d0
2. vgextend vg00 /dev/dsk/c0t5d0

use -f option
This option will force a volume group to be
created with a physical volume which has
alternate block(s) already allocated, (i.e.
this physical volume was not initialized
using pvcreate -f.) This option should be
used with extreme caution. If the volume
group to be created has a different physical
extent size, the alternate block(s) might be
inside the user data area. Potential data
corruption could occur.


WK
Problem never ends, you must know how to fix it
AwadheshPandey
Honored Contributor

Re: Adding disk to VG00

Avinash Agarkar
Valued Contributor

Re: Adding disk to VG00

Hi,

It is very simple do the ioscan -fnCdisk
verify the new disk path
then

#pvcreate -f /dev/rdsk/cxtxdx [new disk path]

then run -

#strings /etc/lvmtab
check the vg00 how much disks are currentely configured then simply

#vgextend vg00 /dev/dsk/cxtxdx [new disk path]

Then check with

vgdisplay -v /dev/vg00 | more

weather the new disk is added or not.

Thanks,
Avinash
Great Power Comes With Great Responsibility