Operating System - HP-UX
1753613 Members
5845 Online
108797 Solutions
New Discussion юеВ

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