Help! Fedora just randomly deleted hours of my work and bricked itself all on its own

That sounds pretty dire indeed. Since the files you are looking for are quite large, perhaps try the following command and see if it finds anything that looks like it might be one of the files you are looking for.

find /home -size +40M

And likewise

find /.snapshots -size +40M

Beware that a backup file might not have the same name as your original file. If you see something listed that you think has a chance of being what you are looking for, I’d first run file <path-to-filename> and if that shows that it is a text file, then (if it is text) inspect its contents with less <path-to-filename>.

P.S. Use q to quit the less command.

1 Like

Didn’t read everything, but have you ran btrfs commands to check the space used, allocated etc and to list the subvolumes likesudo btrfs filesystem usage / and sudo btrfs subvolume list /.

This will run sudo btrfs filesystem df, show and usage to check the sizes. Why the 3? Each one show it differently. Assuming that the data and home are in the /, if not put the full path of the mounting point.

btrfs_fs_cmds=("df" "show" "usage") && for bfc in "${btrfs_fs_cmds[@]}"; do printf "\n%s\n" "${bfc}" && doas btrfs filesystem $bfc /;done

This will ran sudo btrfs subvolume list 4 times with different options and also sudo btrfs subvolume show once. It can help you to list the subvolumes for checking some information about their UUIDs, snapshots etc.

btrfs_sv_cmds=("list -t" "list -s" "list -r" "list -d" "show") && for bsc in "${btrfs_sv_cmds[@]}"; do printf "\n%s\n" "${bsc}" && doas btrfs subvolume $bsc /;done

What the options do:
-t print the result as a table

-s list only snapshots
-r list readonly subvolumes (including snapshots)
-d list deleted subvolumes that are not yet cleaned

I was about to redirect the commands to a file, but I think is not adivised in the sittuation. Creating a file on the problematic fisystem, I mean.

3 Likes

Unfortunately, we get real spammers and attacks, so the protective measures are necessary. Usually a little bit of of time interacting on the site is enough for the system to determine that you are a real human. In this case, since you have an ongoing crisis and seem to at least pass the Turing test :slight_smile: I’ve bumped you up to the next trust level manually.

I said that in reference to my test. Your use case is self-evidently valid.

yeah theyre big but…so?? how ELSE am i supposed to open them? and it works just fine in ubuntu

Text Editor is a different app on Fedora and Ubuntu. Different code base I mean, so it makes sense it works on Ubuntu. The question are (a) how soon these issues with somewhat large text files can be fixed in Fedora, and (b) what should you use in the meantime?

A quick search, I found this: https://www.makeuseof.com/tag/linux-text-editor-alternatives/

If you have Flathub enabled, you’ll have more of these choices available, including Atom, and Visual Studio Code.

1 Like

Looks like your setup is customized in a way that ignoring fstab is causing a startup problem.

Ugh, I missed this! OK that means snapper has been installed and might be configured to take snapshots automatically in which case the system can very quickly run out of space if misconfigured. And misconfiguring snapper I’ve found is easy. It’s one of the reasons it’s not installed on Fedora out of the box.

So yeah we need to find out if there are snapshots, how many and how much space they’re taking up, and it’s decently likely you need to ask snapper to thin out older snapshots more aggressively than it is.

sudo snapper --iso list should do it

2 Likes

the forum locked me out again, this time for ELEVEN HOURS!!

That sounds pretty dire indeed. Since the files you are looking for are quite large, perhaps try the following command and see if it finds anything that looks like it might be one of the files you are looking for.

find /home -size +40M

And likewise

find /.snapshots -size +40M

theyre not large, the TEXT files i was reading off are the big ones but I dont care about them

the spreadsheets are all under a MB

its not an issue of where they are - i know where they should be, and theyre not there

@timmithy
There are other text editors than the gnome-text-editor which it seems may be causing the problem. Have you tried using gedit instead (which I think used to be the default until about Fedora 36)? With different code and a different method of making temp backups it may not have the issue you are seeing at all.

There are other text editors than the gnome-text-editor which it seems may be causing the problem. Have you tried using gedit instead (which I think used to be the default until about Fedora 36)? With different code and a different method of making temp backups it may not have the issue you are seeing at all.

No because MY COMPUTER WONT BOOT.

also every time ive had problems with ubuntu in the past, the first things people give you a hard time about when you ask for help on forums or reddit is "why dont ypou use the defaults/ why did you go changing things??

so i just used the built in apps as much as possible because I thought they’d be reliable and i didn’t want to worry about things like this happening. silly me

my problem no isn’t ‘what text editor to use’ but 'why did fedora delete my files and can i get them back before tomorrow and not get fired without pay?"

Didn’t read everything, but have you ran btrfs commands to check the space used, allocated etc and to list the subvolumes likesudo btrfs filesystem usage / and sudo btrfs subvolume list /.

This will run sudo btrfs filesystem df, show and usage to check the sizes. Why the 3? Each one show it differently. Assuming that the data and home are in the /, if not put the full path of the mounting point.

btrfs_fs_cmds=("df" "show" "usage") && for bfc in "${btrfs_fs_cmds[@]}"; do printf "\n%s\n" "${bfc}" && doas btrfs filesystem $bfc /;done

This will ran sudo btrfs subvolume list 4 times with different options and also sudo btrfs subvolume show once. It can help you to list the subvolumes for checking some information about their UUIDs, snapshots etc.

btrfs_sv_cmds=("list -t" "list -s" "list -r" "list -d" "show") && for bsc in "${btrfs_sv_cmds[@]}"; do printf "\n%s\n" "${bsc}" && doas btrfs subvolume $bsc /;done

