NAS and managing electrical mains

Alvin info at
Thu Jan 19 14:01:27 UTC 2012

On Thu, 19 Jan 2012 14:51:43 +0100, Francesco Antonetti Lamorgese Passeri  
<antlampas at> wrote:

> Hi,
> I've Kubuntu 11.10 on my notebook and a Lacie NAS wired to my home LAN.  
> Usually i mount the shares on the NAS as local file systems (/mnt/NAS),  
> to make it usable for certain software not supporting network protocols.  
> I would solve this problem: sometimes happens the elctrical mains goes  
> down suddenly, so my notebook loses the connection to the NAS. In this  
> case, if i turn off the notebook, it takes several minutes to shutdown,  
> beacuse, i suppose, the system don't recognizes the connection loss. How  
> can i instruct the system to recognize the connection loss quickly and  
> unmount the remote partitions?

You'd connect your UPS to the notebook and write a script that unmounts  
when the UPS reaches a certain battery level.

Seriously, there's no other good solution. I suppose you could 'ping' the  
NAS and then force an unmount, but that's very ugly. Besides, you don't  
want the unmount, you'd want to stop the processes using the NAS.  
Otherwise data could end up where you don't want it.

More information about the kubuntu-users mailing list