On Fri, Jan 13, 2012 at 03:45:47PM +0200, lilit-aibolit wrote:
> 13.01.2012 14:28, Francois Pussault P?P8QP5Q:
>
> >
> >With a so huge /var 90% is anormal, you should already look for a
logrotate
> >solution or choose a new partition map you will use on next update of the
> >machine.
> >

That was your best option, as I see it.

>
> First of all, thanks all for your replies.
> As I said /var is used for www-aplication under chroot apache.
> /var/log is clear:
>
> # du -sch /var/*
> 2.0K    /var/account
> 2.0K    /var/audit
> 2.0K    /var/authpf
> 1.5M    /var/backups
> 730K    /var/cache
> 4.0K    /var/crash
> 20.0K   /var/cron
> 14.7M   /var/db
> 4.0K    /var/empty
> 44.0K   /var/games
> 1.4M    /var/log
> 8.0K    /var/lost+found
> 4.2M    /var/mail
> 4.0K    /var/msgs
> 26.4M   /var/mysql
> 52.0K   /var/named
> 2.0K    /var/quotas
> 152K    /var/run
> 2.0K    /var/rwho
> 2.0K    /var/sasl2
> 2.0K    /var/siproxd
> 28.0K   /var/spool
> 781M    /var/squid
> 4.0K    /var/tmp
> 1.4G    /var/www
> 28.0K   /var/yp
> 2.2G    total
>
> do I understand correctly, that in my case the easiest way is
> decrease /home and increase /var?

To shrink /home from the head you would have to (from single user mode):
1) dump(8) your current /home.
2) Change the slice for /home (k) to a higher start and smaller size
   to end where it ends today, and still start on a cylinder boundary.
3) Zero the start 1 MB of the slice with dd.
4) Create a new empty filesystem on that slice.
5) restore(8) the saved /home content onto the "new" slice.

To increase /var you would have to (from single user mode):
1) Create space at the tail of /var's slice by shrinking the slice after from
the head.
2) Unmount /var
3) Grow the /var filesystem using growfs(8).

But since your /var is slice e and /home is slice k that can not be done.
You will have to find some other disk space to dump(8) and restore(8)
your current /var into. Or chroot your apache into some other filesystem.
Or reinstall with better partitionint, or...

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply via email to