Operating System - HP-UX
1752790 Members
6223 Online
108789 Solutions
New Discussion юеВ

add addtional hd to system.

 
SOLVED
Go to solution
emily_3
Frequent Advisor

add addtional hd to system.

vg01 in my system is mirrored.
one /dev/vg01/lovl4 is full, I added two new harddisk, and do the following step.
# pvcreate -f /dev/rdsk/cxtxdx
# vgextend vg01 /dev/dsk/cxtxdx
# lvextend -L xx /dev/vg01/lovl4
/dev/dsk/cxtxdx
But it say the physical size is not enough.
I am sure -L xx size does excess the physical size, and vgdisplay can show the additional disk has been added.

What's wrong? Do i need to deactive the vg01, or need to umount all the lvm in vg01, before I do all these?
10 REPLIES 10
Bernhard Mueller
Honored Contributor

Re: add addtional hd to system.

Emily,

for the lvextend you do not deactivate the vg.

However, if yo do not have "Advanced OnlineJFS" you will have to umount the filesystem and run extendfs (instead of fsadm) to actually increase the filesystem size) - ignore that if you are using this as a raw volume.

Now as to your problem, do an lvdisplay and check the Allocation policy for that lvol. If it is e.g. contiguous, this would be a problem, but I guess you get a different message then. If it is PVG strict mirrored, you will have to add the new disks into /etc/lvmpvg (you can edit this text file manually) so that each physical volume group has one of the new disks.

I guess you are aware that after -L you specify the new *total* lvol size in MB, not the additional size.

HTH
Regards,
Bernhard
Robert-Jan Goossens
Honored Contributor

Re: add addtional hd to system.

Hi Emily,

Yes, umount the filesystem
# lvextend -L xx /dev/vg01/lovl4
# extendfs /dev/vg01/rlovl4
mount the filesystem

Regards,
Robert-Jan
aparna challagulla
Valued Contributor

Re: add addtional hd to system.

hi Emily,

If you have Online JFS installed on your system then you need not umount the filesystem for extending the LV.
Can you attach the o/p of vgdisplay and the value of -L xx which you are specifying.

hth
aparna
If you don't have time to do it right you must have time to do it over
emily_3
Frequent Advisor

Re: add addtional hd to system.


Thanks for your reply.
The following is the message of this lvm. It seems ok, so i tried to edit /etc/lvmpvg. But my server don't have this file. don't know why?

--- Logical volumes ---
LV Name /dev/vg01/lvol4
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 55896
Current LE 6987
Allocated PE 13974
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c6t0d0 6987 6987
/dev/dsk/c7t8d0 6987 6987
Zigor Buruaga
Esteemed Contributor
Solution

Re: add addtional hd to system.

Hi,

Try with this:

lvextend -L xx /dev/vg01/lvol4 /dev/dsk/disk1 /dev/dsk/disk2

Kind regards,
Zigor
Norman_21
Honored Contributor

Re: add addtional hd to system.

Hello Emily,

What's the ouput of diskinfo -v /dev/rdsk/cxtxdx

Try to deactivate the volume group and then create the logical volume, reactivate the VG back.
#vgchange -a n /dev/vg01
#lvextend -L (size in MB) /dev/vg01/lvol4
#extendfs -F vxfs /dev/vg01/rlvol4
#vgchange -a y /dev/vg01

Hope this help
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
emily_3
Frequent Advisor

Re: add addtional hd to system.

hello,

It does work by using the following command.
#lvextend -L xx /dev/vg01/lvol4
/dev/dsk/disk1 /dev/dsk/disk2

And now I am trying to extend the filesytem, but it has taken very long time. I am still waiting for the result. The command I am using is:
# extendfs -F vxfs /dev/vg01/rlvol4

If there is anything wrong, pls let me know. Thanks.
emily_3
Frequent Advisor

Re: add addtional hd to system.

Thanks very much.

I have performed this successfully according to your suggestions.
Norman_21
Honored Contributor

Re: add addtional hd to system.

Emily,

Did you change anything in the /etc/fstab

"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003