periodic - Adjust daily 160 and 161 (hammer and hammer2 cleanup)
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 19 Mar 2018 19:23:14 +0000 (12:23 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 19 Mar 2018 19:23:14 +0000 (12:23 -0700)
* Use /usr/bin/lockf to avoid backing up many hammer or hammer2
  cleanup processes, as a cleanup (depending on the situation
  and vfs.hammer2.bulkfree_tps setting) can take longer than a
  day.

etc/periodic/daily/160.clean-hammer
etc/periodic/daily/161.clean-hammer2

index 2e591bf..eeb06cf 100644 (file)
@@ -24,6 +24,7 @@ case "$daily_clean_hammer_enable" in
                verbose=;;
        esac
 
+       /usr/bin/lockf -k -t 0 /var/run/.daily.160.lck \
        hammer $verbose cleanup $daily_clean_hammer_pfslist && rc=0;;
 
     *)  rc=0;;
index 7500488..8bc027d 100644 (file)
@@ -21,6 +21,7 @@ case "$daily_clean_hammer2_enable" in
                verbose=;;
        esac
 
+       /usr/bin/lockf -k -t 0 /var/run/.daily.161.lck \
        hammer2 $verbose cleanup $daily_clean_hammer2_pfslist && rc=0;;
 
     *)  rc=0;;