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 11-10-2015, 08:13 AM   #1
fabio massacci
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
Talking [SOLVED]pendrives on sdc1 stop working/mounting


Hi,

I hope this is the right place, I have a little board with atom processor and slax 2.6.24.3 with KDE 3.5.10 installed and booted from a compact flash card. In it I have a software that loop continuously checking for a pendrive to be attached to an USB port so then it can mount it copy a file and unmount it again so that user can detach the pendrive. It usually works fine but sometime it fails and return this error:

mount: /dev/sdc1 is not a block device

from that moment any pendrive I use and that is assigned to (in this example, but it can be other) /dev/sdc1 return same error, the only thing I can do is restarting the computer (and then it work again).
In this condition if I launch fdisk -l /dev/sdc1 is listed but I cannot mount it as usual (mount /dev/sdc1 /mnt/_dev_sdc1/), I also attached a double partition pendrive and it detect both the partitions but that assigned to sdc1 doesn't work meanwhile the other assigned to sdc2 can be mounted, so it can't be an hardware issue but some problem in usb software management.
I've tried to restart all USB devices by executing unbind/bind as for following example:

echo -n "0000:00:1d.7" | tee /sys/bus/pci/drivers/ehci-pci/unbind
echo -n "0000:00:1d.7" | tee /sys/bus/pci/drivers/ehci-pci/bind


but it didn't work.
My objective is to restore initial functionality without restarting computer, or in alternative, there is a way to avoid system assigning /dev/sdc1 to the next pendrive so that it can go on until user shut down the machine?
I can understand why restarting correct the problem, someone can give me advise in it or how linux start USB management?

sorry in advance for my possibly bad English

Last edited by fabio massacci; 11-12-2015 at 01:38 AM.
 
Old 11-11-2015, 01:22 AM   #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
A few suggestions, based on educated (I hope) guesses.

When you plug any USB filesystem into your board, you should see something in the kernel mesage buffer (dmesg command) and/or the system log file (/var/log/syslog on Debian-based systems, don't know Slax). What messages do you get?

Also interesting, run udevadm monitor to see what kind of information udev gets from the kernel when you plug the drive in.

Then did you check /dev/sdc1? I mean, just run ls -l. Perhaps it has turned into a regular file and isn't overwritten when udev wants to create the device file.
 
Old 11-11-2015, 01:47 AM   #3
fabio massacci
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks for reply berndbausch, today I can't try what you suggested because I haven't the board with me, I'll try as soon as I can tomorrow.

Anyway this is interesting:

Quote:
Then did you check /dev/sdc1? I mean, just run ls -l. Perhaps it has turned into a regular file and isn't overwritten when udev wants to create the device file
if this is the case how can I turn it back to device file?

P.S. I'm from Italy so my replies can come a bit late for you

Last edited by fabio massacci; 11-11-2015 at 02:01 AM.
 
Old 11-11-2015, 02:01 AM   #4
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
Quote:
Originally Posted by fabio massacci View Post
if this is the case how can I turn it back to device file?
Remove the regular file. udev will create the device file next time the drive is plugged in.
The deeper question would be, where does the regular file come from.
Quote:
P.S. I'm from Italy so ma replies can came a bit late for you
Even for a German, 15 minutes is not really late
 
Old 11-11-2015, 02:47 AM   #5
fabio massacci
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
thank you very much, I'll try it tomorrow when I come back to home

Quote:
Even for a German, 15 minutes is not really late
good for me, I was deceived by your location (Tokyo?)
 
Old 11-11-2015, 03:20 AM   #6
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
Quote:
Originally Posted by fabio massacci View Post
thank you very much, I'll try it tomorrow when I come back to home



good for me, I was deceived by your location (Tokyo?)
Tokyo, yes. German anyway
 
Old 11-12-2015, 01:36 AM   #7
fabio massacci
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
thank you so much berndbausch, it was as you said: sdc1 was changed in a turned into a regular directory!!! it was enough to delete it to make it work again
 
Old 11-12-2015, 03:41 AM   #8
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
I am glad you found the solution
 
  


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
stop script used to stop tomcat server is working intermittently BhaktiK Linux - Server 4 03-15-2013 09:38 AM
Network card stop working irregularly and after resetting its start working. a.anand385 Linux - Networking 2 06-21-2012 08:22 AM
Please check '/dev/sdc1' and the ntfs-3g binary permissions, and the mounting user ID tmick Debian 4 08-21-2011 07:57 PM
troubles mounting USB pendrives, external e-sata HD or PC partitions on gnome [ITA]freeware Debian 4 10-16-2010 05:16 AM
mounting pendrives as user (without being root) matrix13 Linux - General 3 01-31-2007 09:16 AM

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

All times are GMT -5. The time now is 02:42 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