0

I have very strange problem that I don't know how to debug further. Drive is WD 2TB. I use it only for backup of my cloud and server data (lot of small files).

I'm using linux and dm-crypt.. whole disk is without partition and entirely crypted. I mount it using mount /dev/mapper/crypt ./folder/.

this is my current state with df -h

Filesystem          Size  Used Avail Use% Mounted on
....
/dev/mapper/crypt   1.9T  972G  891G  53% /BACKUP

rsync just told me there is no more space on drive.

du -sh /BACKUP/ is confirming space:

du -sh /BACKUP/
972G    /BACKUP/

Yes, I unmounted forced fsck, even tried to shrink filesystem and all. Plus + what is most discomforting is that I did

cat /dev/urandom >> ddd.dd

and it filled whole drive .. 100% .. I deleted some files prior to that. As if it shows full I cannot, it's full.

Some kind of filesystem limit or?

UPDATE: I cannot add or create files when it says it's full. But if I delete any small file i can create file of any size, for example:

ls /BACKUP/GDRIVE/10\ SHORT\ SIGHTED.mp4 -Alh
-rw-r--r-- 1 root root 12M Aug  1  2015 /BACKUP/*******/10 SHORT SIGHTED.mp4
rm /BACKUP/GDRIVE/10\ SHORT\ SIGHTED.mp4 
echo ddd > dd.dd
cat /dev/urandom >> ddd.dd
-bash: ddd.dd: No space left on device
cat /dev/urandom >> dd.dd
^C
#:/BACKUP# ls -Alh
total 2.8G
-rw-r--r--  1 root root    2.8G Mar  5 14:14 dd.dd
drwxr-xr-x 34 root root    4.0K Mar  5 14:12 *******
drwxr-xr-x 30 root nogroup 4.0K Feb 25 15:22 *******
drwx------  2 root root     16K Sep 19 16:03 lost+found
drwxr-xr-x  5 root root    4.0K Dec 27 03:09 *******
drwxr-xr-x 28 root root    4.0K Jan  2 18:48 *******
0

Since you have lots of small files, use df -i to check that you are haven't used up all the i-nodes.

If this is is the case there are not many solutions to dynamically increase the inodes count, but I was going to suggest something like this answer, namely create one or more big files in the remaining space that you reformat as disks (with adequate inode count) and mount as loop devices. Maybe you can have these match top directories and so by mounting them adequately you can reproduce the directory structure of your source in several sub-disks.

  • I did actually. But this is first time I encounter that problem.. How can I go pass it? {:/BACKUP# df -iT Filesystem Type Inodes IUsed IFree IUse% Mounted on dev/mapper/crypt2 ext4 476960 476960 0 100% /BACKUP} – Denis Periša Mar 5 at 13:20
  • See edited answer. – xenoid Mar 5 at 13:25
  • Great answer.. Exactly my thought as I created that big file. So filesystem inside filesystem or reformat with bigger inode table. Uh, Thank you! – Denis Periša Mar 5 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.