Cannot access USB disk with CLI?? Topic is solved

Need help with your Linux distro? All questions are good - not all answers are -but we try

Moderator: jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Cannot access USB disk with CLI??

Postby viking60 » 30 Sep 2014, 13:48

I have this NTFS USB disk that I use for backup (our backup script). I use Zsh not bash but I am not sure if that matters.
On the 22nd of September the backup stopped running.
And it turns out it is a permission problem.

Code: Select all

media/ LC_ALL=C cd LaCie
cd: permission denied: LaCie

I can access the USB disk with Thunar or PCmanFM so it is there and it is accessible in GUI but not in CLI. :confused
Image

In the CLI I cannot cd into it but it is mounted as /dev/sdb1

Code: Select all

df                     
Filsystem      Størrelse Brukt Tilgj. Bruk% Montert på
/dev/sdb2            30G  381M    30G    2% /run/media/viking/LA-PUBLIC
/dev/sdb1           1,8T  1,6T   284G   85% /run/media/viking/LaCie


So I do suspect some panic bash updates since this occurred at that time - but it could be something else too.

Ho do I get permission to access via the CLI again - it is supposed to be more powerful than GUI - here it is the other way around

It looks like something/program is exclusively opening LaCie (the USB disk) and keeping my shell out.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Cannot access USB disk with CLI??

Postby viking60 » 30 Sep 2014, 14:22

Aha I think I have found a reason:

Code: Select all

Sep 29 21:26:51 thomas-pc kernel: [27717.755964] Buffer I/O error on device sdb1, logical block 760887
Sep 29 21:26:51 thomas-pc kernel: [27717.755970] Buffer I/O error on device sdb1, logical block 760888
Sep 29 21:26:51 thomas-pc kernel: [27717.755975] Buffer I/O error on device sdb1, logical block 760889
Sep 29 21:26:51 thomas-pc kernel: [27717.755980] Buffer I/O error on device sdb1, logical block 760890
Sep 29 21:26:51 thomas-pc kernel: [27717.755985] Buffer I/O error on device sdb1, logical block 760891
Sep 29 21:26:51 thomas-pc kernel: [27717.755988] Buffer I/O error on device sdb1, logical block 760892
Sep 29 21:26:51 thomas-pc kernel: [27717.755990] Buffer I/O error on device sdb1, logical block 760893
Sep 29 21:26:51 thomas-pc kernel: [27717.755992] Buffer I/O error on device sdb1, logical block 760894
Sep 29 21:26:51 thomas-pc kernel: [27717.755994] Buffer I/O error on device sdb1, logical block 760895
Sep 29 21:26:51 thomas-pc kernel: [27717.755996] Buffer I/O error on device sdb1, logical block 760896


Thank God for error logs :-D
This is a HW problem - with a strange effect though.

I guess if you want an USB disk that last more than exactly three years then you should buy something other than this one
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
Snorkasaurus
Berserk
Posts: 587
Joined: 30 Dec 2013, 19:19
Contact:

Re: Cannot access USB disk with CLI??

Postby Snorkasaurus » 30 Sep 2014, 18:49

I have only had the "pleasure" of dealing with LaCie drives a few times over the years but have never walked away from the experience thinking "Boy, that went well". :-(

S.

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Cannot access USB disk with CLI??  Topic is solved

Postby viking60 » 01 Oct 2014, 01:07

Yeah I hear you!
I went to Windows and did some chkdsk routines - and that seems to have taken care of it for now.
I did not have patience to do the 12 hour defrag though :berserk2

My rsync backup went through nicely after that.

Just for good measure I decided to put it in /etc/fstab so I found the UUID (needed to automount the disk at the same place every time on every connection or when power is turned off and on):

Code: Select all

blkid /dev/sdb1

And that gave me something like:

Code: Select all

/dev/sdb1: LABEL="LaCie" UUID="F91153050041A4371" TYPE="ntfs" PARTUUID="b3ccf74c-01"

So now I had the (UU)ID i could use instead of names in /etc/fstab So I used the UUID and added this line
/etc/fstab

Code: Select all

#/dev/sdb1
UUID=F91153050041A4371 /media/viking/LaCie/ ntfs-3g defaults,auto,umask=000,users,rw 0 0

(the id is faked)

Code: Select all

lsblk -f

Will give a nice overview over the mounts and their structure.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Re: Cannot access USB disk with CLI??

Postby dedanna1029 » 06 Dec 2014, 17:42

Well, I had something here for you because I'd get this occasionally, but the phone lost the post... :( I can reconstruct it maybe if you want... it did resolve it for me in a clean way. Guess I will but it won't be the same.

umount the drive (no really), then unplug the USB cable. Reboot without it hotplugged, then once desktop is loaded, plug it back in. If it automounts, check it. It should be fine. if it doesn't at all or if you have to fiddle with it to get it to automount, then you have a cable or drive problem. If it's fine and automounts, you should see a good while before this happens again. In that case, it was some form of glitch.

Not so easy to reboot with a server I know, but for just a few minutes being all that it takes, people can just be patient.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html


Return to “Help”