Hello Randy, > [...] > The volume mounts great if I start the service via systemctl after > startup (if the file system is clean), that is, "systemctl start s3ql" > But if I reboot I find the file system is corrupt and fails to > remount, and need to run fsck.s3ql before it will mount again. > It appears the file system isn't unmounting cleanly on shutdown. > [...] > Here's my /lib/systemd/system/s3ql.service file: > [Unit] > Description=mount s3ql filesystem > Require=NetworkManager-wait-online.service > After=NetworkManager-wait-online.service > > [Service] > ExecStart=/usr/bin/mount.s3ql --fg --authfile /etc/s3ql.authinfo > --allow-other swift://tin.fhcrc.org/fast_dr/ /fast_dr > ExecStop=/usr/bin/umount.s3ql /fast_dr > TimeoutStopSec=5min
I am using this this unit file: |[Unit] Description=Mount s3ql file system Requires=nss-lookup.target network.target time-sync.target After=nss-lookup.target network.target network-online.target remote-fs-pre.target time-sync.target Conflicts=shutdown.target ConditionPathIsDirectory=/fast_dr [Service] #Type=notify Type=simple ExecStart=/usr/local/sbin/mount-fast_dr.sh LimitNOFILE=66000 NotifyAccess=all TimeoutStopSec=10min TimeoutStartSec=10min [Install] WantedBy=multi-user.target | It uses the following start script (|/usr/local/sbin/mount-fast_dr.sh|): |#!/bin/bash FSCK_OPTS="--batch --authfile /etc/s3ql.authinfo" MOUNT_OPTS="--fg --allow-other --authfile /etc/s3ql.authinfo" STORAGE_URL="swift://tin.fhcrc.org/fast_dr/" MOUNTPOINT="/fast_dr" # Check and mount file system echo executing fsck.s3ql $FSCK_OPTS "$STORAGE_URL" /usr/bin/fsck.s3ql $FSCK_OPTS "$STORAGE_URL" FSCK_RESULT=$? if [[ $FSCK_RESULT != 0 && $FSCK_RESULT != 128 ]]; then echo "fsck.s3ql reported errors! exit code $FSCK_RESULT" exit $FSCK_RESULT fi /bin/systemd-notify --ready --status="Waiting for data..." echo executing mount.s3ql $MOUNT_OPTS "$STORAGE_URL" "$MOUNTPOINT" exec /usr/bin/mount.s3ql $MOUNT_OPTS "$STORAGE_URL" "$MOUNTPOINT" | -- You received this message because you are subscribed to the Google Groups "s3ql" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
