0

I have this error

session_write_close(): Write failed: No space left on device (28)

and this is the output of df -h

root@localhost:/dev/mapper# df -h
Filesystem             Size  Used Avail Use% Mounted on
tmpfs                  791M  1.1M  790M   1% /run
/dev/mapper/vg00-lv01  155G  149G     0 100% /
tmpfs                  3.9G  4.0K  3.9G   1% /dev/shm
tmpfs                  5.0M     0  5.0M   0% /run/lock
/dev/vda1              488M  361M   91M  80% /boot
tmpfs                  791M  8.0K  791M   1% /run/user/1001

and this is the sizes of var folders:

root@localhost:/var# du -sh * | sort -h
0   lock
0   run
4.0K    crash
4.0K    local
4.0K    mail
4.0K    opt
20K spool
52K tmp
64K snap
2.4M    backups
240M    cache
246M    log
1.6G    www
1.8G    lib

How to fix it ?

hous
  • 225

1 Answers1

2

So the du -sh * isn't showing the full picture of whatever is hogging the 149G.

I would do something like: du -a 2>/dev/null | sort -n -r | head -n 20 or du -sh * 2>/dev/null | grep G To get some understanding of what's the easiest thing to cleanup.

Also there are some minor cleanup that can be done in regards to the log folder like clearing up older and setting up log rotate. That will be a bit useless for your current state of play.

I see "www", so assuming webserver. You probably should consider trying to understand what ended up getting added on the server (patching, deployment) and try to cleanup.

Check with lsof command to see if there is anything that's potentially writing lots and perhaps assess if the processes opening those files can be killed and files cleaned up.

If everything seems to be in order, then the next logical step would probably be to assume that you need all the things hogging the space and extend your volume group.

If that's not an option and you are desperate there are things like reclaim the reserved space (that will bite you in the derriere quite fast, i assume)

Things to read further:

/dev/mapper/ full

https://www.redhat.com/en/blog/analyze-processes-lsof

https://help.univention.com/t/how-to-how-to-extend-a-lvm-volume-group/17146

Pizza
  • 1,512