1847240 Members
341 Online
110263 Solutions
New Discussion

Re: lvreduce /tmp

 
M.sureshkumar
Regular Advisor

lvreduce /tmp

Hi All,

I need to reduce /tmp directory.
Pls give me the procedure for reduce the /tmp directory.I checked swllist, online jfs has already installed in this server.


Regards,
Suresh.
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: lvreduce /tmp

Hi Suresh,

# fsadm -d -e -D -E /tmp
# fsadm -b "reduced size in KB" /tmp
# lvreduce -L "new size in MB" /dev/vg00/lvolx

Regards,
Robert-jan
B. Hulst
Trusted Contributor

Re: lvreduce /tmp

Hi,

And clean up files from /tmp before you reduce it.

And try not to have much application activity going on in /tmp.

Regards,
Bob
Bill Hassell
Honored Contributor

Re: lvreduce /tmp

Very important: Online JFS (the fsadm command, not lvreduce) has a very poor record of success in reducing a filesystem without destroying all the data. Do not reduce the filesystem until you have a known good backup of the /tmp directory. With all the latest patches for VxFS and Online JF and converting the /tmp directory to the latest VxFS version should work OK.


Bill Hassell, sysadmin
Hoang Chi Cong_1
Honored Contributor

Re: lvreduce /tmp

Hi man

Take a look with these threads, them may help you:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=794280

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=65326

Goodluck!
Regard,
HoangChiCong
Looking for a special chance.......
Paul_481
Respected Contributor

Re: lvreduce /tmp

Hi,

If you can afford downtime, instead of using lvreduce, i suggest you just remove the logical volume of /tmp and re-create it again with your desired size.

Regards,
Paul
lawrenzo
Trusted Contributor

Re: lvreduce /tmp

I have reduced a filesystem recently and encountered a few issues,

when I managed to reduce the filesystem I corrupted the data!

I suggest either fbackup /tmp -f /

or

tar cvf .tar /tmp

then unmount /tmp, fully remove the lvol with lvremove

then recreate it, this will save time instead of messing around trying to reduce it and the data gets corrupt anyway.

HTH
hello