On Mon, 2021-03-15 at 06:52 +0800, Ed Greshko wrote:
On 15/03/2021 06:10, Patrick O'Callaghan wrote:
On Mon, 2021-03-15 at 05:09 +0800, Ed Greshko wrote:
On 15/03/2021 00:31, Patrick O'Callaghan wrote:
I rebooted and got:
# findmnt /raid # ls /raid # findmnt /raid #
IOW nothing happens.
systemctl status raid.mount systemctl status raid.automount systemctl status dock.service
# systemctl status raid.mount ● raid.mount - External /raid mount Loaded: loaded (/etc/systemd/system/raid.mount; disabled; vendor preset: disabled) Active: inactive (dead) Where: /raid What: /dev/md0p1 # systemctl status raid.automount ● raid.automount - Automount /raid Loaded: loaded (/etc/systemd/system/raid.automount; disabled; vendor preset: disabled) Active: inactive (dead) Triggers: ● raid.mount Where: /raid # systemctl status dock.service ● dock.service - Power the dock up Loaded: loaded (/etc/systemd/system/dock.service; static) Active: inactive (dead)
systemctl enable raid.mount systemctl enable raid.automount
OK, hadn't realised that was necessary. Now (after a reboot) I get: # findmnt /raid TARGET SOURCE FSTYPE OPTIONS /raid systemd-1 autofs rw,relatime,fd=51,pgrp=1,timeout=300,minproto=5,maxproto=5,direct,pipe_ino=728
which is good, but still: # ls /raid ls: cannot access '/raid': No such device #
Turned out that mount was showing: mount: /raid: wrong fs type, bad option, bad superblock on /dev/md0p1, missing codepage or helper program, or other error.
which I finally narrowed down to the NFS 'soft' and 'fg' mount options, which of course don't apply in my case. After removing those it now appears to work.
The only remaining problem (touch wood) is to get the power-down script to run after a timeout. I'll consider writing a special script to monitor the mount status independently of systemd.
Hopefully that's all for now. Many thanks Ed, and thanks also to Jonathan for useful pointers.
poc