• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

Issue Server almost full

PablitoNoguez

New Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.66_build1800250106.19 os_Ubuntu 22.04
I read a lot of threads about this, but i have a different result when i used the commands.

First of all, i use
df -h
and i got this:

Filesystem Size Used Avail Use% Mounted on
/dev/root 310G 299G 12G 97% /
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 13G 1.2M 13G 1% /run
tmpfs 5.0M 32K 5.0M 1% /run/lock
efivarfs 56K 24K 27K 48% /sys/firmware/efi/efivars
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 6.3G 4.0K 6.3G 1% /run/user/0

after, i use on /
du -kxh | egrep -v "\./.+/" | sort -h

and i got this:


4.0K ./media
4.0K ./mnt
4.0K ./srv
8.0K ./.cache
16K ./lost+found
32K ./snap
100K ./tmp
316K ./home
1.9M ./root
16M ./etc
165M ./boot
3.0G ./usr
4.5G ./opt
54G ./var
61G .




Then the space used in the folders is not even close to the dev/root space

i dont know what im doing wrong
 
You might have bind mounts on the system which cause du and df to count twice the same used disk space.

Try:
Bash:
du -xcsh /* 2>/dev/null | grep G
to see actual used disk space

What do you have mounted?
Bash:
mount | grep -vE "tmpfs|tracefs|rpc_pipefs|binfmt_misc|sys|boot|proc|dev/pts|mqueue|hugepages"

What do you have in /etc/fstab?
 
the result for: du -xcsh /* 2>/dev/null | grep G
4.5G /opt
3.0G /usr
54G /var
61G total



then, i use the mount command and got this
/dev/sda1 on / type ext4 (rw,relatime,discard,errors=remount-ro)
/var/lib/snapd/snaps/core18_2829.snap on /snap/core18/2829 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/lxd_29351.snap on /snap/lxd/29351 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core20_2379.snap on /snap/core20/2379 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core18_2846.snap on /snap/core18/2846 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core20_2434.snap on /snap/core20/2434 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/lxd_31333.snap on /snap/lxd/31333 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
nsfs on /run/snapd/ns/lxd.mnt type nsfs (rw)
/var/lib/snapd/snaps/snapd_23258.snap on /snap/snapd/23258 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/snapd_23545.snap on /snap/snapd/23545 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/google-cloud-cli_303.snap on /snap/google-cloud-cli/303 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/google-cloud-cli_305.snap on /snap/google-cloud-cli/305 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)


and fstab got this

LABEL=cloudimg-rootfs / ext4 discard,errors=remount-ro 0 1
LABEL=UEFI /boot/efi vfat umask=0077 0 1
 
You might have bind mounts on the system which cause du and df to count twice the same used disk space.

Try:
Bash:
du -xcsh /* 2>/dev/null | grep G
to see actual used disk space

What do you have mounted?
Bash:
mount | grep -vE "tmpfs|tracefs|rpc_pipefs|binfmt_misc|sys|boot|proc|dev/pts|mqueue|hugepages"

What do you have in /etc/fstab?
the result for: du -xcsh /* 2>/dev/null | grep G
4.5G /opt
3.0G /usr
54G /var
61G total



then, i use the mount command and got this
/dev/sda1 on / type ext4 (rw,relatime,discard,errors=remount-ro)
/var/lib/snapd/snaps/core18_2829.snap on /snap/core18/2829 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/lxd_29351.snap on /snap/lxd/29351 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core20_2379.snap on /snap/core20/2379 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core18_2846.snap on /snap/core18/2846 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core20_2434.snap on /snap/core20/2434 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/lxd_31333.snap on /snap/lxd/31333 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
nsfs on /run/snapd/ns/lxd.mnt type nsfs (rw)
/var/lib/snapd/snaps/snapd_23258.snap on /snap/snapd/23258 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/snapd_23545.snap on /snap/snapd/23545 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/google-cloud-cli_303.snap on /snap/google-cloud-cli/303 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/google-cloud-cli_305.snap on /snap/google-cloud-cli/305 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)


and fstab got this
LABEL=cloudimg-rootfs / ext4 discard,errors=remount-ro 0 1
LABEL=UEFI /boot/efi vfat umask=0077 0 1
 
du only considers files that are actually present in the file system.
It is possible to create a file, keep it open and delete it. Such a file will still be able to be used for all practical purposes while it is open, keeping its allocated disk space until it is closed, when the space will be freed implicitly.
This is frequently used for temporary files, the advantage is that the file does not need to be cleaned up even if the process crashes.
Try lsof|grep deleted to see those files.
 
Back
Top