1825805 Members
2585 Online
109688 Solutions
New Discussion

Re: Logical Volume

 
augusto cossa
Frequent Advisor

Logical Volume

Hi,

could you please help me on how to extend an active logical volume?
this is the logical volume that i would like to extend:

/dev/vg00/lvol5 19861 7317 10557 41% /home

thanks.
9 REPLIES 9
Evert Jan van Ramselaar
Valued Contributor

Re: Logical Volume

This should do the job:

# umount /home
# fsck ?y /dev/vg00/lvol5
# lvextend ?L 400 /dev/vg00/lvol5
(exchange 400 with the total amount of MB's you want it to be after the change)
# extendfs /dev/vg00/rlvol5
# mount /dev/vg00/lvol5 /home


Good luck!

Evert Jan
Contrary to popular belief, Unix is userfriendly. It just happens to be selective about who it makes friends with.
Derek Davey
New Member

Re: Logical Volume

Hi augusto

It depends on wether the filesystem is vxfs or hfs as to wether you can extend the filesystem whilst it is still active.

You can determine the filesystem type by issuing the command -
fstyp /dev/vg00/lvol5. If this returns vxfs then you can extend it while still active only if you have the online jfs product installed. If you have then the command would be -
fsadm -F vxfs -b

where sectors = the new LV size in Mbytes * 1024.

If you do not have online jfs or the filesystem is hfs then you will have to unmount the filesystem and extend it using the commands -

lvextend -L /dev/vg00/lvol5
extendfs /dev/vg00/rlvol5

Then remount the filesystem

Hope this helps

Alex Glennie
Honored Contributor

Re: Logical Volume

check the man pages for lvextend (also vgextend) for further egs :

lvextend -L 100 /dev/vg00/lvol5 increases the size by 100 MB
usethe -l flag to increase extents
use vgextend to extend an LVM volume group by adding physical volumes.

NB SAM Gui can be used and has good on line help / egs.
augusto cossa
Frequent Advisor

Re: Logical Volume

Hi,

My fileSystem Type is hfs and if i issue the command umount /home it retain the following message:

umount: cannot unmount /home : Device busy

and i issued the command ps -ef | grep (filename) to see processing running and the result was:
lab 19669 19666 3 Jun 1 ? 0:54 oracleLAB (DESCRIPTION=(LOCAL=YE
S)(ADDRESS=(PROTOCOL=beq)))
lab 21576 21573 0 07:28:25 ? 0:00 oracleLAB (DESCRIPTION=(LOCAL=YE
S)(ADDRESS=(PROTOCOL=beq)))
lab 14827 1 0 May 31 ? 0:00 ec_msgd
lab 19666 1 0 Jun 1 ? 0:00 ec_sqld
lab 21573 1 2 07:28:24 ? 0:01 l_inst_intf -search_dir/stm/lab/
samples/new -backup_dir/stm/

Should I first stop all processes and after umount /home ?
You help will be appreciated.
Thanks
A Cossa
Derek Davey
New Member

Re: Logical Volume

Hi Augusto

You may not need to shut down any applications, it may just be a case of getting users to log off. If you issue the command -

fuser /dev/vg00/lvol5

this will give you a list of processes running on the filesystem. You can the get the exact details using ps -ef | grep to find out exactly what is using the filesystem. Once fuser returns no process ids you will be able to umount the filesystem.

Derek
Thomas G. Tudrej
Frequent Advisor

Re: Logical Volume

Hi,

If Derek's answer is not sufficient, there is a utility called "lsof" - list open files. It takes as argument a path to a file system and shows files that are open in it. (http://hpux.cs.utah.edu/)

Also, make sure that there are no other file systems mounted below /home. It there are, you have to unmount those first and then remount after you do the extension. You can find those by running "bdf" and looking for "home" as first part of the path.

Dimitri Karagiannis
Occasional Advisor

Re: Logical Volume

Hi Augusto,

Hopefully this could help..

umount /stand

if your having problems unmounting it kill all the jobs running on it (i.e fuser -ku /dev/vgXX/lvXXX)

lvextend -L "new_size MB" /dev/vgXX/lvXXX

extendfs /dev/vgX/lvXXXX

mount /stand
Venu_2
Regular Advisor

Re: Logical Volume

Hi,

/home should be the default home directory for the users.

For unmounting u have to make sure the users on this has to logout.

# umount /home

# lvextend -L XXX /dev/vg00/rlvol5

XXX - Total size of the filesystem after extending.

# extendfs /dev/vg00/rlvol5

# fsck /dev/vg00/rlvol5

# mount /dev/vg00/rlvol5 /home.


Hope this helps

regards

venu


Amit  Jadhav
Occasional Contributor

Re: Logical Volume

Hi,

As your filesystem if "hfs" ;
1.fuser -u /dev/vg00/lvol5 (to determine users)
2.fuser -ku /dev/vg00/lovl5 (to kill all users or option "c" can do)
3.umount /home
4.lvextend -L /dev/vg00/lvol5 (xyz=total size in MB)
5.extendfs /dev/vg00/rlvol5
6.mount /dev/vg00/lvol5 /home

hope this helps..

regards,
Amit.