Operating System - HP-UX
1752723 Members
6577 Online
108789 Solutions
New Discussion юеВ

Re: reduce space on filesystem to reallocate on other filesystem

 
sassou
Frequent Advisor

reduce space on filesystem to reallocate on other filesystem

hi,
I want to reduce space on filesystem to reallocate on other filesystem.
All the file system belongs to the sam volume group.
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: reduce space on filesystem to reallocate on other filesystem

If you have OnlineJFS you can do this with the fsadm command. If not, you will have to backup your data and recreate the lvol/filesystem.


Pete

Pete
Joseph Loo
Honored Contributor

Re: reduce space on filesystem to reallocate on other filesystem

hi,

u mean u like to perform lvreduce? please bear in mind that lvreduce will "wipe out" all info from that logical volume.

or do u mean u like to do a rm first before mv to another file system?

regards.
(p.s. by the way, i believe u have not assign points for a number of posts)
what you do not see does not mean you should not believe
SIJU JOSE
Frequent Advisor

Re: reduce space on filesystem to reallocate on other filesystem

SIJU JOSE
Frequent Advisor

Re: reduce space on filesystem to reallocate on other filesystem

Mark Grant
Honored Contributor

Re: reduce space on filesystem to reallocate on other filesystem

Well my take is this.

If you have onlineJFS you can do this online by first reducing the filesystem with "fsadm". Then you reduce the logical volume wiht "lvreduce". Then increase the second logical volume with "lvextend" and then increase it's filesystem with "fsadm".

If you do not have onlineJFS then you can not decrease the filesystem even though you can reduce the logical volume. If, by chance, you have space at the end of you filesystem then you are OK. Otherwise, as Pete says, you need to recreate the logical volume and filesystem to the new size.
Never preceed any demonstration with anything more predictive than "watch this"
Cheryl Griffin
Honored Contributor

Re: reduce space on filesystem to reallocate on other filesystem

You can reward the many people who have assisted you by assigning points to their posts.

For steps how to assign points see:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
"Downtime is a Crime."
SAHA
Honored Contributor

Re: reduce space on filesystem to reallocate on other filesystem

Take full backup of file system before lvreduce command.

Thanks,
You must PASS failure on way to success !!!
Rita C Workman
Honored Contributor

Re: reduce space on filesystem to reallocate on other filesystem

You got good tips already on how to reduce filesystems...but sometimes instead of reducing and adding, I look at simply moving data around to be more I/O efficient ....So....

Is this filesystem you want to reduce on maybe in the same volume group as the one you want to add to...???

Maybe you could look at doing pvmove to simply move the data on one lvol (in first fs) to another lvol (in second fs).

Just a thought, may not apply in your case...but you never know...
Rgrds,
Rita
Geoff Wild
Honored Contributor

Re: reduce space on filesystem to reallocate on other filesystem

Before reducing, defrag may be appropiate:

fsadm -F vxfs -d -D -e -E /mountpoint

then fsadm -b M /mountpoint

then lvreduce -L /dev/vgXX/lvolXX

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.