Hi,
I am trying to mount a SSD storage following the instruction in documents and the following topic,
I am using systemd and have enabled DBUS_SYSTEM_BUS_ADDRESS
using the dashboard Device Configuration. The path for SSD is /dev/sda1
. Here is my mount service,
[Unit]
Description = External SSD Drive
[Mount]
What = /dev/sda1
Where = /mnt/storage
Type = ext4
Options = rw,relatime,data=ordered
[Install]
WantedBy = multi-user.target
and in Dockerfile INISYSTEM is set to on,
#Enable container init system.
ENV INITSYSTEM on
#External storage
COPY mnt-storage.mount /etc/systemd/system/mnt-storage.mount
RUN systemctl enable /etc/systemd/system/mnt-storage.mount
I am not sure what I am missing since the SSD never gets mounted and the /mnt/storage
path never gets created. The mount service is copied to the correct location,
:/etc/systemd/system# ll
total 28
drwxr-xr-x 1 root root 4096 Jan 10 19:51 ./
drwxr-xr-x 1 root root 4096 Dec 18 05:50 ../
drwxr-xr-x 2 root root 4096 Dec 18 05:49 getty.target.wants/
-rw-rw-r-- 1 root root 174 Jan 10 19:47 mnt-storage.mount
drwxr-xr-x 1 root root 4096 Jan 10 19:51 multi-user.target.wants/
lrwxrwxrwx 1 root root 31 Jan 9 23:07 sshd.service -> /lib/systemd/system/ssh.service
drwxr-xr-x 2 root root 4096 Dec 18 05:49 sysinit.target.wants/
drwxr-xr-x 2 root root 4096 Dec 18 05:50 timers.target.wants/
also symlink is created,
Created symlink /etc/systemd/system/multi-user.target.wants/mnt-storage.mount, pointing to /etc/systemd/system/mnt-storage.mount.
running systemctl status
command returns not found error,
systemctl status mnt-storage.mount
● mnt-storage.mount
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
also tried to start the service in container and again returned not found error,
systemctl start mnt-storage.mount
Failed to start mnt-storage.mount: Unit mnt-storage.mount not found.
What is incorrect in my configuration?
Thanks!