LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-17-2011, 08:26 AM   #1
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Rep: Reputation: 0
usb thumb drive unmount and remount by itself


Hi, I have thumb drive connected to a busybox box.I mounted it /opt in initialzation file. However after a while it will unmount itself because it changes its drive letter from sda1 to sdb1. How could a usb device change its drive letter by itself? How could I prevent it happening? Thx.
 
Old 05-17-2011, 12:37 PM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Hello,

Can you post us the tail end of your /var/log/messages file, along with the output of the following command?
Code:
lsusb
Thanks man,

Josh
 
Old 05-17-2011, 05:08 PM   #3
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Hi Josh, Thanks for your quick response. Here are logs related to usb.

16:45:27 unknown user.err kernel: hub 1-0:1.0: port 1 disabled by hub (EMI?), re
16:45:27 unknown user.info kernel: usb 1-1: USB disconnect, address 79
16:45:27 unknown user.err kernel: scsi 77:0:0:0: rejecting I/O to dead device
16:45:27 unknown user.err kernel: scsi 77:0:0:0: rejecting I/O to dead device
16:45:27 unknown user.err kernel: Buffer I/O error on device sdc1, logical block
16:45:27 unknown user.warn kernel: lost page write due to I/O error on sdc1
16:45:27 unknown user.info hotplug[6754]: USB partition unmounted from /tmp/mnt/
16:45:27 unknown user.info kernel: usb 1-1: new high speed USB device using ehci
16:45:27 unknown user.info kernel: usb 1-1: configuration #1 chosen from 1 choic
16:45:27 unknown user.info kernel: scsi78 : SCSI emulation for USB Mass Storage
16:45:28 unknown user.debug hotplug[6773]: Attached USB device 1-1:1.0 [INTERFAC
16:45:30 unknown user.notice kernel: scsi 78:0:0:0: Direct-Access Generic U
16:45:30 unknown user.notice kernel: sd 78:0:0:0: [sdc] 15949824 512-byte hardwa
16:45:30 unknown user.notice kernel: sd 78:0:0:0: [sdc] Write Protect is off
16:45:30 unknown user.debug kernel: sd 78:0:0:0: [sdc] Mode Sense: 03 00 00 00
16:45:30 unknown user.err kernel: sd 78:0:0:0: [sdc] Assuming drive cache: write
16:45:30 unknown user.err kernel: sd 78:0:0:0: [sdc] Assuming drive cache: write
16:45:30 unknown user.info kernel: sdc: sdc1
16:45:30 unknown user.notice kernel: sd 78:0:0:0: [sdc] Attached SCSI removable
16:45:30 unknown user.info kernel: EXT3-fs: starting recovery.
16:45:30 unknown user.info kernel: kjournald starting. Commit interval 5 second
16:45:31 unknown user.warn kernel: EXT3-fs warning: maximal mount count reached,
16:45:31 unknown user.info kernel: EXT3 FS on sdc1, internal journal
16:45:31 unknown user.info kernel: EXT3-fs: recovery complete.
16:45:31 unknown user.info kernel: EXT3-fs: mounted filesystem with ordered data
16:45:31 unknown user.info hotplug[6782]: USB ext3 fs at /dev/sdc1 mounted on /t

lsusb output
Bus 001 Device 080: ID 1307:0310
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0002
 
Old 05-17-2011, 11:14 PM   #4
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Quote:
I mounted it /opt in initialzation file.
How exactly are you mounting your device? Sorry I didn't ask that before
 
Old 05-18-2011, 03:24 AM   #5
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
/etc/fstab
/dev/sda1 /opt ext3 rw,noatime 1 1

Thanks
Lewis
 
Old 05-18-2011, 03:32 AM   #6
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Something really don't seem right with how you are mounting your device. Can you show the output when you type the following?
Code:
mount
I am asking this because where you said "I mounted it /opt in initialzation file" means to me that you are mounting directly to /opt, which you shouldn't do. Have you tried manually mounting your device with no options, just using "mount," and to a different directory?
 
1 members found this post helpful.
Old 05-18-2011, 07:46 AM   #7
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
I think I should tell the story from the begging. -) I installed Tomato, which is based on busybox on my router. There is nothing under /opt folder. In order to install Asterisk on the router I have to attach a usb thumdrive to it because there is not enough space on it. That's the only reason I mount the thumdrive to /opt by myself. I know I shouldn't do it normally. Do you think this is the reason? I didn't hear anyone else complaining this problem though.
 
Old 05-18-2011, 02:43 PM   #8
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Ahhh, so that's why this doesn't all add up. This is your router... You need to explain these things next time...
Now honestly, I never worked with Tomato, but if you say that you shouldn't mount to /opt normally, and you are having a problem, then most likely that is possibly part of the problem. Have you tried mounting it where you are originally supposed to mount? And can you tell me where that is? Thanks man,

Josh
 
1 members found this post helpful.
Old 05-18-2011, 02:50 PM   #9
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
I have to mount it to /opt in order to install asterisk because there is no space left on the router. That's the instruction I got from online. But I will try mount it somewhere else just to check whether it works. Thanks for your advice.
 
Old 05-19-2011, 06:00 PM   #10
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
It doesn't work even I mount it to another place. I even tried mount it using uuid. The problem is it keeps changing from sda1, to sdb1, then to sdc1. How come this could happen?
 
Old 05-19-2011, 10:15 PM   #11
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
After going through all the output you gave me, and what I have thought, this seems to be a Tomato issue. Have you tried there forums? I'm not one to steer someone away from LQ, but I think you will have better luck on there forums. And in all honesty, I have never used Tomato before ever; I was always a DD-WRT guy Here is a link over there - http://www.linksysinfo.org/forums/fo...play.php?f=160

Cheers,

Josh
 
1 members found this post helpful.
Old 05-20-2011, 07:36 AM   #12
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks Josh. I will check out Tomato support forum. I suspect one of the feature I turned on causes all these problem.
 
Old 07-13-2011, 08:36 AM   #13
schmichael
LQ Newbie
 
Registered: Jul 2011
Posts: 4

Rep: Reputation: Disabled
Thumbs up This worked for me

Hi,

I found this thread on the tomato forums and adapted it to work for me.

In summary what I did was to include the following line in the 'Run after mounting' script:

Code:
echo 128 > /sys/block/sda/device/max_sectors
which simply sets the max_sectors file from the default value (240) to 128, for "sda" which is my USB hdd once it gets automounted.
Note that sometimes "sda" might be "sdb" or "sdc", so you might want to include several variations just to cover your bases...

Now my USB hdd has remained mounted for many days without any problems!

Hope that helps ya out

Cheers,
Mike

Last edited by schmichael; 07-13-2011 at 08:38 AM.
 
2 members found this post helpful.
Old 07-14-2011, 08:50 AM   #14
standerby
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Your post is terrific. It's exactly what I need. Thank you !
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will an external usb hard drive remount on wake from sleep? mturob Linux - Newbie 14 07-05-2011 10:10 PM
getting Fedora 11 to auto-remount USB drive after docking Carnivale Linux - Hardware 5 10-25-2009 01:49 AM
4GB Pen Drive unmount error / unable to remount angelsguitar Linux - Hardware 4 06-22-2008 08:47 AM
Need to restart Suse after unmount in order to remount xpucto Suse/Novell 1 01-18-2007 04:35 PM
USB drive using different partitions (usb key thumb drive) Arodef Linux - Hardware 0 08-04-2004 07:36 PM


All times are GMT -5. The time now is 11:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration