Operating System - HP-UX
1833313 Members
2791 Online
110051 Solutions
New Discussion

Re: add a disk in a volume group

 
SOLVED
Go to solution
kacou
Regular Advisor

add a disk in a volume group

I must add a new disk in a hp-ux server.
there already exists a volume group. What is the procedure?

10 REPLIES 10
Tim Nelson
Honored Contributor

Re: add a disk in a volume group

To find list of HW addreses and device files
ioscan -kfnC disk

To crete VG header
pvcreate /dev/rdsk/cxtxdx

To add to existing VG if there is room
vgextend /dev/vgxx /dev/dsk/cxtxdx

To extend existing LV
lvextend -L xGB /dev/vgxx/lvolx

To extend existing FS w/o Online jfs
umount /some/filesystem
extendfs /dev/vgxx/lvolx
mount /some/filesystem

DONE. Any other scenario requires different procedures.

BTW, A great way to say thanks for the efforts is to assign points. Links to previously posted questions can be found by viewing your profile with the link in the uppper left nav pane.

Forums user name: kacou
Company name:
Country / Region: ivory_coast
Personal quote:
Certification:
ITRC member since: May 08, 2008
Last contribution date: June 09, 2008
I have assigned points to 74 of 185 responses to my questions.



James R. Ferguson
Acclaimed Contributor

Re: add a disk in a volume group

Hi:

Your questions are basic system administration ones. I urge you to take some time to read (at least) this guide:

http://docs.hp.com/en/B2355-90950/index.html

Begin with the sections that are most relevant to your immediate needs.

You should also consider taking a HP-UX system administration course.

Regards!

...JRF...
Jaime Bolanos Rojas.
Honored Contributor

Re: add a disk in a volume group

Kacou,

Please remember to take your time to asign points to people that is taking their time to find answers for you.

Regards,

Jaime.
Work hard when the need comes out.
Tingli
Esteemed Contributor

Re: add a disk in a volume group

Go to sam, it is easy to add a disk there.
kacou
Regular Advisor

Re: add a disk in a volume group

I have 02 disks of 146 Gb in my server. I want to add a third disk of 146GB. What option can I use?
- add to existing VG
- extend existing LV
-----------------------------------


vgdisplay -v
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 11
Open LV 11
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 32
Total PE 8748
Alloc PE 8230
Free PE 518
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 320
Current LE 10
Allocated PE 20
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 128
Allocated PE 256
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 576
Current LE 18
Allocated PE 36
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 6016
Current LE 188
Allocated PE 376
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 10016
Current LE 313
Allocated PE 626
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 4672
Current LE 146
Allocated PE 292
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 3968
Current LE 124
Allocated PE 248
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 625
Allocated PE 1250
Used PV 2

LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 40000
Current LE 1250
Allocated PE 2500
Used PV 2

LV Name /dev/vg00/lvol10
LV Status available/syncd
LV Size (Mbytes) 30016
Current LE 938
Allocated PE 1876
Used PV 2

LV Name /dev/vg00/lvol11
LV Status available/syncd
LV Size (Mbytes) 12000
Current LE 375
Allocated PE 750
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c2t0d0
PV Status available
Total PE 4374
Free PE 259
Autoswitch On

PV Name /dev/dsk/c2t1d0
PV Status available
Total PE 4374
Free PE 259
Autoswitch On

Torsten.
Acclaimed Contributor
Solution

Re: add a disk in a volume group

In theory, you first pvcreate the disk itself, add the disk to the VG and then you create or extend LV's in this VG.

But I think your 2 disks are mirrored (check with lvdisplay).

this will be hard with 3 disks ...


see

http://docs.hp.com/en/B2355-90950/ch06.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!   
James R. Ferguson
Acclaimed Contributor

Re: add a disk in a volume group

Hi:

> I have 02 disks of 146 Gb in my server. I want to add a third disk of 146GB. What option can I use?

To add a third disk to this volume group you would use 'lvextend'. See the manpages.

However, what is your objective? This is vg00 which should consist *only* of the standard logical volumes comprising the operating system (OS). Having non-OS logical volumes makes Ignite image creattion and potential system recovery and upgrade much more difficult. You should isolate OS and non-OS data into discrete volume groups.

Too, each of you existing logical volumes is mirrored. This means that the mirror copies reside on *different* physical volumes. If you add a third physical volume, where do you intend to mirror its extents?

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: add a disk in a volume group

>> To add a third disk to this volume group you would use 'vgextend'.


Anyway, why would you like to extend vg00???

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!   
James R. Ferguson
Acclaimed Contributor

Re: add a disk in a volume group

Hi:

Yes, Torsten, thanks, I said 'lvextend' but of course meant 'vgextend'.

Also, the only reason I could see to adding a third disk to vg00 would be to create a *second* mirror copy.

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: add a disk in a volume group

You are welcome, James. ;-)

Yes, a second mirror copy or better a drd clone for better patching.


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!