Created
March 22, 2024 23:34
-
-
Save jdmedeiros/e40d09c5649d9c4b7888d4e808bd0cb7 to your computer and use it in GitHub Desktop.
Open-Mount and Unmount-Close LVM 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 LVM LUKS RAID6 Volume | |
After=local-fs-pre.targe | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStartPre=-/bin/mkdir -p /mnt/raid6LVM | |
ExecStartPre=-/bin/umount /mnt/raid6LVM | |
ExecStart=/usr/lib/systemd/systemd-cryptsetup attach lv1_crypt /dev/vg1/lv1 | |
ExecStart=/bin/mount /dev/mapper/lv1_crypt /mnt/raid6LVM | |
ExecStop=/bin/umount /mnt/raid6LVM | |
ExecStopPost=-/usr/lib/systemd/systemd-cryptsetup detach lv1_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