Skip to content

Instantly share code, notes, and snippets.

@project0
Created August 23, 2017 15:05
Show Gist options
  • Save project0/27872d5fdc26f13f4d62bde9afd8da78 to your computer and use it in GitHub Desktop.
Save project0/27872d5fdc26f13f4d62bde9afd8da78 to your computer and use it in GitHub Desktop.
# /etc/systemd/system/loop@.service
# systemctl daemon-reload
# systemctl start loop@sdxx
# systemctl enable loop@sdxx
[Unit]
Description=Mount journal partition as loop2
Before=ceph-osd.target
[Service]
Type=oneshot
ExecStart=/sbin/losetup /dev/loop2 /dev/%i
ExecStop=/sbin/losetup -d /dev/loop2
RemainAfterExit=true
StandardOutput=journal
[Install]
WantedBy=local-fs-pre.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment