Operating System - HP-UX
1833776 Members
2071 Online
110063 Solutions
New Discussion

Decrease a filesystem size

 
SOLVED
Go to solution
Catherine Forget
Frequent Advisor

Decrease a filesystem size

Hi,
I need to decrease the size of a file system on my unix w/s but they do not have onlinJFS. Wat is the equivalent of fsadm to reduce the FS?
Thanks
7 REPLIES 7
Adam W.
Valued Contributor

Re: Decrease a filesystem size

Man "lvreduce"

The man page should contain more than enough information to proceed.
There are two types of people in the world, Marines and those who wish they were.
Patrick Wallek
Honored Contributor
Solution

Re: Decrease a filesystem size

If you don't have OnlineJFS installed, then you can reduce a file system on the fly.

In this case your steps are:

1) Back up your data
2) unmount the file system
3) lvremove the LV
4) lvcreate the LV as the new, smaller, size.
5) newfs the the LV
6) mount the LV
7) restore your data

James R. Ferguson
Acclaimed Contributor

Re: Decrease a filesystem size

Hi Catherine:

Because Unix has more than one way to do almost anything, in lieu of Patrick's step #3 and #4, you could 'lvreduce' the logical volume to its smaller size. Then proceed with step-5-7.

OnlineJFS is extremely valuable not only for dynamic resizing, but also for the ability to perform snapshot backups and the additional mount options it offers for your VxFS filesystems. You shouldn't leave home without it :-)

Regards!

...JRF...
Adam W.
Valued Contributor

Re: Decrease a filesystem size

my apologies.

First you should reduce the Filesystem(s).

tar -c /filesystem
umount (filesystem)
newfs -F vxfs -s (size) /path
mount (filesystem)
tar -x /filesystem (use prefered restore util now)

THEN use lvreduce to reduce the LV.
There are two types of people in the world, Marines and those who wish they were.
Adam W.
Valued Contributor

Re: Decrease a filesystem size

I love it when people ASSIGN POINTS for taking time out of our lives to assist other. Simply Amazing.
There are two types of people in the world, Marines and those who wish they were.
TTr
Honored Contributor

Re: Decrease a filesystem size

> I need to decrease the size of a file system ...

Which filesystem? It better not be one of the standard OS volumes/filesystems.
Catherine Forget
Frequent Advisor

Re: Decrease a filesystem size

Actually, Adam W., I assigned points.
I do not know why they are not there.
Thank you