df -h returns wrong values
Hi guys,
I'm having a kind of weird issue, and it's not a big problem, but it's kind of annoying. If I run df -h on my server, I get the following values: Code:
henk@tiffany:~$ df -h As for the filesystem types, /dev/sda1 and /dev/sdb1 are ext3 and /dev/root is ext4. Can anyone explain me why this is, and, if possible, how I can solve this? |
It has to do with reserved blocks. There is a certain amount reserved so that root and system processes can continue to write to a disk but it will be seen as "full" by non-root processes.
From the mkfs.ext3 man page: Quote:
|
.. and the amount of disk space that is reserved for the root user can be altered with tune2fs
See man tune2fs If you are referring to an external "media" disk, you can probably set the reserved blocks to zero, but never, ever do this for your root filesystem, or one day you may be unable to login, even as root, to fix the mess. [ You could recover from the above by using a live CD though, but these did not exist when the ext2 / ext3 filesystems were first engineered, but do you want to run the risk of trashing your system because root has run out of filespace? ]. |
Great, thanks for the explanation! I'm going to take a look at tune2fs :)
I'll let the /dev/root partition stay as it is, but these /media partitions (which are seperate hard drives) don't need reserved space to log in on those. I assume it's still possible to mount a full disk, or am I wrong? edit: For future reference: tune2fs -r 0 /dev/sda1 tune2fs -r 0 /dev/sdb1 and: Code:
root@tiffany:~# df -h |
Quote:
Some choices might be inadvisable though. For example, running tune2fs not to allow root to have some reserved disk space on your root partition might be a mistake you will regret bitterly in the future. So don't do that, is my advice. But for your "media" disks, it'll be fine. If you run out of space on one of them, you'll be fine, because although you cannot save that big file, your system will still boot, and you can clean up, delete unnecessary stuff to free up space and fix it. Best to read up on this so you fully understand what you are doing, and why. Linux puts you in control, so you had better know why you are changing the defaults (which are generally safe) and the repercussions of making any changes. Then you'll be both happy and safe. |
Okay, cool, thanks a lot, I just asked it for verification. I know it's Linux, I pretty much know my way around it, but because I'm in control, I can still mess up. A lot ;) That's why I wanted to be sure.
I left the /dev/root as it was, because of these warnings. However, I'm almost sure that, sooner or later, I'll mess up big time. I might know what I'm doing, but I still want things to be done quickly instead of safe. Luckily it's my own server, and I would be the only one who will cry my eyes out. But unfortunately, that's just the best way to learn it. For now, I've avoided that. Thanks a lot for the warnings! |
Quote:
Quote:
|
All times are GMT -5. The time now is 02:59 AM. |