This shows you the differences between two versions of the page.
— | manuals:vps:full_disk [2022/06/08 09:30] (current) – created Aither | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Dealing with full disks ====== | ||
+ | |||
+ | We can use '' | ||
+ | |||
+ | < | ||
+ | # Search all directories under the root filesystems | ||
+ | du -sh /* | ||
+ | |||
+ | # When we find a large directory, run du on it, e.g.: | ||
+ | du -sh /var/* | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | Should '' | ||
+ | we're most likely dealing with too many files. In this case, search the directories | ||
+ | on which '' | ||
+ | |||
+ | ===== NAS ===== | ||
+ | If you're deleting data from NAS, but the free space is not increasing, it's | ||
+ | most likely held by a snapshot. Data taken by snapshots is | ||
+ | [[manuals: | ||
+ | to delete all snapshots to free the space. You can do it in vpsAdmin, menu | ||
+ | Backups -> NAS. | ||
+ | |||
+ | ===== VPS with mounted NAS ===== | ||
+ | If you can't find what's taking the space and you have mounted NAS, it's possible | ||
+ | that the data is hidden beneath the NAS mountpoint. Data could be written to the | ||
+ | directory when NAS wasn't mounted and ended up on the VPS's disk. Later, when | ||
+ | NAS gets mounted, the data on the VPS gets overlapped. | ||
+ | |||
+ | You can check this either by temporarily unmounting NAS and then looking at the | ||
+ | mountpoint: | ||
+ | |||
+ | < | ||
+ | umount /mnt/nas | ||
+ | du -sh /mnt/nas | ||
+ | df -h /mnt/nas | ||
+ | </ | ||
+ | |||
+ | When '' | ||
+ | disk. | ||
+ | |||
+ | If you do not wish to umount NAS, e.g. because it's being used, there is another | ||
+ | way. We can make a bind-mount of the root filesystem, in which NAS will not be | ||
+ | mounted: | ||
+ | |||
+ | < | ||
+ | mkdir tmp-rootfs | ||
+ | mount --bind / tmp-rootfs | ||
+ | |||
+ | du -sh tmp-rootfs/ | ||
+ | df -h tmp-rootfs/ | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | in '' | ||
+ | |||
+ | < | ||
+ | umount tmp-rootfs | ||
+ | rmdir tmp-rootfs | ||
+ | </ | ||