DOROOT file has used my whole drive

Posted December 9, 2016 4k views

my droplet has only two small sites on it, that total less than 100mb in hard drive space, but the full 20gb hard drive has been used. I’ve checked the log files, but they are not taking up much space.

I managed to trace the disk usage to a single file: /dev/disk/by-label/DOROOT, which I am unable to delete

It occurred to me that DOROOT might be ‘Digital Ocean Root’, so perhaps its something to do with the droplet management?

I tried to read the file but it seems to either be encrypted or the Digital Ocean console is unable to read it. I managed to read the tail of the file which seems to be full of error reports

I am unable to delete the file, and ssh is buggy since the hard drive filled up so I’m having to do everything thru the DO console which is a bit of a pain as you can’t paste passwords into it


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Stop stop stop! /dev/disk/by-label/DOROOT isn’t some file. It’s a representation of your disk itself. DOROOT is the default label for the filesystem. If it was deleted… um, actually everything would probably be fine long term. Maybe if you rebooted, or recreated it in recovery mode.

What makes you say your disk is full? What’s the output of df -h and df -hi?

Edit: To be less vague, /dev/disk/by-label/DOROOT is a symlink to a device node, probably /dev/vda1 or something. Deleting a critical device node might make your system behave oddly, but it’s just a representation of the device, not the device itself. It wouldn’t delete all your data. You could recreate the node with one command. It may happen automatically next you reboot.

Other actions, such as writing a ton of data to the device node, would trash your data for real.

Edit: Edit.

  • thanks for the info, I ran a dh -f which returned the DOROOT at 20gb
    but I just ran a df -hi and it returned 1.3mb, so maybe its not that after all

    I’m not sure why the two commands are returning a different result, I guess its back to drawing board

    • weirdly, its also been refusing ssh key access as well, except via the digital ocean console

    • Does df -h actually say you’re using 20 GB of disk space out of a 20 GB filesystem? What does it say?

      df -hi lists the number of files you have, not the amount of space you take up. (Most filesystems also have a maximum number of files, and you can create zillions of small files to reach it without filling up all the space.)

      If you are out of disk space, start with sudo lsof +L1 to list open, deleted files and their sizes on disk, and cd /; sudo du -hd 1 | sort -h to show what your biggest directories containing non-deleted files are, then cd into them and run the du command to drill down into them.

      • found it.

        it was a log in /var/log/nginx, but the permissions were set so you could only read the nginx dir if you were root (or imitating root), so it wasn’t showing up in the original df, and I couldn’t ls or cd into it until I did sudo -i instead of just sudo

        found a log file in there that as 14gb, deleted it, now need to install logrotate or something

        thanks for the advice, put me on the right track, I owe you one ;)