1

This morning I noticed someone had stuck a USB Drive in the back of the server. (I'll have to end that practice later). For some reason CentOS 7 mounted that disk /dev/sdc1 under /run/media//. I also noticed when I ran df that my /dev/mapper/centos-root was full. Ok, ran through / with du and noticed that the flash drive had mounted itself here and took up the remaining space somehow.

So I ran umount /run/media/<user>/<uuid> and it went away. Great. Except df still states that I'm full and the server is experiencing issues common with low disk space. Worse now, a reboot of the server left me only able to get into maintenance mode. How do I free up this space or even know what is bound to the fs?

EDIT: This is essentially another df -H doesn't agree with du problem. According to df I have only 800MB/54GB free on root and I can't boot because of it. But by using du -h --max-depth 1 /mnt/sysimage/ (where /mnt/sysimage/ is just / because I'm in recovery mode right now). It outputs something like this (can't directly copy):

264M    /mnt/sysimage/boot
0       /mnt/sysimage/dev
26G     /mnt/sysimage/home
0       /mnt/sysimage/proc
... small stuff - MB scale
1.7G    /mnt/sysimage/var

So how do those add up to fill a 54GB disk? As stated above before it crashed, this mystery USB drive had been mounted in /run/media/<user>/<uuid> and was thus under / Could this still be bound to the file system?

2
  • If you are describing commands or semi-hipotetical questions, please do provide the output. The question is too broad as it it. Aug 3, 2018 at 20:11
  • @RuiFRibeiro I updated my question with outputs, skipped them originally because I thought I new the cause and didn't want this flagged as another df doesn't match du question. Aug 3, 2018 at 20:29

1 Answer 1

0

Mounting does not directly consume space on the mounted on filesystem.

Ensure you have the root of filesystem mounted on /mnt/sysimage (and not, for example, a Btrfs sub-volume) and nothing on top (which could hide large files). You can check this by inspecting /proc/self/mountinfo.

If that doesn't reveal the cause, run the appropriate fsck tool on the filesystem.

For Btrfs, try mounting with the clear_cache option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .