1753481 Members
4309 Online
108794 Solutions
New Discussion юеВ

Re: Extending the LV

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Extending the LV

Hi

I want to correct myself on extending the LV size.

For examble,

My LV name : /dev/vg02/lvol1
Size : 210GB

Now i want to extend this to 310GB (that is to increase 100GB).

1)Can I use following method if it is hfs:

# umount /dev/vg01/lvol1

# lvextend -L 310000 /dev/vg01/lvol1

# fsck /dev/vg01/lvol1 ---> is it needed?

# extendfs -F hfs /dev/vg01/lvol1

# then we have to mount it again.


2) Can i use following method if it is vxfs(jfs) and Online JFS not installed.

# umount /dev/vg01/lvol1

# lvextend -L 310000 /dev/vg01/lvol1

# fsck /dev/vg01/lvol1 ---> is it needed?

# extendfs -F vxfs /dev/vg01/lvol1

# then we have to mount it again.

3)Can we use follwoing method if online jfs is installed?

# fsadm -F vxjs -b 100000M /mount_point

So advantage of online Jfs is that we dont need to unmount the file system?

And in "fsadm" we need just to give the increment size only, not total size?

So these are my views pls correct myself.
12 REPLIES 12
Pete Randall
Outstanding Contributor

Re: Extending the LV



# fsck /dev/vg01/lvol1 ---> is it needed?

No

So advantage of online Jfs is that we dont need to unmount the file system?

Yes


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: Extending the LV

Shalom

1)Can I use following method if it is hfs:

# umount /dev/vg01/lvol1

# lvextend -L 310000 /dev/vg01/lvol1
This can be done before umount

# fsck /dev/vg01/lvol1 ---> is it needed?
No, not needed

# extendfs -F hfs /dev/vg01/lvol1

# then we have to mount it again.


2) Can i use following method if it is vxfs(jfs) and Online JFS not installed.

No need to umount with OnlineJFS. That is kind of the point.


3)Can we use follwoing method if online jfs is installed?

# fsadm -F vxjs -b 100000M /mount_point

So advantage of online Jfs is that we dont need to unmount the file system?
YES

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
senthil_kumar_1
Super Advisor

Re: Extending the LV

Hi

I still want to clarify myself.

1)Can we use second method (2) to create the filesystem even if online JFS installed?

2) is third (3) command is used to just inrease 100GB?
UVK
Trusted Contributor
Solution

Re: Extending the LV

No need of doing fsck while extending filesystem.



1)Can we use second method (2) to create the filesystem even if online JFS installed?

yes you can do the 2nd method even if online JFS is installed.

2) is third (3) command is used to just inrease 100GB?

First extend the lvol using lvextend and then do a fsadm but use the new size as 310 not 100
-------------------------------------------
Like it or worked !! Click kudos !!
Steven E. Protter
Exalted Contributor

Re: Extending the LV

Second question.

Method 2 will work, but contains extra steps.

Method 3 is the best if Online JFS is available and licensed.

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
Robert-Jan Goossens
Honored Contributor

Re: Extending the LV

Hi

I still want to clarify myself.

1)Can we use second method (2) to create the filesystem even if online JFS installed?

Yes you can still use umount lvextend extendfs mount even when online-jfs is installed.

2) is third (3) command is used to just inrease 100GB?

# lvextend -L [new_size_MB] /dev/vgxx/lvoly

Extend the JFS file system online

# fsadm -F vxfs -b [new_size_MB]M /filesystem

Regards,
Robert-Jan
Bill Hassell
Honored Contributor

Re: Extending the LV

There will always be two commands required to extend a volume with a filesystem. The first is to make the lvol bigger (lvextend) and the other is to inform the filesystem that it can use more space (fsadm or extendfs). With Online JFS, you do not have to umount and mount the filesystem.

Be aware that most of the fsadm man pages have a big error: they omit the "m" option to the -b parameter, and they do not define "sector". The first time you use fsadm -b 310000 and the message "filesystem will be reduced" will be very scary. But don't worry. fsadm will quit when it finds that it cannot be reduced without damaging the data.


Bill Hassell, sysadmin
senthil_kumar_1
Super Advisor

Re: Extending the LV

Hi

My LV name : /dev/vg02/lvol1
Size : 210GB

Now i want to extend this to 310GB (that is to increase 100GB).

So now i have to used these below two commands if i want to user online JFS (if it is installed).

# lvextend -L 310000 /dev/vg01/lvol1

# fsadm -F vxjs -b 310000M /mount_point

so in fsadm, do we have to mention full size like lvextend.

Am correct

Ganesan R
Honored Contributor

Re: Extending the LV

Hi Senthilkumar,

>>>so in fsadm, do we have to mention full size like lvextend.<<<

Yes. you are right. You need to specify the full size not the increased size.

Your earlier statement is wrong.
>>>And in "fsadm" we need just to give the increment size only, not total size?<<<

This is wrong. Be cautious. If you specify the increment size, filesystem size will reduced and corrupt the data.
Best wishes,

Ganesh.