• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  Linux Stuff / General Linux questions / Re: USB hard drive errors on: July 30, 2009, 10:15:45 PM
Just what I wanted to hear...  :-(

The drive's not that old, though--I bought it when I ordered my plug, so it sat on a shelf for a month or so.  Then I decided to hook it up to a Windows box to do backups for a week or so, which it did without trouble.  When my plug came last week I took the drive away from Windows and reformatted it with the plug.  So we're talking maybe two weeks of uptime?  Not exactly a performance champion.

I guess I'll have to dig out my Best Buy receipt tomorrow....

Thanks,

John

--------------------------
UPDATE: I think I figured it out.

Seagate USB external hard drives have a sleep feature that's said to be incompatible with Linux.  My system was turning it read-only after getting buffer IO errors.  I turned off sleep this morning and have since had no troubles.  (Cross fingers.)

In case anyone else is interested in the fix for this:
0) I unmounted the drive before doing this, since I was running fsck anyway.  I don't know if you need to, but it can't hurt.
1)  Install sdparm so you can access the drive's settings.
Code:
sudo apt-get install sdparm
2)  Follow the instructions in this post:
http://www.linuxquestions.org/questions/showthread.php?p=3363113#post3363113

That's it.  Thanks.

John
2  Linux Stuff / General Linux questions / USB hard drive errors on: July 30, 2009, 09:03:27 PM
Hi.  I was hoping you folks might be able to advise me on this.  I have a Seagate 1.4T USB external hard drive attached to my sheevaplug.  I've mounted it via /etc/fstab on boot, and it seems happy enough.  But lately I've been noticing errors with some frequency--maybe two or three times a day, I'll get an IO error, or the drive will show up read-only, or it won't show up at all the first time or so when I try to ls.  Or I'll create a directory and put some files in it, and it'll be there half the time, maybe.  It's frustrating.

When I reboot after encountering one of these errors, fsck runs, and I can watch its progress meter through the serial connection.  Then everything's OK for a little while.  But this shouldn't be happening so often, right?

Here's the line for the drive in /etc/fstab:
Code:
/dev/sda1 /media/usbhd ext3 rw,auto,user,exec,async 0 2

Any ideas what I'm doing wrong?

Thanks!

John
3  General Category / General Discussion / fsck / never in fstab? on: July 29, 2009, 01:15:08 PM
Hi.  General question for the group...  I was trying to set up /etc/fstab and I noticed that the file system entries all end in 0, to never fsck on boot.  The guide I read suggested that / should be set to 1 and everything else to 2, so that fsck checks 1 first and then everything else simultaneously. 

Here's what it looks like now (without my USB HD and SD card entries)
Code:
# UNCONFIGURED FSTAB FOR BASE SYSTEM
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
/proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,nosuid,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
rootfs / rootfs rw 0 0
tmpfs   /var/cache/apt  tmpfs   defaults,noatime

1) Why is / set to never fsck?
2) Is there a reason I shouldn't change / to 1 and the others to 2 to check on boot as needed?

Thanks!

John
4  General Category / Success stories / Re: Managing a USB hard drive on the Plug on: July 29, 2009, 11:20:06 AM
Restamp,

Thanks for the script!  Booting takes a little longer, but at least now it's possible.  After adding my USB HD to fstab set to fsck, I had to use the USB-serial console to get things moving again, and I'd hoped to survive by SSH alone!  Disabling the fsck let it boot OK, but without automatically mounting.  Now I'm back in business.  But I never imagined it would be so hard to get a USB drive running.

One thing, thought, that I had to do to to get the script running was make it executable. 

From the directory where you saved the script:
Code:
sudo chmod +x wait4usbdisks

Assuming that's what actually did the trick for me after creating a text file with nano from your provided code, I figure you folks had enough experience to know to do that, but as someone who never really stumbled past the occasional ssh or scp on a home network, it drove me nuts.  I've been wondering if the sheevaplug thing is over my head!

Anway, I hope that helps somebody else trying this as their first brush with init scripts.  But if I'm mistaken, please point it out before I lead someone astray....

Again, thanks for the script.

John
Pages: [1]