1830912 Members
1912 Online
110017 Solutions
New Discussion

Re: Reduce a File System

 
SOLVED
Go to solution
alessandro_37
Advisor

Reduce a File System

Dear all, i wont reduce a my filesystem (i am trying with using a Test Filesystem).

my HP-UX is:
HP-UX hptest B.11.00 U 9000/800 580776597 unlimited-user license but note that i don't have installed "FSADM" utility to increase/reduce a filesystem.

The filesystem test to reduce is an Vxfs type:
/dev/vg01/test 40960 1118 37358 3% /test


How can I use lvreduce it?
(i have already expanded this filesystem with lvextend and extendfs command but i don't know about the reduce)

Can you help?
Thanks Alex


7 REPLIES 7
Mark Grant
Honored Contributor
Solution

Re: Reduce a File System

Without OnlineJFS, you can't. You have the option of creating a new smaller one and copying all the data over though.
Never preceed any demonstration with anything more predictive than "watch this"
KapilRaj
Honored Contributor

Re: Reduce a File System

To reduce u will need to re-create the filesystem.

1. Backup data
2. umount /mount_point
3. lvreduce ......
4. newfs ...
5. mount /mount_point
6. Restore data

Regds,

Kaps
Nothing is impossible
Bharat Katkar
Honored Contributor

Re: Reduce a File System

Alex,
Reducing fileSystem doesn't guarantee of data in it. First backup the data and then try reducing it as below.

# lvreduce -f -L /dev/vg01/test

Remeber after reducing the final size of File System would be the one you entered above.
-f forcefull operation

Also see man lvreduce

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Bharat Katkar
Honored Contributor

Re: Reduce a File System

Alex,
Also even though it doesn't guarantee of data but i have seen it intact couple of time. It depends on how PE are allocated to your FS at lower level.

Suppose you have 10 GB FS and data 5 GB and you are reducing it to 7 GB then there are chances that it may show your data after reduction.

But don't take chances backup your data first.
If you are lucky enough then restoring headache will go away.

Regards,
You need to know a lot to actually know how little you know
alessandro_37
Advisor

Re: Reduce a File System

Thanks for You information.
Incredible if i haven't OnlineJFS I can't reduce a filesystem!!

How can verify is OnlineJFS is installed?
Normally i use this examotage:

fsadm -F vxfs -DEed /test/path1
I receive this message:
sadm: the -d and -e options require "HP OnLineJFS (Advanced Vxfs)"

There is anoter modality to verify it?

i have already used this command:
swlist | grep -i jfs (is it correct ??)
Thanks a lot
Alex







Mark Grant
Honored Contributor

Re: Reduce a File System

Your swlist command line is correct. If you get nothing, you haven't got it. To get it, you have to pay for it I'm afraid.
Never preceed any demonstration with anything more predictive than "watch this"
Fabio Ettore
Honored Contributor

Re: Reduce a File System

Ciao Alessandro,

as other ITRC people said you cannot reduce a filesystem without OnLineJFS.

If you obtained those messages on -d and -D options sure you have not it. Anyway launch

# swlist -l product | grep -i online
or
# swlist -l product | grep -i jfs

You should not see anything about OnLineJFS.

Best regards,
Ettore


WISH? IMPROVEMENT!