0

Summary:

  • Had a directory at ~/src/database containing ~250 GB of files.
  • Executed mv ~/src/database ~/
  • Instead of expected result (database now at ~/), I ended up with a database directory in both the source and destination, but with only a small fraction of the original files (i.e. the database was apparently corrupted/lost during mv somehow).

The lost files are not an issue---I have multiple backups. The issue is that even after doing rm -rf ~/database; rm -rf ~/src/database my harddrive is now short ~500 GB (coincidentally, the size of 2 copies of the database).

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme1n1p2  1.9T  1.1T  701G  61% /

However, a complete breakdown of the drive in baobab shows that I'm only using ~600 GB with all files accounted for on the root volume. This is consistent with what I knew beforehand and also the failed mv operation. The math is roughly correct: 1.1 TB - 500 GB = 600 GB, which is exactly what baobab says I'm using.

In the past I have had similar issues, and the solution was to remove the parent directory, which somehow reclaimed the space. That isn't working here.

  1. I already tried removing the parent of the source, didn't work.
  2. Parent of the destination is my home dir, so not easy to rm that.

Question:

How can I reclaim this space? Is there a way to force the OS to reclaim stranded nodes from the disk?

$ findmnt -T ~/src
TARGET SOURCE         FSTYPE OPTIONS
/      /dev/nvme1n1p2 ext4   rw,relatime,discard
$ findmnt -T ~/
TARGET SOURCE         FSTYPE OPTIONS
/      /dev/nvme1n1p2 ext4   rw,relatime,discard

0 Answers0