Score:3

fdimage of 800 GB?

sa flag

I'm using Ubuntu 20.04.4 LTS. Why do I have a file in /home/myname/ called fdimage that is 805,8 GB? My SSD is a 500 GB one, and the partition allocated on it is only 125 GB... Clearly something is corrupted. What is going on here? Can I get rid of it?

The output of this command, however, tells a different story. According to du, this fdimage file only has a size of around 54.34 GB... How can Ubuntu give two different sizes for the same file?

du -a | sort -n -r | head -n 20

85129301    .
54340504    ./fdimage
12699488    ./Desktop

Again, the command stat /home/myname/fdimage returns a different size (805800542208 bytes = 805,8 GB) I'm fairly new to Ubuntu, and I couldn't find much information to this ./fdimage file, but from what I've read, I understood that maybe it's a kind of backup that Ubuntu automatically makes. Can I turn this off? I have my own backups, and I don't want Ubuntu eating more that half of my disk space.

In my last post I explained that, while I was using GNU ddrescue, my main drive completely filled up. I had to enter Ubuntu rescue mode to manually delete some files to have access again to the system. Is this related to the fdimage being this big? I had a file called mapfile in /home/myname but it was 0 kB in size. The drive on which I wanted to create a copy is still empty (0 bytes). Maybe I filled up my main drive instead of the external one with the blocks from the bad disk I was trying to rescue? Maybe I used the wrong ddrescue command? I cant't wrap my head around this, given that I could not find any files related to ddimage (apart from the above-mentioned mapfile that was empty) on my SSD.

Thanks in advance for your help.

Score:5
in flag

Your fdimage is likely a sparse file, which would explain the wildly different file size. You can confirm this with the following command:

ls -lsh fdimage 

This will show the occupied size in the first column. If the occupied size is smaller than the apparent size then the file is sparse.

The file may have been created if multiple ddrescue commands had been tried, as the name appears in examples from the Gnu documentation. You can certainly delete the file so long as nothing is currently using it and you do not need any of the data contained within.

Aleph_0 avatar
sa flag
Thank you very much. Yes, as a matter of fact, I tried multiple ddrescue commands, because I had to interrupt the recovery process. The command ls -lsh fdimage returns 52G -rw-r--r-- 1 root root 751G feb 28 14:47 fdimage... So, I think that it is actually 52 GB.
I sit in a Tesla and translated this thread with Ai:

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.