1847858 Members
2763 Online
104021 Solutions
New Discussion

reducing file system

 
Joe Robinson_2
Super Advisor

reducing file system

Hello,

When trying to reduce a fs using the command:

fsadm -F vxfs -b 800m /fsname

I get the following error:

vxfs fsadm: /fsname is not the root inode of a vsfx file system

if someone can lead me in the right direction, I'll divy up the points!

Extra credit: I'm using 11.00 w/ Online JFS. using the above credit and then lvreduce, I should be able to do this without unmounting the filesystem, correct?

Thanks in advance,
Joe
16 REPLIES 16
A. Clay Stephenson
Acclaimed Contributor

Re: reducing file system

I suppose that 800m is Joespeak for 800MB. fsadm don't know nothing about this; all it knows is sectors> Your -b value should be 800 * 1024 or 819200. I assume /fsname is a valid vxfs mountpoint on your box.

Yes, you should be able to do this on a mounted filesystem BUT maybe not. It depends upon whether or not extents are in use. You may need to do a defragment operation first and then the operation MAY succeed. OnlineJFS Version 3.3 is better at shrinking filesystems than 3.1 (which was the original 11.0 vxfs version).
If it ain't broke, I can fix that.
Michael Schulte zur Sur
Honored Contributor

Re: reducing file system

Hi,

what does mount say?
Is /fsname a vxfs file system?

greetings,

Michael
Joe Robinson_2
Super Advisor

Re: reducing file system

hmmmm...Joespeak. My own language...I wonder if I can get royalties?

Actually, the defrag issue brought up a good point (namely that I'm sure I'm on 3.1 OJFS, not 3.3). I was thinking that fsadm could convert the math, but it's no problem to do the math (would be fsadm -x vxfs -b 819200 /fsname). Is the root inode an indication of fragmention, then?

Thanks!
Joe Robinson_2
Super Advisor

Re: reducing file system

ok...enough being "cryptic" (directed to self). The fs name is /patches, and is in my fstab.
Sanjiv Sharma_1
Honored Contributor

Re: reducing file system

Hi Joe,

Please check this link:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=142809
Everything is possible
generic_1
Respected Contributor

Re: reducing file system

If you have the patches available to you and can get the window to do it, I would recommend updating your online JFS version.
SS_6
Valued Contributor

Re: reducing file system

Take backup of file system. I assume you have online JSF
#fsadm -F vxfs -DEde /mountpoint
It will defrag and show the values also.
#fsadm -F vxfs -b 500M /mountpoint
If you wish to reduce the filesystem to 500MB
#lvreduce -L 500 /dev/vg**/lv**
Use the logical volume for that mount point.

By providing solutions I am helping myself
Bill Hassell
Honored Contributor

Re: reducing file system

If you assume that reducing a filesystem has a very high probability of destroying all the data, you'll be OK since you'll take extensive precautions. Reducing a filesystem has not had a good track record except with JFS 3.3 and version 4 vxfs filesystems. To see the vxfs version:

/usr/sbin/fstyp -v /dev/vgXX/rlvolYY | grep version


Bill Hassell, sysadmin
Joe Robinson_2
Super Advisor

Re: reducing file system

Thanks to all who replied...(for some reason, though, I can't assign points...what's up with that?)

I did check this morning and do have Online JFS 3.3, so that shouldn't be a problem. In this case, since the file system in question isn't critical, it's just as simple to delete the filesystem in question, recreate it at a smaller size, and the restore from tape. This being said, I still am going to want to figure out why I had to unmount that file system...would the vxfs version come into play with this? what is the difference between versions?
A. Clay Stephenson
Acclaimed Contributor

Re: reducing file system

3.1 JFS was version 3 vxfs layout but 3.3 is version 4. Version 4 is much better at shrinking and added support for ACL's. There is also some performance increase with version 4 filesystems. I suspect that the reason you had to unmount is that you have 3.3 installed but not yet licensed. 3.3 requires a run-time license to add support for the OnlineJFS features.
If it ain't broke, I can fix that.
Joe Robinson_2
Super Advisor

Re: reducing file system

Again, thanks to all who replied...

Clay, how do I go about licensing 3.3? I (probably incorrectly) assumed that the last support pack upgraded my install from 3.1 and that the licensing from before was still in effect...

Bill Hassell
Honored Contributor

Re: reducing file system

JFS 3.3 licensing is confusing because it is considered to be a separate product and I believe a separate license is required to activate it. This is different than HP standard software where a codeword is entered at installation time.


Bill Hassell, sysadmin
A. Clay Stephenson
Acclaimed Contributor

Re: reducing file system

Yes, Bill is correct. A separate license must be requested. You can issue a vxlicense -p command to display the configured options. Man vxlicense for details.
If it ain't broke, I can fix that.
Joe Robinson_2
Super Advisor

Re: reducing file system

Thanks Bill and Clay!

I've already requested the license to upgrade from 3.1 to 3.3; after I install that I plan on upgrading my file systems from vxfs 3 to vxfs 4. Based on your collective experience, is shrinking file systems (even when at version 4, with Online JFS 3.3) a dicey proposition? I'm starting to read between the lines and am starting to think that trusting this on a production box during work hours is rolling the dice...agreed? or do you find the software relatively safe when upgraded?
A. Clay Stephenson
Acclaimed Contributor

Re: reducing file system

I think I'll answer you this way: "Those who make good backups, never need them." It's one of God's little jokes. Typically, if the "shrink" command fails, fsadm will tell you that it couldn't complete the command and then exit w/o damage. Note the use of the word "typically". Version 4 is much safer in the shrink than earlier version but I would also make sure that you have the latest LVM/vxfs/JFS cumulative patches installed as well.

The far more typical use of OnlineJFS is to "grow" filesystems "on the fly". I regularly do that, without backups (other than nthe normal ones, of course), and have never been burned regardless of the vxfs version.
If it ain't broke, I can fix that.
Joe Robinson_2
Super Advisor

Re: reducing file system

I agree; from "growing" file systems w/ Online JFS, I've been very pleased. It would sure be nice if HP would address "shrinking" in its future versions of Online JFS (so it could be done from SAM).

Regards,
Joe