Mounting partitions with systemd

Example systemd mount unit:

[Unit]
Description = Backup logical volume
After = lvm2-monitor.service

[Mount]
What = UUID="a37505f4-46e7-4496-8926-deadbeef4a79"
#What = "/dev/vg_backup/lv_backup"
Where = /mnt/backup
Type = xfs
Options = nodev,nosuid,noexec

[Install]
WantedBy = multi-user.target

Note that the unit file name needs to match the Where = clause. This unit needs to be named mnt-backup.mount, and goes in /etc/systemd/system/.

Advertisements
Mounting partitions with systemd

One thought on “Mounting partitions with systemd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s