1836654 Members
2128 Online
110102 Solutions
New Discussion

Re: adding new disk

 
SOLVED
Go to solution
shrikant 1
Occasional Advisor

adding new disk

Hi
We need to add some space to a filesystem.The online jfs product is not installed.
Also there is no free space available.
Below are the outputs.

Could someone please list the steps i need to perform after adding the disks physically.
-----------------------------
vgdisplay vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 7
Open LV 7
Max PV 16
Cur PV 8
Act PV 8
Max PE per PV 8683
VGDA 16
PE Size (Mbytes) 4
Total PE 69448
Alloc PE 69448
Free PE 0
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0
===============================================================================
lvdisplay /dev/vg01/lvdata5
--- Logical volumes ---
LV Name /dev/vg01/lvdata5
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 44440
Current LE 11110
Allocated PE 22220
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default
7 REPLIES 7
Steven E. Protter
Exalted Contributor
Solution

Re: adding new disk

Shalom,

General process

pvcreate the new disk
vgextend an existing volume group to include this disk or vgcreate a new volume group
lvextend a logical volume oonto his disk
umount the filesystem involved
extendfs logical volume
mount the filesystem involved.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: adding new disk

In addition to this, note:

"Total PVG 2"
"Mirror copies 1"

- add the 2 new disks to the /etc/lvmpvg file
- they will be mirrored while extending


But now look at this:

"Act PV 8"
"Allocation PVG-strict/distributed"


If your LVOL resides on all disks, you hit a problem while extending.



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!   
SKR_1
Trusted Contributor

Re: adding new disk

Hi Shrikant,

Here PVG funda you need to understand first before extending the FS.

Here we have two PVG, you need to check how many disks you have in each PVG. Then same number of disks you need to add in both PVG first. Then you can extend your LVOL.

First umount the FS
lvextend command
extendfs command
mount FS

Thanks,

SKR
shrikant 1
Occasional Advisor

Re: adding new disk

I have listed few commands.Kindly confirm
--------------------------
1.Insf

2.Pvcreate /dev/rdsk/cxtxdx (if needed use â f)

3.Vgextend â g PVGA /dev/vg01 /dev/dsk/cxtxdx (1st disk)

4.Vgextend â g PVGB /dev/vg01 /dev/dsk/cxtxdx(2nd disk)

5.lvextend ----here i have a doubt. how to use the -m option and should i use pvg name directly
Sajjad Sahir
Honored Contributor

Re: adding new disk

Dear Shirkant
these are steps u have to follow up
while extending file system also if u don't have space in volume group
first present disk from storage
present the disk by using insf -C disk
check the disk ioscan -fnC disk
then use pvcreate command for creating physical volume

then extend volume group by using vgextend
then umount the file system
extend the logical volume
then extend the file system
mount it again.
Michael Steele_2
Honored Contributor

Re: adding new disk

Hi:

1) ioscan -fnk (* same as your 'insf -e'. Will make new device files.

2) ioscan -funC disk (* make sure you can see the new disks and that their state is CLAIMED *)

3) vgextend /dev/vg01 /dev/dsk/c#t#d1 /dev/dsk/c#d#d2 (* ONly need one vgextend command, not two *)

4) vgdisplay -v /dev/vg01 (* verify disks have been added *)

5) Note the logical volume from the file system, i.e., /dev/vg01/lvol4

6) lvextend -L 400 /dev/vg01/lvol4 (* add 400 MG to lvol4 *)

7) use 'pvdisplay -v /dev/c%t#d1 & 'pvdisplay -v /dev/c#t#d2 in order to verify lvol4 has been added to 1, but is not currently on 2.

8) lvextend -m 1 /dev/vg01 /dev/vg01/c#t#d2

9) pvdisplay -v /dev/dsk/c#t#d2. (* verify lvol4 is now on 2nd pv *)
Unmount the file system.

10) umount /dev/vg01/lvol4

11) extendfs /dev/vg06/rlvol3 (* Extend the file system to occupy the entire (larger) logical volume.*)

12) mount /dev/vg06/lvol3 /mnt (* Remount the file system.*)
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: adding new disk

Geez that's wrong. 8) should read

8) lvextend -m 1 /dev/vg01/lvol4 /dev/vg01/c#t#d2
Support Fatherhood - Stop Family Law