[Cialug] external hdd, laptop, clean unmounts

David Champion dchampion at visionary.com
Wed Jan 9 13:46:56 CST 2008


FYI - I tried this script last night and it worked fine for my WD 
Passport USB drive.

In KDE's Konqueror file browser, if I go to the "Media" tab, I can 
right-click on removable drives and choose "Remove safely". I think this 
only does a umount - it didn't seem to actually stop the drive like the 
sdparm trick in the script does.

-dc

David Champion wrote:
> Matthew Nuzum wrote:
>> I now have a USB hard drive for doing backups and storing less 
>> frequently
>> used data. It needs to be plugged into the wall and for various 
>> reasons I
>> don't want to carry it around with me whenever I want to work in another
>> room/building.
>>
>> Right now, my USB hub has my keyboard, mouse and laser printer 
>> plugged into
>> it. The beauty is that none of those things complain if I just unplug 
>> the
>> cord and walk away. I'd like to plug my hdd into the hub as well.
>>
>> However, the hdd is not happy if I yank the cord and walk away. I get 
>> the
>> nasty "Unsafe device removal" warning box and if I do it too many times,
>> presumably I'll lose data too. I tend to move around a lot. 
>> Presumably I'll
>> move around far more frequently than I'll use the ext hdd.
>>
>> Anyone know a way to set things up so that I can just unhook without a
>> second thought?
>>
>>  * Goal 1: Not loose data, assuming the light on the front of the 
>> drive has
>> stopped blinking before I unplug
>>  * Goal 2 (optional): Not get the "unsafe device removal" warning
>>   
>
> Check out this thread:
>
> http://ubuntuforums.org/showthread.php?t=451344
>
> A ways down someone named clem-vangelis posts this script.
>
> (quote)
> #!/bin/bash
> WD=/dev/sdb1
> sudo umount $WD
> if [ $? -eq 0 ]
> then
> echo Stopping heads
> sdparm --command=stop $WD
> else
> echo Unmount Failed !
> fi
>
> just replace /dev/sdb1 by your WD passport name and then your WD will 
> shutdown silently ( like in windows
> (end quote)
>
> I got one of the little WD Passport drives last week at a Best Buy in 
> the D.C. area while I was there on a trip. 250gb for $140. So far it's 
> been working really well. I try to remember to umount it when I'm 
> done, but have occasionally just pulled the plug.
>
> -dc
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>




More information about the Cialug mailing list