Re: [Hampshire] Safely unmounting a server's external hard d…

Top Page

Reply to this message
Author: Chris Dennis
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Safely unmounting a server's external hard drive
John Cooper wrote:
> Chris Dennis wrote:
>> Hello folks
>>
>> I'm planning to use one or more external USB hard drives to backup a
>> headless server running Debian. I'll probably use rsnapshot, with a
>> script that detects for the presence of the right drive.
>>
>> But how can the server tell the user when it is safe to unplug the
>> drive? Or maybe the user should somehow tell the server "I want to
>> unplug the drive -- stop using it and unmount it".
>>
>> The user's only way of communicating with the server is by email or
>> possibly via Webmin.
>>
>> Has anyone come up with a cunning plan to deal with this?
>>
>> cheers
>>
>> Chris


Thanks for the various replies.

The simple "unmount after backup" idea won't work for me because I'm
planning to run rsnapshot via cron every hour while the drive is plugged
in, but allow the drive to be taken off-site at weekends or whenever.

In fact I think Webmin (for all its faults) will allow the user to
unmount the drive and/or see whether it is currently mounted. They can
then remove the drive knowing that it will not be used again until the
appointed cron time -- 15 minutes past the hour for example.

> Have a look at this USB suspend script:-
>

http://elliotli.blogspot.com/2009/01/safely-remove-usb-hard-drive-in-linux.html

That all looks very elaborate. Is it really necessary? Does this mean
that good old 'umount' hasn't been working for USB drives all this time?

cheers

Chris

-- 
Chris Dennis                                  cgdennis@???
Fordingbridge, Hampshire, UK