# [solved] USB harddrive removes itself from kernel?

## disi

I have a new USB harddrive on another computer, which I want to share over the network via NFS. There is already another USB HD which has no problems...

Somehow the drive completely shuts down after a while, the kernel gets an IO error and then it reinitializes the drive under a different devicename

e.g. former /dev/sda1 becomes /dev/sdc1

nfs really doesn't like it and it freezes my client computers filemanager

Here is the relevant log:

 *Quote:*   

> Mar 10 23:44:17 disi-openvz kernel: nfsd: last server has exited
> 
> Mar 10 23:44:17 disi-openvz kernel: nfsd: unexporting all filesystems
> 
> Mar 10 23:44:17 disi-openvz kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
> ...

 

And here my devices before I shutdown the nfs server (sdb is the other USB drive):

 *Quote:*   

> disi-openvz ~ # ls /dev/s*
> 
> /dev/sdb  /dev/sdb1  /dev/sdc  /dev/sdc1  /dev/sg0  /dev/sg1  /dev/stderr  /dev/stdin  /dev/stdout
> 
> 

 

to fix it, I have to shut down the nfs server and wait 5 minutes, the device goes then back to it's originally device...

I know this is no supported kernel, so if you like move me to unsupported. I just thought the device stuff is rather default vanilla sources and not affected by the openvz patch?

//edit: would it help to use the uuid or label to mount it?

//edit: sorry, vanilla sources 2.6.24 with openvz patch 009

----------

## Jaglover

Is it a WD "green" drive?

----------

## disi

The one without problems is a WD external USB drive

The one that causes the problems is Seagate external USB drive

They both have power saving capabilities and spin down after a while, maybe the seagate just doesn't spin up fast enough? Something I could tweak via sdparm?

----------

## Jaglover

I happened to read somewhere WD green drives have annoying feature to park heads and stay in this state for 30 s, no matter what. Maybe now Seagate has something similar. Sorry, can't be further help.

----------

## disi

Thanks for your help, it is not a critical thing just annoying and weird...

I'll try later if it works better using label or uuid for the harddrive, could be a hal/udev issue as well who knows  :Smile: 

//edit: just for the record this drive does weird things. I reformatted it with badblocks check, used label etc. it is always the same. It cannot properly wake up to the device it had before, if it is shared on the network. I use it here on the desktop and let hal mount it, which works ok.   :Rolling Eyes: 

----------

## disi

Fixed it, by disabling standby modus with sdparm:

3. enter "sudo sdparm -a /dev/sdc"

4. enter "sudo sdparm --command=start /dev/sdc"

5. enter "sudo sdparm --clear STANDBY -6 /dev/sdc"

Got that from here: http://ubuntuforums.org/showthread.php?t=744073

----------

