Operating System - HP-UX
1836354 Members
2538 Online
110100 Solutions
New Discussion

Re: Reducing vxfs filessytem/Logical Volume

 
John Jayaseelan
Super Advisor

Reducing vxfs filessytem/Logical Volume

Hi,

HP-UX 11.00

I have a HP vxfs filessytem testlv(/dev/test/testlv) created with 100MB. It contains files size worth 52MB. I wnat to reduce the filesystem/Logical volume to 64MB so that I can use the remaining space. I tried the following and received the message as follows:-

# fsadm -d -D -e -E /testlv
fsadm: /etc/default/fs is used for determining the file system type
vxfs fsadm: /testlv is not the root inode of a vxfs file sytem

Thanks
John Jayaseelan
15 REPLIES 15
Pete Randall
Outstanding Contributor

Re: Reducing vxfs filessytem/Logical Volume

#fsadm -d -D -e -E /testlv

should be

fsadm -d -D -e -E /dev/test/testlv

Pete

Pete
Armin Feller
Honored Contributor

Re: Reducing vxfs filessytem/Logical Volume

Hi,

please make sure if that is a vxfs filesystem:

# fstype -v /dev/test/testlv | grep -i f_basetype

IF, then please check if you have installed the newest LVM, VXFS, SCSI patches on your system.

IF NOT you have to use the LVM commands and to restore the datas from a backup:

# umount /testlv
# lvreduce -L 52 /dev/test/testlv
# newfs -F vxfs /dev/test/rtestlv
---> now restore the datas



Regards,
Armin
James R. Ferguson
Acclaimed Contributor

Re: Reducing vxfs filessytem/Logical Volume

Hi John:

If you *don't* have OnlineJFS then you cannot use 'fsadm' to shrink the filesystem. Instead, you must backup the filesystem; unmount it; use 'lvreduce' on the logical volume; resize the filesystem is with 'newfs'; remount it; and restore the data.

If you *do* have OnlineJFS then to shrink it you can try first defragmenting it to increase the odds that shrinking it will work. Use 'fsadm -b ', then 'lvreduce'. Unless you are using JFS 3.3 it is unlikely that shrinking it with 'fsadm' will work and you may have to resort to the backup/reload procedure just as if you didn't have OnlineJFS.

Regards!

...JRF...
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

I John,

Before reduce lvol you should reduce the file system. If you have online Jfs install try :
# fsadm -F vxfs -b [new_mb_size]M
# lvreduce -L [new_mb_size] /dev/test/testlv

Without JFS you should umount filesystem, reduce lvol and backup files.

Regards,
Jerome
John Jayaseelan
Super Advisor

Re: Reducing vxfs filessytem/Logical Volume

Hi,

Following are some of the results I tried with the suggested options.

# fstyp -v /dev/test/testlv | grep -i f_basetype
f_basetype: vxfs
[cctest01]: /tmp
# fsadm -F vxfs -b 64M /testlv
vxfs fsadm: /testlv is not the root inode of a vxfs file sytem
[cctest01]: /tmp
Could you please tell how to check online JFS is installed on the sytem.

Thanks
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

to check if is online jfs install :
# swlist -l product|grep -i online
You should have :
OnlineJFS B.11.11 Online features of the VxFS File System

Regards,
Jerome
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

Have you try fsadm with the caracter device ?

Regards,
Jerome
John Jayaseelan
Super Advisor

Re: Reducing vxfs filessytem/Logical Volume

The following is the version of online JFS on the system.

# swlist -l product|grep -i online
PHKL_24745 1.0 VxFS 31 OnlineJFS cumulative patch

# fsadm -F vxfs -b 64M /testlv
vxfs fsadm: /testlv is not the root inode of a vxfs file sytem
[cctest01]: /tmp
# fsadm -d -D -e -E /dev/test/testlv
vxfs fsadm: /dev/test/testlv is not the root inode of a vxfs file sytem

What is the 'not the root inode of a vxfs file sytem ' mean?

Regards,
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

John,
You don't have online JFS 3.3 install.
You should install this :
OnlineJFS 3.3 JFS 3.3 online (Advanced) filesystem features

Regards,
Jerome
John Jayaseelan
Super Advisor

Re: Reducing vxfs filessytem/Logical Volume

Hi,

Jerome, I tried with character device file and received the same error message.

# fsadm -d -D -e -E /dev/test/rtestlv
vxfs fsadm: /dev/test/rtestlv is not the root inode of a vxfs file sytem
[cctest01]: /tmp
# fsadm -F vxfs -b 64M /dev/test/rtestlv
vxfs fsadm: /dev/test/rtestlv is not the root inode of a vxfs file sytem
[cctest01]: /tmp

John Jayaseelan
Gerrit Beyken
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

Hi John,

in HP/UX 11.0 the Online JFS is named Advanced JFS.
So please do a "swlist -l product|grep -i adv" to see if OnlineJFS is installed.
If so you can defrag and then reduce your FS by doing:
- fsadm -d -D -e -E /testlv (mountpoint has to be choosed)
- fsadm -F vxfs -b 65536 /testlv
- lvreduce -L 64 /dev/test/testlv

regards

Gerrit
John Jayaseelan
Super Advisor

Re: Reducing vxfs filessytem/Logical Volume

Hi Gerit,

When I tried, fragementation went through fine, but reducing file system gave the following error.

# fsadm -F vxfs -b 65536 /testlv1
fsadm: /dev/test/rtestlv1 is currently 102400 sectors - size will be reduced
fsadm: attempt to resize /dev/test/rtestlv1 failed with errno 16

Regards
John Jayaseelan
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

John,

# grep 16 /usr/include/sys/errno.h
#define EBUSY 16 /* Mount device busy */

It's mean that you don't have online JFS 3.3 and you can't make this online.

Regards,
Jerome
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

John,

My last answer is a mistmatch.
I have found that your problem is solved in HP-UX 11.11 with PHKL_27554 but no fix at this time for 11.00.

Regards,
Jerome
Jerome Baron
Respected Contributor

Re: Reducing vxfs filessytem/Logical Volume

John,

My last answer is a mistmatch.
I have found that your problem is solved in HP-UX 11.11 with PHKL_27554 but no fix at this time for 11.00.

You can contact your HP support to ask a fix.

Regards,
Jerome