Sunday, 2 June 2013

How to increase the size of rootfs?

How to increase the size of rootfs?

So I got this error today and decided to investigate:
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!
I'm not sure how... but I've filled up my rootfs
root@crunchbang:/var/lib/mysql# df -h
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  9.2G  8.9G     0 100% /
udev                                                     10M     0   10M   0% /dev
tmpfs                                                   397M  648K  396M   1% /run
/dev/disk/by-uuid/84406341-a86f-444a-a89c-0b3f37a6e0a3  9.2G  8.9G     0 100% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                   2.4G  2.3M  2.4G   1% /run/shm
/dev/sda6                                               277G   19G  244G   8% /home
tmpfs                                                   2.4G  324K  2.4G   1% /tmp
Most of the space seems to be taken up by /var/log
root@crunchbang:/var/lib/mysql# du -hx --max-depth=1 /
0   /run
3.6G    /usr
7.4M    /bin
1.7G    /opt
12M /sbin
4.0K    /mnt
0   /sys
4.0K    /selinux
3.3G    /var
146M    /lib
4.0K    /.pulse
16K /lost+found
8.8M    /etc
0   /proc
4.0K    /srv
12K /media
57M /root
4.0K    /lib64
4.0K    /home
18M /boot
0   /dev
0   /tmp
8.7G    /
Here is my /var/log
root@crunchbang:/var/log# ls -al
total 3108
drwxr-xr-x 17 root        root      4096 Jun  2 12:59 .
drwxr-xr-x 12 root        root      4096 Mar 22 17:42 ..
-rw-r--r--  1 root        root       935 Jun  2 19:14 alternatives.log
-rw-r--r--  1 root        root       310 May 30 22:20 alternatives.log.1
-rw-r--r--  1 root        root       982 Apr 16 01:54 alternatives.log.2.gz
-rw-r--r--  1 root        root      4847 Mar 24 16:28 alternatives.log.3.gz
drwxr-x---  2 root        adm       4096 Jun  2 07:35 apache2
drwxr-xr-x  2 root        root      4096 Jun  1 07:35 apt
-rw-r--r--  1 root        root         0 Apr  1 07:35 aptitude
-rw-r--r--  1 root        root       389 Mar 29 08:02 aptitude.1.gz
-rw-r-----  1 root        adm      15367 Jun  2 19:21 auth.log
-rw-r-----  1 root        adm     120508 Jun  2 07:30 auth.log.1
-rw-r-----  1 root        adm       5329 May 26 07:30 auth.log.2.gz
-rw-r-----  1 root        adm       6070 May 19 07:30 auth.log.3.gz
-rw-r-----  1 root        adm       7739 May 12 07:30 auth.log.4.gz
-rw-r--r--  1 root        root     41044 Jan 19 10:35 bootstrap.log
-rw-rw----  1 root        utmp         0 Jun  1 07:35 btmp
-rw-rw----  1 root        utmp         0 May  1 07:35 btmp.1
drwxr-xr-x  2 root        root      4096 Jun  1 07:35 ConsoleKit
-rw-r-----  1 root        adm      77597 Jun  2 19:26 daemon.log
-rw-r-----  1 root        adm     181164 Jun  2 03:51 daemon.log.1
-rw-r-----  1 root        adm       6464 May 26 00:46 daemon.log.2.gz
-rw-r-----  1 root        adm       4139 May 19 03:21 daemon.log.3.gz
-rw-r-----  1 root        adm      20493 May 12 06:46 daemon.log.4.gz
drwxr-xr-x  2 root        root      4096 Mar 22 17:42 dbconfig-common
-rw-r-----  1 root        adm      56560 Jun  2 12:59 debug
-rw-r-----  1 root        adm     119093 May 31 15:17 debug.1
-rw-r-----  1

No comments:

Post a Comment