Operating System - HP-UX
1753844 Members
7456 Online
108806 Solutions
New Discussion юеВ

Problem reducing vxfs filesystem online

 
SOLVED
Go to solution

Problem reducing vxfs filesystem online

Hi. I get an error trying to shrink a mounted vxfs filesystem, despite defragmented. Any clue someone ?

root@host:/ > bdf /cslayer
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol21 159744 56335 97202 37% /cslayer
root@host:/ > df -g /cslayer
/cslayer (/dev/vg00/lvol21 ) :
8192 file system block size 1024 fragment size
159744 total blocks 103409 total free blocks
97202 allocated free blocks 28188 total i-nodes
25852 total free i-nodes 25852 allocated free i-nodes
1073741840 file system id vxfs file system type
0 flags 255 file system name length
/cslayer file system specific string
root@host:/ >
root@host:/ > fsadm -F vxfs -d -e /cslayer
root@host:/ > fsadm -F vxfs -b 81920 /cslayer
fsadm: cannot shrink /dev/vg00/rlvol21 - upgraded fs - inodes are currently in use.
root@host:/ > fuser -cu /cslayer
/cslayer:

root@host:/ >
9 REPLIES 9
Lorenzo Facello
Valued Contributor

Re: Problem reducing vxfs filesystem online

Hi,
Maybe this helps you
Regds
L.
Robert-Jan Goossens
Honored Contributor

Re: Problem reducing vxfs filesystem online

Hi,

Check this doc,

Document description: How to reduce a JFS 3.1 filesystem
Document id: KBRC00011321

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000067342554

Hope this helps,
Robert-Jan
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Problem reducing vxfs filesystem online

This is fairly common. It means that despite defragmenting block are still in use in the area that you want to shrink. The newer versions of vxfs (Version 4) are much better at this than previous versions. In fact, unless the older versions were well-patched, data corruption was possible. I think the real answer to your problem is the one you don't want to hear. Back it up, create a new filesystem, and restore.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: Problem reducing vxfs filesystem online

I would suggest the following:

You can't reduce a filesystem down to a 99% full state. Especially an active one. You need to set a realistic target.

Try defragmenting it prior to reduction.

See attached script.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bharat Katkar
Honored Contributor

Re: Problem reducing vxfs filesystem online

Try this and then reduce.. see if it helps:

#fuser -kuc /cslayer
You need to know a lot to actually know how little you know
Sanjay_6
Honored Contributor

Re: Problem reducing vxfs filesystem online

Hi,

Is the filesystem layout type Version 4 or 3. fstyp -v will tell you this.

Try this link from itrc,

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062908240

The itrc doc id is KBRC00006692.

Hope this helps.

Regds


Fabio Ettore
Honored Contributor

Re: Problem reducing vxfs filesystem online

Hi,

just a thought: have you reduced the logical volume before?

Take attention that in order to reduce the filesystem size it is needed to reduce before the filesystem and then logical volume.

Repeat, just a thought!

Best regards,
Ettore
WISH? IMPROVEMENT!
Jeff Schussele
Honored Contributor

Re: Problem reducing vxfs filesystem online

Hey SEP - read the post. He *did* defrag it.
Clay's spot on - reductions are a hit & miss thing in 3.1 & 3.3. As stated v4 is better, but I still *never* count on a reduction to work - even when usage in down in the 25% range & with 3 defrags. Bottom line is - fbackup (2 of 'em) is your best friend if you're going to try it.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
SS_6
Valued Contributor

Re: Problem reducing vxfs filesystem online

I did it few times without any problem.
Take backup of file system.
Defrag first
#fsadm -F vxfs -DEde /usr

Reduce to new size e.g 3000MB
#fsadm -F vxfs -b 3000M /usr
#lvreduce -L 3000 /dev/vg00/lvxxx
Note:Use the logical volume mounted on /usr
By providing solutions I am helping myself