Operating System - HP-UX
1752337 Members
5633 Online
108787 Solutions
New Discussion

Re: 11.23 Extend file system without using online JFS

 
SOLVED
Go to solution
JDR45
Frequent Advisor

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!

 

7 REPLIES 7
Patrick Wallek
Honored Contributor
Solution

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.

JDR45
Frequent Advisor

Re: 11.23 Extend file system without using online JFS

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

JDR45
Frequent Advisor

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!

JDR45
Frequent Advisor

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.

 

 

 

 

Patrick Wallek
Honored Contributor

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

JDR45
Frequent Advisor

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!

JDR45
Frequent Advisor

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.