I tried all of these all of these, only one worked. the rest said 'bash: doas: command not found"

i have no idea why or really any of what youre talking about, tbh

1 Like

Ugh, I missed this! OK that means snapper has been installed and might be configured to take snapshots automatically in which case the system can very quickly run out of space if misconfigured. And misconfiguring snapper I’ve found is easy. It’s one of the reasons it’s not installed on Fedora out of the box.

So yeah we need to find out if there are snapshots, how many and how much space they’re taking up, and it’s decently likely you need to ask snapper to thin out older snapshots more aggressively than it is.

I didnt install snapper, the installation walk-through I used just included that step and when I googled what snapper was I thought it might be useful later so i just did what it said and made all the partitions it told me to

…i think it was this guide: https://www.youtube.com/watch?v=nDDVMaOKXyU

when i run that command, heres the output:

Unfortunately, we get real spammers and attacks, so the protective measures are necessary. Usually a little bit of of time interacting on the site is enough for the system to determine that you are a real human. In this case, since you have an ongoing crisis and seem to at least pass the Turing test :slight_smile: I’ve bumped you up to the next trust level manually.

I did the email verification it asked for?

And it’s still doing it now, its only just let me post again like 10 mins ago

Have you logged out of the forum then back in so it is certain to see the new trust level granted?

ill do that now

I think Marcelo was trying to provide you something that you could copy-and-paste. But since you are not in an environment where you can do that, it will probably be easier to enter them one at a time.

btrfs filesystem df /
btrfs filesystem show /
btrfs filesystem usage /
btrfs subvolume list -t /
btrfs subvolume list -s /
btrfs subvolume list -r /
btrfs subvolume list -d /
btrfs subvolume show /

Also, I’m not sure what that “doas” command is. It doesn’t seem to be installed on my system either.

Edit: Sorry, I think I left off the path at the end when I unfolded that earlier example command. I think I have it corrected now. (I’m not a Btrfs user :slightly_smiling_face:).

1 Like

Well, sometimes there are surprises about where things should be or what they should be named. I heard a story once about someone showing off how they could move files around between directories using relative paths. It worked for him the first few times he did it, but then when he went to demonstrate the command to a friend of his, the file DISAPPEARED!!!. I don’t think he ever did find it again. :slightly_smiling_face:

If it is the spreadsheets you are interested in, then there is another variation of the “find” command that might help to locate the files you want.

find /home -name '*.ods'

But substitute ods with whatever file extension you are looking for.

the forum locked me out AGAIN

btrfs filesystem df /
btrfs filesystem show /
btrfs filesystem usage /
btrfs subvolume list -t /
btrfs subvolume list -s /
btrfs subvolume list -r /
btrfs subvolume list -d /
btrfs subvolume show /

none of these worked, it says ‘btrfs command not found’

find /home -name ‘*.ods’

this returned nothing

Well, sometimes there are surprises about where things should be or what they should be named. I heard a story once about someone showing off how they could move files around between directories using relative paths. It worked for him the first few times he did it, but then when he went to demonstrate the command to a friend of his, the file DISAPPEARED!!!. I don’t think he ever did find it again. :slightly_smiling_face:

i wasnt trying to show fancy stuff to anyone, i was literally just writing in a spreadsheet and fedora’s gone and delete my files, i know where they should be because i specifically put them there so the backup would work. theyre not there now

I can’t afford to just keep trying different random things hoping for a magic surprise, i only have one day left to fix this or im going to lose this job and this forum wont even let me post more than once per day.

I doing everything i can to do what ppl are telling me and give info bas asap, an i feel like people are just throwing random red herrings until i go away,

can anyone even just tell me WHY fedora did this ???

Computers doesn’t work this way, we can’t know without asking about details first.
Your problem is odd, it appears that your system is broken.

Doesn’t Ubuntu work well for your use case? Given the critical situation you’re in, I suggest that you switch back to it and finish whatever you should for the job.

If you are able to mount the /home, I would suggest going straigth to the data recovery, skipping the “why it failed?” diagnostics for the moment

There’s official btrfs restore tool for this, but it may be too low level if you are not very familiar with btrfs itself (check man btrfs restore for more info)

As a more user-friendly alternative, I’ve had success with undelete-btrfs script from danthem in the past, which internaly uses btrfs restore: GitHub - danthem/undelete-btrfs: A script that attempts to undelete files in a BTRFS file system. Make sure you read the README.

googling “btrfs undelete” should give you more relevant links

For help with this, I would sugest asking on the official #btrfs channel on https://libera.chat/ (how to join the chat: libera.chat/guides/clients )

EDIT: or, if you still got time to replicate lost data to save your job, it may be safer for you to just boot into another functioning system and finish your work there, you can always diagnose this problem later

I am with you. I guess it’s a controller and/or storage device malfunction in connection with a memory leak. I suggest the OP to check the hardware in deep to find out if the all components are working right. Long time ago I see what happens when a central hardware component fails: gigs of dumps, corrupted storage, overheating the CPU and so on. The reason for it was: faulty memory and a damaged HD.

Sorry to hear that. Unfortunately, that is out of my control. :slightly_frowning_face:

I think that is a side effect of the way you reached the rescue shell. A better method might have been to use rd.break=mount. But for now, I think the running following command before running the other commands should workaround the problem.

Edit: Somehow my command didn’t make it to this post. Sorry for the confusion. The following was supposed to be the last line.

export PATH=/sbin:$PATH