LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-11-2020, 12:49 AM   #1
sajreborn
LQ Newbie
 
Registered: May 2020
Posts: 3

Rep: Reputation: Disabled
Data loss under Linux


I work under linux debian buster.
This morning I worked as usual and my PC crashed. I forced it to shut down and when I restarted, it presents the terminal with initramfs (if I'm not mistaken) by inviting me to do an fsck.
This is not the first time this has happened to me. I usually do an fsck -y / dev / sda1 then fsck -y / dev / sda3 for my root and home partition.
But this morning, after crashing, when I did that, he scrolled through several messages quickly, and that worried me. At the end I restarted my PC and voila, I can no longer find my work folder. In fact, I have a folder containing two other folders. Hey there is only one visible folder left. All of my shortcuts to the missing folder no longer works.
When I make a df -h, the size appears as if the file is present, but impossible to see it. It is not in / lost + found
I have a global search in my home, and nothing
I can no longer work, all my work was there, I have a 1 month old backup, but good.
If really really, you have a solution, please I'm desperate.
My disk is partitioned into 4 including 3 for linux and one for ntfs
Thank you
 
Old 05-11-2020, 05:15 AM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,630

Rep: Reputation: Disabled
First thing to ask yourself is why is it crashing - as on a regular basis suggests that maybe your disk is going bad, & will soon fail completely.

Check your dmesg & log files for clues to what is going on.

(A monthly back up is good for a normal user, but if this is for a business, you really ought to back up on a daily incremental weekly back up, & rotate them.)
 
Old 05-11-2020, 07:05 AM   #3
sajreborn
LQ Newbie
 
Registered: May 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
too happy
I found my data.
What made me have 0.5% of hope (I must admit I was at the edge of the window with the pc and looking for my data one last time), was the size of my partition. When I right click on home and I look at the size I have 31go, and with a
df -h
and as a result:
/ dev / sda3 192G 95G 87G 53% / home

or 95 GB of used, compared to 31 GB above, so where are the 60 GB?
Before the problem, I was around 95 GB in size.

It is true that several messages including the word inode or node (I do not remember) with numbers quickly appeared during fsck -y

Someone suggested I take a look at / home / lost + found, and when I did, I saw nothing. But when I logged in as root in a terminal, then "cd / home" and ls lost + found ", I saw numbers like # 13032 # 13036 # 1181667, and a folder with the number # 4703. So I made a "chmod 777 -R lost + found" in order to be able to access it via my account (simple user account). Once the command was executed and after a few minutes, I opened / home / lost + found via a "nemo" file explorer and TADAM, all my data was there.
Iíve done SEVERAL SAVINGS and vowed not to trust fsck -y anymore, even though itís a great tool, but Iíll use it with caution.
 
Old 05-11-2020, 07:12 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,886

Rep: Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205Reputation: 3205
Note the advice above re the disk. And check your data - the files you rescued may be fragments or truncated files. Or if you're really lucky they may be complete.

Also note fsck is for making the filesystem consistent. That may maintain files, or maybe not. It did its job - otherwise you wouldn't have got any files back. If I have a major event, I treat the filesystem as compromised and restore the entire filesystem.
 
Old 05-11-2020, 07:18 AM   #5
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,827
Blog Entries: 3

Rep: Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398
Indeed. If it is crashing there is a real problem with the hardware. Look at the smartmontools package, or equivalent, for your distro to see what is really going on with your hard drive. If the drive is failing, but it does not get physically replaced with a new drive, you will lose your data.
But the smartmontools will show what is going on from the hardware side.
 
Old 05-11-2020, 09:40 AM   #6
sajreborn
LQ Newbie
 
Registered: May 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
All my data is restored, I checked and tested
 
Old 05-11-2020, 11:57 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,537
Blog Entries: 9

Rep: Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048Reputation: 4048
You need a new disk.
fsck, as said earlier, checks the filesystem. It does not perform magic on the hardware.
Also, you should start making backups. Yes, even with a brand new disk.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
slackware 14.1 copying data to usb drives results data loss corruption TuxDork Slackware 7 02-17-2015 11:10 AM
Loss Of Network Connection After Power Loss etpoole60 Linux - Networking 4 11-02-2014 07:55 PM
Loss Of Network Connection After Power Loss etpoole60 Linux - Virtualization and Cloud 2 10-27-2014 03:14 PM
Network Connection Loss And USB Connection Loss. Novatian Linux - Desktop 1 11-07-2008 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration