cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.
Ganesan R
Honored Contributor

Re: Extending the LV

Hi Senthilkumar,

Be sure to specify the M after size(310000M).

If you haven't specified M, fsadm will interpret that as bytes and inturn reduce the filesystem and corrupt the data.
Best wishes,

Ganesh.

Re: Extending the LV

If you can and must place the size full, with lvextend-L must specify the size in Mb and with fsadm-b specify the size in Kb
Rahul Rai_1
Frequent Advisor

Re: Extending the LV

Hi Senthil,

there is very simple steps in hp to increae lv or fs size here is only two steps if you have JFS.

(i)# lvextend -L 317440 /dev/vg01/lvol1

-L:- with this option size should be in mb and should be total required size.

or, if you have seperate free disk of 100 gb you can do simply

# lvextend -L 317440 /dev/vg01/lvol1 /dev/dsk/cxtxdx

after this when you increase the size of your lv then you have to increase your fs size.

(ii)# fsadm -F vxfs -b 325058560

-F:-type of filesystem (vxfs)
-b:-size should be there in kb

just keep in mind only two steps for same, if you have JFS.

Regards,
Rahul Rai.