Systemd on vivid beta
Tom H
tomh0665 at gmail.com
Tue Mar 17 20:44:59 UTC 2015
On Sun, Mar 15, 2015 at 7:41 AM, Colin Law <clanlaw at gmail.com> wrote:
> On 14 March 2015 at 20:08, Tom H <tomh0665 at gmail.com> wrote:
>>
>> <begin>
>> # systemctl cat home-th-srvtom.mount
>> # /etc/systemd/system/home-th-srvtom.mount
>> [Unit]
>> Before=remote-fs.target
>>
>> [Mount]
>> What=//192.168.1.11/srvtom
>> Where=/home/th/srvtom
>> Type=cifs
>> Options=credentials=/home/th/.cifscreds
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> # systemctl status home-th-srvtom.mount
>> ● home-th-srvtom.mount - /home/th/srvtom
>> Loaded: loaded (/etc/systemd/system/home-th-srvtom.mount; enabled;
>> vendor preset: enabled)
>> Active: active (mounted) since Sat 2015-03-14 15:56:47 EDT; 1min 47s ago
>> Where: /home/th/srvtom
>> What: //192.168.1.11/srvtom
>> Process: 554 ExecMount=/bin/mount //192.168.1.11/srvtom
>> /home/th/srvtom -n -t cifs -o credentials=/home/th/.cifscreds
>> (code=exited, status=0/SUCCESS)
>>
>> Mar 14 15:56:47 localhost systemd[1]: Mounting /home/th/srvtom...
>> Mar 14 15:56:47 localhost systemd[1]: Mounted /home/th/srvtom.
>> </end>
>
> OK, I have replicated that for my mount and it basically is ok,
> mounting at boot as expected. However, if I boot with the network
> disconnected and then connect it I see
>
> $ systemctl status media-test_mount.mount
> ● media-test_mount.mount - /media/test_mount
> Loaded: loaded (/etc/systemd/system/media-test_mount.mount;
> enabled; vendor preset: enabled)
> Active: failed (Result: exit-code) since Sun 2015-03-15 11:32:45
> GMT; 5min ago
> Where: /media/test_mount
> What: //192.168.1.nn/docs
> Process: 786 ExecMount=/bin/mount //192.168.1.96/docs
> /media/test_mount -n -t cifs -o credentials=*** (code=exited,
> status=32)
>
> Mar 15 11:32:45 tigger systemd[1]: Mounting /media/test_mount...
> Mar 15 11:32:45 tigger mount[786]: mount error(101): Network is unreachable
> Mar 15 11:32:45 tigger mount[786]: Refer to the mount.cifs(8) manual
> page (e.g. man mount.cifs)
> Mar 15 11:32:45 tigger systemd[1]: media-test_mount.mount mount
> process exited, code=exited s...s=32
> Mar 15 11:32:45 tigger systemd[1]: Failed to mount /media/test_mount.
> Mar 15 11:32:45 tigger systemd[1]: Unit media-test_mount.mount entered
> failed state.
>
> And it does not appear to be making any attempt to retry. If I then
> use systemctl start then it does mount.
Why are you expecting it to retry automatically?
I've never used it but there's "Restart=on-failure".
More information about the ubuntu-users
mailing list