# External HDD problem



## daill (Feb 8, 2014)

Hey there, 

I am on my way to build my own NAS based on FreeBSD 10. At the moment I'm experiencing a problem with my external USB HDD which is formatted with UFS . The case is as follows, I mount the USB drive and everything is working fine. But after a few hours the USB drive seems to go to power saving mode. After that FreeBSD shows an active mount but I'm not able to write any files to it. When I try to unmount it I get the "Device is busy" message. After a reboot and try to mount FreeBSD states me that I have to run fsck(8) in order to clean the file system. How can avoid this behaviour? I would be grateful for any help.

Regards,
daill


----------



## jb_fvwm2 (Feb 8, 2014)

If it is due to power-saving, 
	
	



```
while: ; do sleep 60 && (rm /mnt/file ; touch /mnt/file ); done
```
 ... Or a similar [debugged or improved ] command, maybe in the background. (&)


----------



## ralphbsz (Feb 9, 2014)

This is not a helpful suggestion, just sharing my frustration with a similar problem:

I used to use a USB-based disk for my backup (this disk is connected via a long cable, and physically sits in a large safe with thick walls). Between power saving mode, and generally quirky USB, I figured out that USB is just not ready for 24x7 operation.  I had to reboot every few days, deal with crashes of my backup program once a day, and unmount/remount the file system about that frequency. Since I also suspected that the problem was caused by the drive going idle, I had a script start a full ZFS scrub all the time (it ran every few minutes, watched whether a scrub was running, and there wasn't one running started another one). Didn't help either.

I switched to a SATA disk, new enclosure, and an eSATA cable. Works like a charm now. The afflicted USB disk is now being used as a "use once in a while" drive on a laptop, where it does the job really well.


----------



## daill (Feb 9, 2014)

Hey, 

Thanks four your suggestions and for the hint with the script. But I think I walk along with @ralphbsz and choose another connector and try it again.

Regards, 
daill


----------

