11.23 Extend file system without using online JFS (1056 Views)
Reply
Occasional Advisor
JDR45
Posts: 12
Registered: ‎09-25-2012
Message 1 of 8 (1,056 Views)
Accepted Solution

11.23 Extend file system without using online JFS

Hello,

 

I am trying to add 10 GB to a filesystem.  The server has JFS Base VxFS File System but doesn't have Online JFS.  I'm used to working with the online version so I'm in new territory here.

 

/dev/vg01/lvol15/custom/production/data is what I am trying to increase in size.

 

vgdisplay /dev/vg01 shows PE Size (Mbytes) as 8 and Free PE as 822

 

lvdisplay /dev/vg01/lvol15 shows

Mirror copies 1

Schedule parallel

LV Size (Mbytes) 26624

Current LE 3328

Allocated PE 6656 

Allocation strict

 

I think I need to do lvextend, umount, extendfs and then fsadm but I'm not quite sure.  So any advice would be appreciated.

 

Thanks much!

 

Honored Contributor
Patrick Wallek
Posts: 13,777
Registered: ‎06-21-2000
Message 2 of 8 (1,049 Views)

Re: 11.23 Extend file system without using online JFS

>>I am trying to add 10 GB to a filesystem.

>>vgdisplay /dev/vg01 shows PE Size (Mbytes) as 8 and Free PE as 822

 

>>lvdisplay /dev/vg01/lvol15 shows

>>Mirror copies 1

>>LV Size (Mbytes) 26624

>>Current LE 3328

>>Allocated PE 6656 

 

I don't think you have enough disk space available to add 10 GB to lvol15.

 

You currently only have 6,576 MB available (8 MB PE Size x 822 PEs available) which is way less than your 10 GB you want to add.

 

Also, your lvdisplay output shows that lvol15 is mirrored.  That reduces the amount of disk space you have available by 50%.  To add 10 GB to a mirrored logical volume would require 20 GB of free disk space, or 2,560 free PEs.  With your current amount of free space you can only add 3,288 MB.

 

To add ALL of your current disk space you would need to do:

 

# lvextend -L 29912 /dev/vg01/lvol15

 

Since you don't have online JFS:

 

# umount /dev/vg01/lvol15

# extendfs /dev/vg01/lvol15

# mount /dev/vg01/lvol15

 

You are now done and you the additional space should be available.  You do NOT need to do anything with 'fsadm' at this point.

 

Also, if you look at a 'vgdisplay vg01' output you should have '0' free PEs.

Occasional Advisor
JDR45
Posts: 12
Registered: ‎09-25-2012
Message 3 of 8 (1,042 Views)

Re: 11.23 Extend file system without using online JFS

Very interesting, thanks!  That gives me all sorts of stuff to think about.

Occasional Advisor
JDR45
Posts: 12
Registered: ‎09-25-2012
Message 4 of 8 (1,022 Views)

Re: 11.23 Extend file system without using online JFS

As it turns out, the server *does* have online JFS.

 

I ran-

 

#swlist -l product JFS

 

And got "The Base VxFS File System."  I was expecting to see that plus something about online JFS but that did not show up in the output.

 

Later I searched likethis-

 

#swlist -l product | grep -i online

 

And saw "Online features of the VxFS File System."

 

So yeah, that makes things easier!

Occasional Advisor
JDR45
Posts: 12
Registered: ‎09-25-2012
Message 5 of 8 (1,018 Views)

Re: 11.23 Extend file system without using online JFS

Now I'm trying to ged rid of a filesystem that is no longer needed so I can throw the extra space from that onto the filesystem that needs to be increased in size.

 

From bdf-

 

/dev/vg01/lvol13 2097152 kb 21287 used 1949803 avail 1% /custom/test/data -- is going away

 

/dev/vg01/lvol15 27262976 kb 14320900 used 12229316 54% /custom/production/data -- to be increased

 

So it will be lvremove -f to get rid of one and lvextend -L to increase the other.  The part I'm getting confused on is how much of the path I need to type in?

 

#lvremove -f /dev/vg01/lvol13

or

#lvremove -f /dev/vg01/custom/test/data

 

Then

 

#lvextend -L [insert number here] /dev/vg01/lvol15

or

#lvextend -L [insert number here] /dev/vg01/custom/production/data

 

Thanks again.

 

 

 

 

Honored Contributor
Patrick Wallek
Posts: 13,777
Registered: ‎06-21-2000
Message 6 of 8 (1,015 Views)

Re: 11.23 Extend file system without using online JFS

When working with logical volumes and the 'lv*' commands, you always use the full logical volume name.

 

In your case you would need to do:

 

# lvremove -f /dev/vg01/lvol13

 

and

 

# lvextend -L [insert number here] /dev/vg01/lvol15

 

When you use the 'fsadm' command to extend a file system online, you use the mount point and can specify the size in MB (the same number you use in your 'lvextend -L' command) by putting an 'm' after the size.

 

For example:

 

# fsadm -b 30000m /mount/point

 

The above extends the /mount/point file system to 30,000 MB.

 

In your case it would be:

 

# fsadm -b [insert number here]m /custom/production/data

Occasional Advisor
JDR45
Posts: 12
Registered: ‎09-25-2012
Message 7 of 8 (1,008 Views)

Re: 11.23 Extend file system without using online JFS

Got it, thanks.  I don't get to do this type of work all that often so I appreciate the help!

Occasional Advisor
JDR45
Posts: 12
Registered: ‎09-25-2012
Message 8 of 8 (956 Views)

Re: 11.23 Extend file system without using online JFS

Everything went well, but I did see something a little odd when I was doing

 

#fsadm -b 31960m /mount/point

 

That command gave me an error- "sectors must be >= 15160632 as they are currently in use."

 

I watied a few minutes then tried the same command, only with an uppercase M this time.  That worked, and returned, "... is currently 27262976 sectors, size will be increased."

 

So I'll add the uppercase M to my notes for next time, because it seemed to make a difference.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.