Operating System - HP-UX
1753578 Members
6238 Online
108796 Solutions
New Discussion юеВ

Re: Reduce /var/adm/crash

 
SOLVED
Go to solution
Dags
Frequent Advisor

Reduce /var/adm/crash

Hi HP-UX Admins,

I want to reduce my /var/adm/crash. I'm running HP-UX B.11.31 ia64.

Please help.

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 263264 1819656 13% /
/dev/vg00/lvol1 2097152 345304 1738240 17% /stand
/dev/vg00/lvol8 10485760 1152832 9260112 11% /var
/dev/vg00/lvol9 75235328 84704 70453845 0% /var/adm/crash
/dev/vg00/lvol7 9732096 2900568 6778160 30% /usr
/dev/vg00/lvol4 2097152 1309352 781776 63% /tmp
/dev/vg00/lvol6 14680064 5212552 9393624 36% /opt
/dev/vg00/lvol5 5242880 2328896 2891288 45% /home
5 REPLIES 5
Fabio Ettore
Honored Contributor

Re: Reduce /var/adm/crash

Hi,
if you have OnlineJFS (swlist -l product |grep -i online) then you can reduce it online:

fsadm -F vxfs -b M /
(note that M is nearby at number of final size)
lvreduce -L /dev/vg00/lvol9

If you don't have OnlineJFS you have to rebuild the filesystem (newfs/restore data).

Hope this helps you.

Best regards,
Fabio
WISH? IMPROVEMENT!
Dags
Frequent Advisor

Re: Reduce /var/adm/crash

Hi Fabio,

Thanks for your reply.

I think I have it.

# swlist |grep -i JFS
OnlineJFS B.11.31 Online features of the VxFS File System

Will assign points later to determine the effectiveness of your suggestion. :)
Matti_Kurkela
Honored Contributor
Solution

Re: Reduce /var/adm/crash

OnlineJFS is not necessary for this reduction.

Since the system writes to /var/adm/crash only when "savecrash" is executing (which normally happens at boot time only), you can unmount your /var/adm/crash to reduce it.

Looks like your /var/adm/crash is almost completely empty. The easiest way to reduce it would be to backup whatever is in /var/adm/crash, unmount it, then use lvreduce to reduce the size of /dev/vg00/lvol9, then mkfs it again and restore the backed-up files.

Replace with the size you want, in MB.

cd /
tar cvf /tmp/var_adm_crash.tar /var/adm/crash
umount /var/adm/crash

lvreduce -L /dev/vg00/lvol9
mkfs -F vxfs -o largefiles /dev/vg00/rlvol9

mount /var/adm/crash
cd /
tar xvf /tmp/var_adm_crash.tar

MK
MK
Fabio Ettore
Honored Contributor

Re: Reduce /var/adm/crash

Hi,
yes, /var/adm/crash is for saving crashes and the filesystem should be easily unomunted. However I often have customers which save depots under /var/adm/crash.
It shouldn't be a good habit as it's not the purpose of that filesystem but rather than backup data (any data) and recreate filesystem and restore data I think OnlineJFS is the best approach. It means that with just 2 commands you reduce the filesystem.

Dags,good to know you have it. Let us know the results.

Best regards,
Fabio
WISH? IMPROVEMENT!
Dags
Frequent Advisor

Re: Reduce /var/adm/crash

Thanks MK for the detailed commands. This solved my problem. :D

Thanks Fabio for your help.:D

Happy weekend guys.