Arrfab's Blog Linux tips and tricks …

30Jan/09Off

Maxtor external USB disk not Linux friendly ?

I recently decided to add an external disk to my small CentOS 5.2 xen dom0 home server (already using two 500Gb sata disk in lvm/mdadm raid1). I attached a Maxtor One-Touch IV 750Gb USB2 external disk to it and was able to directly re-partition the disk , format it in ext3 (not adding it in the lvm VG , i'm not 'so' fool). Great, i had now external device to store 'non vital data', aka local mirror of CentOS repositories and other stuff i can even grab from the Net if needed while the internal VG is used to store domU's and data shared through nfs on my lan. And then the problems :

"Jan 29 07:10:31 helium kernel: sd 6:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
Jan 29 07:10:31 helium kernel:     Add. Sense: Logical unit not ready, initializing command required
Jan 29 07:10:31 helium kernel:
Jan 29 07:10:31 helium kernel: end_request: I/O error, dev sdc, sector 12375
Jan 29 09:42:58 helium kernel: sd 6:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
Jan 29 09:42:58 helium kernel:     Add. Sense: Logical unit not ready, initializing command required
Jan 29 09:42:58 helium kernel:
Jan 29 09:42:58 helium kernel: end_request: I/O error, dev sdc, sector 220455
Jan 29 09:42:58 helium kernel: Aborting journal on device sdc1.
Jan 29 09:43:31 helium kernel: ext3_abort called.
Jan 29 09:43:31 helium kernel: EXT3-fs error (device sdc1): ext3_journal_start_sb: Detected aborted journal
Jan 29 09:43:31 helium kernel: Remounting filesystem read-only
Jan 29 09:44:03 helium kernel: ext3_abort called."

Not so cool, right ? By default the Maxtor disk has a standby mode that spins down the disk (and so fool the kernel) that leads to such messages . Fortunately you can change that with sdparm (rpm available in the RPMforge repo):

"[root@helium ~]# sdparm -a /dev/sdc
/dev/sdc: Maxtor    OneTouch          0125
Power condition mode page:
IDLE        0  [cha: n, def:  0, sav:  0]
STANDBY     1  [cha: y, def:  1, sav:  1]
ICT         0  [cha: n, def:  0, sav:  0]
SCT       9000  [cha: y, def:9000, sav:9000]

[root@helium ~]# sdparm --clear=STANDBY /dev/sdc -S

[root@helium ~]# sdparm -a /dev/sdc
/dev/sdc: Maxtor    OneTouch          0125
Power condition mode page:
IDLE        0  [cha: n, def:  0, sav:  0]
STANDBY     0  [cha: y, def:  1, sav:  0]
ICT         0  [cha: n, def:  0, sav:  0]
SCT       4294967286  [cha: y, def:9000, sav:4294967286]"
As you can see you can query and modify the default settings and even save them "-S" so that after a reboot they are still applied. Ok, problem solved so now I can continue to work ...

Share and Enjoy:
  • Facebook
  • Twitter
  • Print
  • PDF
  • del.icio.us
  • Google Bookmarks
  • email
Filed under: CentOS Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.