Created
March 22, 2024 23:33
-
-
Save jdmedeiros/3db0d2aa1e672273ab1c0e36ea2ec5e8 to your computer and use it in GitHub Desktop.
Open-Mount and Unmount-Close LUKS RAID6 Volume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Open-Mount and Unmount-Close LUKS RAID6 Volume | |
After=local-fs-pre.targe | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStartPre=-/bin/mkdir -p /mnt/raid6NoLVM | |
ExecStartPre=-/bin/umount /mnt/raid6NoLVM | |
ExecStart=/usr/lib/systemd/systemd-cryptsetup attach md0_crypt /dev/md0 | |
ExecStart=/bin/mount /dev/mapper/md0_crypt /mnt/raid6NoLVM | |
ExecStop=/bin/umount /mnt/raid6NoLVM | |
ExecStopPost=-/usr/lib/systemd/systemd-cryptsetup detach md0_crypt | |
# Omitting [Install] section to keep the service manual-start only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment