[opensuse] USB disk goes to sleep, causes "device not ready" errors
Hello, I bought an external USB disk, Seagate FreeAgent, and want to use it with my SUSE 10.0 system. I was not able to locate detailled technical information about that disk on the Net. After some time, the disk puts itself in some "sleep" mode. ("sleep" is my term; I have not found infos on that. It's maybe to save power, or to protect against too much heat; there doesn't seem to be a fan in this disk case.) When one wants to access the disk afterwards, Linux complains that the device is not ready, and has I/O errors on that device. If one waits for four or five seconds, the disk has spun up and the device can be accessed again without problems. I don't know if I can discover if the disk sleeps or not. (Well, besides getting kernel error messages in syslog when I try to access it. ;-) When the disk sleeps, lsusb still lists the device as available. My problem is now twofold: -- When that disk goes to sleep while it is mounted, that causes havroc for the filesystem state. I use XFS -- when XFS sees the device errors, it places the filesystem in an error state. -- When the disk is unmounted and sleeps, mount does not work without problems either. One has to wait until the disk has started itself again, just then the mount succeeds. In the end, this means that I can only mount the disk manually, and that I must take care to unmount it very soon after its use. This is obviously not what I want, some automatism would be nice. Therefore: -- Does anybody know this disk and can tell me more about that "sleep" mode? -- Can one tell Linux that it shall wait for some time during mount (and retry) when it gets a "device not ready" error? -- Is there some hotplug or HAL magic that one can utilize here? I used a recipe to turn off automatic mounting in HAL, but I don't know enough about these systems to see if one could utilize them in my situation. Thanks in advance for any answers, or for hints where I could follow up. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-06-19 at 16:17 +0200, Joachim Schrod wrote:
I bought an external USB disk, Seagate FreeAgent, and want to use it with my SUSE 10.0 system. I was not able to locate detailled technical information about that disk on the Net.
After some time, the disk puts itself in some "sleep" mode. ("sleep" is my term; I have not found infos on that. It's maybe to save power, or to protect against too much heat; there doesn't seem to be a fan in this disk case.) When one wants to access the disk afterwards, Linux complains that the device is not ready, and has I/O errors on that device. If one waits for four or five seconds, the disk has spun up and the device can be accessed again without problems.
I don't know if I can discover if the disk sleeps or not. (Well, besides getting kernel error messages in syslog when I try to access it. ;-) When the disk sleeps, lsusb still lists the device as available.
All hardddisks made have that feature: after some minutes (15') without any activity, they spin down. The time is configurable, and can be activated/dissabled. On an internal disk this doesn't cause problems, the kernel probably knows about this - maybe not. I tried it years ago and it worked. Now, external drives... that's interesting. I would report the problem to bugzilla, the kernel should survive a disk sleep. In fact, I have reproduced your problem in my system (or a related problem): Jun 19 22:16:06 nimrodel kernel: scsi 3:0:0:0: rejecting I/O to dead device Jun 19 22:16:06 nimrodel kernel: ReiserFS: sda1: warning: zam-7001: io error in reiserfs_find_entry Jun 19 22:16:32 nimrodel kernel: scsi 3:0:0:0: rejecting I/O to dead device Jun 19 22:16:32 nimrodel kernel: ReiserFS: sda1: warning: zam-7001: io error in reiserfs_find_entry The command to enable/disable the sleep mode is hdparm: -C Check the current IDE power mode status, which will always be one of unknown (drive does not support this command), active/idle (normal oper- ation), standby (low power mode, drive has spun down), or sleeping (lowest power mode, drive is completely shut down). The -S, -y, -Y, and -Z flags can be used to manipulate the IDE power modes. -Y Force an IDE drive to immediately enter the low- est power consumption sleep mode, causing it to shut down completely. A hard or soft reset is required before the drive can be accessed again (the Linux IDE driver will automatically handle issuing a reset if/when needed). The current power mode status can be checked using the -C flag. And a few more: nimrodel:~ # hdparm -C /dev/sdb /dev/sdb: drive state is: unknown nimrodel:~ # hdparm -y /dev/sdb /dev/sdb: issuing standby command HDIO_DRIVE_CMD(standby) failed: Invalid argument But the usb box chipset does not support all the features there are, because I know for certain the drive does support them (it was an internal drive and I checked years ago). So, if the dis has that feature enabled, you can not disable it while used via usb - but try, perhaps yours can. The alternative for you is to touch a file periodically via cron. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGeD3JtTMYHG2NR9URAo4XAJ4qGkeX4moq/FdUeS+GKi9EP1k/SACfaKV+ 5Ot6aHm5AWZSkUMTfQYnnSo= =YqwW -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Carlos E. R.
-
Joachim Schrod