1830624 Members
1960 Online
110015 Solutions
New Discussion

lvreduce issue

 
SOLVED
Go to solution
Selvaraj
Advisor

lvreduce issue

Dear Experts,

I need to know what it means when I tried to reduce this logical volumes in Hp unix 11.00.
I do have online JFS on it.

# fsadm -F vxfs -b 400 /tmp
fsadm: cannot shrink /dev/vgsm25/rlvol4 - upgraded fs - inodes are currently in use.
#

Any help appreciated !
You can do it man !
6 REPLIES 6
Jeff Schussele
Honored Contributor
Solution

Re: lvreduce issue

Hi,

It means that the space you're trying to remove is in use.
What's the usage on that FS now?
Are you trying to reduce more that what's already in use?
If not your only hope is to defrag the FS with
fsadm -F vxfs -d -D -e -E /mnt_point
and it may take several passes.
But my rules-of-thumb are:
1) You *must* be JFS 3.3 v4 or higher
fstyp -v /mnt_point
2) Anything above 50% usage is still touch-and-go.
Check the actual layout usage with
lvdisplay -v /dev/vg_name/_lv_name
and note just what LEs are in use because it's going to lop them off from the back end forwards.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Selvaraj
Advisor

Re: lvreduce issue

Jeff,

This filesystem usage is less than 1 % only.
But I do see JFS as old version.. will it help me?

#swlist |grep -i jfs
B3929BA B.11.00 HP OnLineJFS (Advanced VxFS)
B5118BA B.11.00 HP OnLineJFS (Advanced VxFS)
PHKL_22393 1.0 VxFS 31 OnlineJFS cumulative patch

# fstyp -v /dev/vgsm25/rsmcores
vxfs
version: 3
f_bsize: 8192
f_frsize: 1024
f_blocks: 1280000
f_bfree: 1168168
f_bavail: 1095158
f_files: 324808
f_ffree: 292040
f_favail: 292040
f_fsid: 1074135052
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 6
f_size: 1280000
#
You can do it man !
A. Clay Stephenson
Acclaimed Contributor

Re: lvreduce issue

One of the enhancements to the version 4 vxfs filesystem (11.0 OnlineJFS 3.3) was a much greater ability to shrink the filesystem. I've seen some corruption problems under your version of OnlineJFS when reducing filesystem --- especially if your patches are not up to date. You can convert to vxfs version 4 "on the fly" and probably be able to shrink the filesystem. Growing filesystems has always been a safe operation but if I were you I would not attempt this with a backup. If only 1% of the filesystem is in use, you would just as well off to back up, destroy the LVOL, and build a new LVOL/filesystem and restore from backup.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: lvreduce issue

Only the very latest Online JFS with version 4 filesystems can be reduced successfully. Rather than trying to figure out your version of Online JFS, Patch level and filesystem version, just assume that lvreduce wil ALWAYS destroy the entire filesystem and you will be safe. Backup the filesystem, un-mount it, lvreduce the lvol, and recreate a new filesystem with newfs. Then mount the filesystem and restore the data.


Bill Hassell, sysadmin
Roland Piette
Regular Advisor

Re: lvreduce issue

Becarefull,

-b option give space in bloc.

A good way to convert the size in MB is to use -b $((400 * 1024)).

man fsadm_vxfs gives more details.

You can maybe have this error also if you haven't Online JFS package.

I hope it will help you !
Hoang Chi Cong_1
Honored Contributor

Re: lvreduce issue

Man,

Make sure that there isn't any process or user access to /tmp file system...
Try to kill:
#fuser -cu /tmp
#fuser -kcu /tmp

and try to reduce.......

Notice: need to backup any needed file before reduce...some time you will lost all of the data...

Goodluck
Best and regard,
HoangChiCong
Looking for a special chance.......