LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-31-2020, 05:09 PM   #1
acnestis
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Rep: Reputation: 0
"some contents unreadable" on HDD


Hi Group!

Hope you can help me out here.

I have 3 HDD's and an SSD installed, that can be selectively powered-on by push-button switches - no sense spinning HDD's when they're not needed.

My Linux Mint Cinnamon 19.3 is installed on a 1TB WD Black, and works well.

A week ago, I wanted to transfer some files from the WD drive to the 1TB Toshiba drive, so I powered-it up also before booting to Linux on the WD drive.

Booted O.K. (as usual)

But, when I went to look at the Toshiba drive in "properties", it said "Some contents unreadable" - 50GB roughly.

I wrote a short file to it, and can read it as well.

Any ideas on how to access these 50GB of my files?

From Toshiba Properties:

Name: Toshiba

Type: Folder (inode/directory)

Contents: 1 item (and 1 hidden), with size 172.7 kB
(some contents unreadable)

Location: /media/ralph

Volume: Toshiba

Free Space: 933.3 GB
50.1 GB used
933.3 GB free

Total Capacity: 983.4 GB

Filesystem type: EXT3/EXT4

I can read & write to/from the drive, but can't reach the 50 GB of my previously-written files.

I really don't understand what has gone wrong here.
Any suggestions would be appreciated.

Thanks in advance,

- Ralph
 
Old 05-31-2020, 07:40 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
My guess is that the logged-on user has no permissions to view some directories on this disk.

In the GUI, you should see the permissions when listing directory details. On the command line, you would use the command ls -l. Also on the command line, cd /media/ralph then du -s * to understand which directory causes the problem.

If it's not a permission problem, the disk may be defective. In this case, you should see relevant messages in the kernel message buffer, which you can display with the dmesg command.
 
Old 05-31-2020, 08:08 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
On the contrary, I reckon it's a likely user error. If the OP is in the habit of turning off drives before unmounting, that's a direct route to corruption. On the other hand, if the OP is of good habits, then smartmon would be my next option.
 
Old 06-02-2020, 08:45 AM   #4
acnestis
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Hi there!

Thank you both for your replies.

I've never been tempted to power-off a drive before shutting down the computer itself.
If I've forgotten to enable power to a needed drive at boot time, I let the O/S boot, shut it down routinely, enable power to the needed drive, and bring up power again on the computer, letting BIOS discover the drive.
I do not unmount drives before powering down the computer routinely. I assume the O/S looks after this during shut-down.

I installed smartmon. When searching for the pgm, Linux Mint pops up the "Disks" icon. (I've used this icon before.)

"Disks" shows Size: 1.0 TB (1,000,204,886,016 bytes)

Further downscreen, under "Volumes":

Size: 1.0 TB - 983 GB free (1.7% full)

(Seems to be a disparity (50 GB) between this and what the disk properties previously reported.)

Nemo (my file manager) shows only the little 156.3kB file that I'd written there to see if the disk was writeable/readable.

It does not show any folders/directories.

Permissions:

Owner: ralph - Ralph
Folder access: Create and delete files
File access: -

Group: ralph

Folder access: -
File access: -

Folder access: None
File access: -

I'm more than a little out of my depth here - 77 years old, and cognitive ability is poorer each morning.

I'm not comfortable with the command line, beyond cut & pasting when I update Calibre.

What bugs me is that the drive is writeable/readable, but there are 50 GB of files that can't be seen.

Is there any merit in powering-off the O/S drive, and booting to a "Rescue disc", using a utility to have a look at this Toshiba drive? And if so, would you have a preference of one flavor of disc over another? Or, will a utility show nothing that the Mint O/S can't show?

I'm less interested in what went wrong, than I am in accessing the files. Sounds like I'm looking for a "quick fix" or "magic bullet", I know. But my abilities are limited.

I'll not fault either of you for moving on to solve others' problems. There's only so much "hand holding" a guy can do.

Thanks again for your help,

- Ralph
 
Old 06-03-2020, 12:05 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
OK, that's good - I'm now inclined to agree it might be a permissions problem. I hate GUI file managers. Can you post the output of these commands - cut-and paste the long one.
Code:
id
ls -lR /media/ralph | awk '!(NR == 1) {a[$3"_"$4]++} ; END{ for (i in a) print i}'
That is so we can see what id you are and what ids are used in the filesystem - should be easy to fix.

Sorry for casting aspersions on your computer habits ...
 
Old 06-04-2020, 07:10 AM   #6
acnestis
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Hi syg00!

Thanks for not giving up on me. Yet.

No offence taken re: powering off drives, etc. I have a Win10 friend who routinely powers SATA drives in her "toaster" on/off with the system running. I've cautioned her against the practice. Not the way I do business.

Here's the output:

ralph@F2A85-V:~$ id
uid=1000(ralph) gid=1000(ralph) groups=1000(ralph),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),112(lpadmin),128(sambashare)
ralph@F2A85-V:~$ ls -lR /media/ralph | awk '!(NR == 1) {a[$3"_"$4]++} ; END{ for (i in a) print i}'
ls: cannot open directory '/media/ralph/Toshiba/lost+found': Permission denied
_
ralph_ralph
root_root
ralph@F2A85-V:~$

