
Sign up to save your podcasts
Or
Welcome to Linux Insights. Today we’re diving into how to use systemd for auto-mounting storage volumes on your workstation or server. As Jay LaCroix explains, “mounting volumes with systemd is very effective and is the recommended method going forward.”
First, identify your block device—say /dev/sdb1—and create a matching .mount unit in /etc/systemd/system. Name it after the mount path, for example, media-data.mount, and set the correct [Mount] options: What device, what directory, and your filesystem type. Then create a media-data.automount unit with [Automount], pointing to the same mount file, and set IdleTimeoutSeconds if you want it to unmount after a period of inactivity.
Enable both units with “systemctl enable media-data.automount” and start them. Your volume will only mount when you access the directory, speeding up boot and keeping things tidy.
For NFS shares, you can skip separate units by adding x-systemd.automount to your /etc/fstab entry. This tells systemd to handle the share the same way, mounting on demand.
That’s it—fast, reliable, and exactly why systemd is the modern path to managing your storage. Thanks for listening!
Link to Article
Welcome to Linux Insights. Today we’re diving into how to use systemd for auto-mounting storage volumes on your workstation or server. As Jay LaCroix explains, “mounting volumes with systemd is very effective and is the recommended method going forward.”
First, identify your block device—say /dev/sdb1—and create a matching .mount unit in /etc/systemd/system. Name it after the mount path, for example, media-data.mount, and set the correct [Mount] options: What device, what directory, and your filesystem type. Then create a media-data.automount unit with [Automount], pointing to the same mount file, and set IdleTimeoutSeconds if you want it to unmount after a period of inactivity.
Enable both units with “systemctl enable media-data.automount” and start them. Your volume will only mount when you access the directory, speeding up boot and keeping things tidy.
For NFS shares, you can skip separate units by adding x-systemd.automount to your /etc/fstab entry. This tells systemd to handle the share the same way, mounting on demand.
That’s it—fast, reliable, and exactly why systemd is the modern path to managing your storage. Thanks for listening!
Link to Article