1830354 Members
2187 Online
110001 Solutions
New Discussion

How extend LV & FS

 
SOLVED
Go to solution
Galal
Advisor

How extend LV & FS

How extend LV & FS
I have /u01 & /u02 almost full
this is the print out for
#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 199976 4792 98% /
/dev/vg00/lvol1 298928 56952 212080 21% /stand
/dev/vg00/lvol8 4710400 128272 3405704 27% /var
/dev/vg00/lvol7 1622016 102976 587448 64% /usr
/dev/vg00/lvol4 516096 10688 502024 2% /tmp
/dev/vg00/lvol6 114880 750816 393072 66% /opt
/dev/vg00/lvol5 24576 7536 16968 31% /home
dev/vg00/lvol9 10240000 10240000 0 100% /u01
/dev/vg00/lvol1010240000 10183382 54912 99% /u02

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

--- Logical volumes ---
..
..
..
LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 1250
Used PV 2

LV Name /dev/vg00/lvol10
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 1250
Used PV 2
--- Physical volumes ---
PV Name /dev/dsk/c1t2d0
PV Status available
Total PE 4374
Free PE 590
Autoswitch On

PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 4374
Free PE 590
Autoswitch On

there are two hard disks that are mirroring

I will be thankful for ur help...
I want to extend /u01 & /u02
How I can do this without Online JFS??
11 REPLIES 11
Tim Nelson
Honored Contributor
Solution

Re: How extend LV & FS

Mirrored ??

How much would you like to extend each filesystem ?

Looks like you have about 10GB on each PV.

So let us assume you wish to grow each by 5GB and mirrored.

lvextend -L 15000 /dev/vg00/lvol9
umount /u01 ( this is assuming /u01 is lvol9 as you did not provide any info for that)
extendfs /dev/vg00/rlvol9
mount /u01
repeat the same for the other lvol.


BTW, having your application, assuming oracle, on your internal disk sharing the root volume is not a very good practice. But we will leave that for some other thread.


Galal
Advisor

Re: How extend LV & FS

Thanks Tim
lvextend -L 15000 /dev/vg00/lvol9
Why -L 15000 ....
to do this in multi or single-user mode
Tim Nelson
Honored Contributor

Re: How extend LV & FS

-L 15000 indicate 15GB, this vol was at 10000 ( or 10GB ) so we need to pick a number higher than the current config.

In order to unmount the filesystem all processes using /u01 must be stopped. Just because it is called /u01 I will assume this is on Oracle install, so, oracle must be stopped. Eiter just stop Oracle or the ultimate way to ensure nothing is running/using it is to go into single user but this is typically not required.



Galal
Advisor

Re: How extend LV & FS

for /u01
#lvextend -L 15000 /dev/vg00/lvol9 /dev/dsk/c1td2

umount /u01
extendfs /dev/vg00/rlvol9
mount /u01

for /u02
#lvextend -L 15000 /dev/vg00/lvol10 /dev/dsk/c1td2

umount /u02
extendfs /dev/vg00/rlvol10
mount /u02

what is about the other hard disk???
and are there any additional steps to this becuase the disks are bootable disks
Tim Nelson
Honored Contributor

Re: How extend LV & FS

You have two drives with about 10GB avail on each.

The lvols both look to be mirrored, so extending them also extends the mirror. Each lvol will take 5GB from each disk.

The disks being bootable have nothing to do with non-os lvols.

Your last steps are complete. Nothing more to do until you run out of space again. Then you will need to add more disk to this configuration. But...I would suggest at that time you get the lvol9 and lvol10 out of vg00 and create a new volume group with different NON OS disk. ( this is just a recommendation ).

Galal
Advisor

Re: How extend LV & FS

when I echo this command:

#cat /etc/fstab
/dev/vg00/lvol9 /u01 vxfs rw,suid,largef,delaylog,datainlog 0 2
/dev/vg00/lvol10 /u02 vxfs rw,suid,largef,delaylog,datainlog 0 2


Should I add more option to the below command:
#extendfs /dev/vg00/rlvol9

like :#extendfs - F vxfs /dev/vg00/rlvol9

becuase /u01 & /u02 are rw,suid....Are there any more ?????


Tim Nelson
Honored Contributor

Re: How extend LV & FS

no.

The extendfs command is run manually form a command prompt after you umount the filesystem(s).

No mods to /etc/fstab is needed.

Galal
Advisor

Re: How extend LV & FS

How I can check my system that the JFS is enabled or not???
if it is enabled, How can extend these File systems without downtime???
Sajjad Sahir
Honored Contributor

Re: How extend LV & FS

Dear Jalal



Jalal use swlist -l product | grep -i jfs
if online jfs is there
u can extend the file system without umounting
ok
u can use fsadm command for it
if online jfs is not there u have to umount
the file system first
and use extendfs command for extending file system
Yashwant
Valued Contributor

Re: How extend LV & FS

use following command to check whether online JFS is there

swlist -l product | grep -i jfs

If JFS is installed then use following command to extend file system..

e.g

lvextend -L 15000 /dev/vg00/lvol9
fsadm -F vxfs -b 51200 /u01


Yash
Galal
Advisor

Re: How extend LV & FS

Thanks all