I wrote this output to a text file (366 bytes), and stored it on the Toshiba drive. I can read it, much as I can the other file I'd written to the drive.

Are we getting closer?

Thanks again. It's good to have guys like you and berndbausch in my corner.

- Ralph
 
Old 06-04-2020, 07:36 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Enough of the pessimism. So berndbausch was correct and I was just whistling dixie.

First up, ignore the message about lost+found; that's expected and not relevant to what we're doing.
As you can see it looks like those files are owned by root. If you are sure all those files are yours, the following will change the ownership back to you, and you should be able to do as you wish - from the GUI as well. Use of sudo will ask for your password.
Code:
sudo chown -hR ralph:ralph /mnt/ralph/
 
Old 06-04-2020, 07:51 AM   #8
acnestis
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Hi again!

Here's my output:

ralph@F2A85-V:~$ sudo chown -hR ralph:ralph /mnt/ralph/
[sudo] password for ralph:
chown: cannot access '/mnt/ralph/': No such file or directory
ralph@F2A85-V:~$ ^C
ralph@F2A85-V:~$


(I tried to do a ctrl-C to copy the text, as you can see.)

Helpful?

- Ralph
 
Old 06-04-2020, 07:53 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
My bad
Code:
sudo chown -hR ralph:ralph /media/ralph/
 
Old 06-04-2020, 08:01 AM   #10
acnestis
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Hi!

I can now see a folder "lost+found", with 0 items in it.

- Ralph
 
Old 06-05-2020, 02:19 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Well that's me out of ideas - I would expect that to have all your files if there had been a problem with the filesystem sometime in the past. The normal next step is to use some forensic software to scrape the disk looking for file signatures. I like PhotoRec - it is well documented and has worked well for me, but needs careful attention to especially navigating the source and allocating a target drive. It needs a separate target drive, and will generate a bunch of directories with files it finds having meaningless names. So it gets the data back usually, but if filenames are important to you, you will have to fix that later. There are tutorials on the webpage.
 
Old 06-06-2020, 04:15 PM   #12
acnestis
LQ Newbie
 
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Looking at the thread, I see I must have had "finger trouble" when replying to your last post.

Thanks for sending the link to PhotoRec. I have had a cursory look around, and it looks to be a very useful tool.

Thanks, again, for all your help. Much appreciated.

- Ralph
 
  


Reply



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
Will HDD/SSD Contents Be Affected by the "Year 2038 Problem"? /tmp Linux - General 8 08-31-2017 08:49 AM
Unreadable external USB data storage(hdd) dogears7 Linux - Newbie 1 04-14-2015 09:42 AM
The best way to mirror HDD contents to a remote hdd? postcd Linux - General 2 04-22-2014 04:36 PM
Ubuntu 9.04 , changing hdd and wants move contents to new hdd BenPoza Ubuntu 2 01-16-2010 01:22 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM

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

All times are GMT -5. The time now is 06:18 AM.

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
Open Source Consulting | Domain Registration