Score:0

Some space seems to be lost on an ext4 drive on Ubuntu 20.04

es flag

Today I "found" a HDD in one of my systems that I completely forgot I had. So I wanted to look inside and see what was in there. I logged in via ssh from another computer (may be important for the following) and, after quite a bit of fiddling around(*), I managed to mount it and inspect it. It had about 65G of data in it. I copied all what I wanted to preserve and then rm -rfed the rest.

Now df tells me that it has a total of 917G, 206M are used and 870G are available. I thought, maybe the files I deleted are not really deleted but moved to a recycle bin. But that wouldn't add up with the shown numbers. I still inspected '$RECYCLE.BIN' and lost+found, but only in '$RECYCLE.BIN' there is a 129 Byte (!!) long .ini file completely unimportant. But I want to make sure there's nothing else important in there before I format it.

Here the questions: does rm move files to a recycle bin or does it delete them right away (as I had understood so far)? And if it does move them to a recycle bin, which one does it use when one is connected via ssh?

Where else could I look to see what's taking up that space that df can't see?

(*) just a funny (to me) anecdote: at first I mounted the drive, but ls saw it as empty. So I looked with parted if I could see anything: the drive had a msdos partition table and it only had partition #2 in it, which was taking up the whole disk. I went ahead and deleted the partition, recreated a partition table as gpt and created a new primary partition as ext4 taking up the whole disk. I mounted it again and, SURPRISE... the disk was no longer empty! I could see a directory, which I then remembered were there to start with, but ls couldn't see before I redid the partition. So parted warned me several times that all my data would be lost, but it didn't happen. To the contrary I recovered data. Puzzling.

waltinator avatar
it flag
By default, a certain percentage of space is reserved for `root` . Also, filesystem structural metadata takes up space. Read `man mkfs`.
Andyc avatar
es flag
@waltinator I could accept that as explaining the 206M of used space, but between the 917G total and the 870G available there's still a long way to go. 47G of space reserved for `root` (which I wouldn't expect by the way, because it has no operating system on it) or for filesystem metadata seem a little to much to me.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.