1849791 Members
2057 Online
104044 Solutions
New Discussion

Online JFS

 
SOLVED
Go to solution
Douglass A Anderson
Frequent Advisor

Online JFS

I have online JFS on HPUX 11i V1.

I have two file systems on the same VG.
One I want to decrease a GB and one I want to Increase a GB. I see a lot of ONline JFS entries in forums, but also a lot with. "don't mix up the order of these operations."

# bdf /prod/di
Filesystem kbytes used avail %used Mounted on
/dev/vg01ken14/fs-di 1048576 369774 642782 37% /prod/di

# bdf /prod/oraapps
Filesystem kbytes used avail %used Mounted on
/dev/vg01ken14/fs-oraapps 5242880 87609 4834637 2% /prod/oraapps
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor
Solution

Re: Online JFS

Hi Douglass:

...and your question is? I think that you want to know:

If you are shrinking a JFS (VxFS) filesystem you should perform a defragmentation first with 'fsadm'.

When shriking a filesystem, first decrease the size of the filesystem with 'fsadm'; then 'lvreduce' the size of the logical volume containing the filesystem.

When enlarging a filesystem. first increase the size of the logical volume container with 'lvextend'; then increase the size of the filesystem contained therein with 'fsadm'.

Does that answer your question?

Regards!

...JRF...
Ivan Krastev
Honored Contributor

Re: Online JFS

For taking space (1GB for example) from one logical volume (lvol1 for example) and assign it to other (lvol2) do the following:

1. reduce file system on the first volume with 1GB
2. reduce logical volume(lvol1), when first file system resides with 1GB
3. increase second volume - lvol2
4. extend second file system


regards,
ivan
Douglass A Anderson
Frequent Advisor

Re: Online JFS

What command lines would I use?
I understand there is -D to test and -d to do the defragmenting. and there is also a -E and -e (?) for a different test.
Tim Nelson
Honored Contributor

Re: Online JFS

Hey Doug,

Heard you moved on to somewhere else. Shoot me an email sometime.

Anyway.

To reduce ( scary ). Need to defrag the filesystem first then reduce but it does not reduce the lvol. You would then have to figure out how to correctly calculate the new size of the lvol if possible.
Your best and safest bet here is to create a new lvol with new size, move the data from old to new, delete the old. (or use backup method to backup and restore the data).

To extend, lvextend the lvol first, then fsadm -b newsize(m) /mount/point


http://docs.hp.com/en/5991-1227/5991-1227.pdf
Appendix A



Douglass A Anderson
Frequent Advisor

Re: Online JFS

can't you do
lvextend -L and fsadm -L
and
lvreduce -L and fsadm -L,
I just need the order.
Tim Nelson
Honored Contributor

Re: Online JFS

Commands:

This example takes 500MB away from /prod/di and gives 500MB to /prod/oraapps only because the math was easier, if the reverse you will to do the math to figure out the exact numbers.

Reduce:(take 500MB away)
fsadm -D /prod/di
fsadm -d /prod/di
fsadm -E /prod/di
fsadm -e /prod/di
fsadm -b 500m /prod/di
lvreduce -L 500 /dev/vg01ken14/fs-di

Extend:(do the math on the extents, maybe use -l instead of -L after reviewing with vgdisplay /dev/vg01ken14)
lvextend -L 5500 /dev/vg01ken14/fs-oraapps
fsadm -b 5500m /prod/oraapps



Make sure you have a backup !!! Just in case.

If you have a test server, test things out so you are comfortable.
Aashique
Honored Contributor

Re: Online JFS

Hi,
Here is the procedure,

Example,
decrease /prod/di to 500MB, prev size 1GB, new size 500MB

fsadm -F vxfs -b 512000 /prod/di
lvreduce -L 500 /dev/vg01ken15/fs-di


Increase /prod/oraapps to 500MB,prev size 5GB, new size 5.5GB

lvextend -L 5632 /dev/vg01ken14/fs-oraapps

fsadm -b 5767168 /prod/oraapps


Thanks & Regards
Douglass A Anderson
Frequent Advisor

Re: Online JFS

yes, that worked.