06-04-2013 10:50 AM
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
LV Size (Mbytes) 26624
Current LE 3328
Allocated PE 6656
I think I need to do lvextend, umount, extendfs and then fsadm but I'm not quite sure. So any advice would be appreciated.
Solved! Go to Solution.
06-04-2013 11:17 AM
>>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.
06-05-2013 07:31 AM
As it turns out, the server *does* have online JFS.
#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!
06-05-2013 08:06 AM
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.
/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
#lvremove -f /dev/vg01/custom/test/data
#lvextend -L [insert number here] /dev/vg01/lvol15
#lvextend -L [insert number here] /dev/vg01/custom/production/data
06-05-2013 08:31 AM
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
# 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.
# 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
06-12-2013 08:22 AM
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.