Systemd NFS mount

Devo studiare questo nuovo metodo:, diverso dal “vecchio” FSTAB.

Creare un servizio chiamato mount_point.mount :

Description=test nfs mount script
#Network mounts *require* 'network-online.service' which checks if the network is online
#Our scripts must start *after* 'network-online.service', on timeout and if 'network-online.service' fails we can not mount and this scripts fails too

#The share we want mount
#Where we want mount this share
#Any options you usually use with the "-o" parameter in the mount command
#Filesystem type 

#The target is used by 'systemctl enable <name_of_this_file.mount>' to link this service to a runlevel for starting on boot. usually '' is ok here.

Important: this file must be renamed to mountpoint.mount where mountpoint, is the FULL path where the share will be mounted.

Slashes “/” MUST BE REPLACED with dashes “-” with .mount as extension. This means, if we want mount to “/storage/music” (see above “Where=/storage/music”) then this file must be renamed to ‘storage-music.mount’. This is only for the filename! not for the What= and Where= sections!
Enabling the NFS mount

This mount can then be enabled via ssh with the command

systemctl enable storage-movies.mount
Questa voce è stata pubblicata in Debian e contrassegnata con , , , , . Contrassegna il permalink.


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )


Connessione a %s...