-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-lint-action
- Loading branch information
Showing
22 changed files
with
431 additions
and
259 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/zfs-cleaner | ||
/.idea/ | ||
/debian/.debhelper |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
zfs-cleaner (0.9alpha-1) any; urgency=low | ||
* Performance rewrite | ||
|
||
-- Jesper Broge Jørgensen <[email protected]> Wed, 13 Jan 2021 17:01:31 +0000 | ||
|
||
zfs-cleaner (0.8alpha-1) any; urgency=low | ||
* Added age to destroy comment | ||
* Print configuration on verbose | ||
* Do not use args before checking if they exist | ||
|
||
-- Anders Brander <[email protected]> Tue, 27 Oct 2020 15:23:31 +0000 | ||
|
||
zfs-cleaner (0.7alpha-1) any; urgency=low | ||
|
||
* Add include keyword | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include cleaner_*.conf |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -x pipefail | ||
|
||
REMOTE=$(cat remotehost) | ||
|
||
ssh "$REMOTE" zpool destroy datastore0 | ||
ssh "$REMOTE" zpool destroy datastore1 | ||
ssh "$REMOTE" zpool destroy datastore2 | ||
|
||
ssh "$REMOTE" losetup -v -d /dev/loop10 | ||
ssh "$REMOTE" losetup -v -d /dev/loop11 | ||
ssh "$REMOTE" losetup -v -d /dev/loop12 | ||
ssh "$REMOTE" losetup -v -d /dev/loop13 | ||
ssh "$REMOTE" losetup -v -d /dev/loop14 | ||
ssh "$REMOTE" losetup -v -d /dev/loop15 | ||
ssh "$REMOTE" losetup -v -d /dev/loop16 | ||
ssh "$REMOTE" losetup -v -d /dev/loop17 | ||
|
||
ssh "$REMOTE" rm -rf /zfsmnt | ||
|
||
ssh "$REMOTE" rm -f /root/*.conf | ||
ssh "$REMOTE" rm -f /root/*.protect | ||
ssh "$REMOTE" rm -f /usr/local/bin/zfs-cleaner |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plan cego-registry { | ||
path datastore0 | ||
path datastore1 | ||
|
||
keep latest 100 | ||
keep 0s for 4h | ||
keep 1h for 48h | ||
keep 1d for 30d | ||
protect </root/1.protect | ||
protect </root/2.protect | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plan mg-local-backup { | ||
path datastore2 | ||
|
||
keep latest 2 | ||
keep 0s for 4h | ||
keep 1h for 36h | ||
keep 1d for 30d | ||
keep 30d for 180d | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plan non_existing { | ||
path datastore_non_existing | ||
|
||
keep latest 2 | ||
keep 0s for 4h | ||
keep 1h for 36h | ||
keep 1d for 30d | ||
keep 30d for 180d | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
167.172.188.13 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
set -exo pipefail | ||
|
||
REMOTE=$(cat remotehost) | ||
|
||
scp ../zfs-cleaner "$REMOTE:/usr/local/bin" | ||
scp *.conf "$REMOTE:" | ||
|
||
echo "without ignore empty" | ||
|
||
ssh "$REMOTE" zfs-cleaner plancheck cleaner_datastore_0-1.conf | ||
|
||
echo "with ignore empty" | ||
|
||
ssh "$REMOTE" zfs-cleaner plancheck --ignore-empty cleaner_datastore_0-1.conf | ||
|
||
echo "all" | ||
|
||
ssh "$REMOTE" zfs-cleaner plancheck all.conf | ||
|
||
echo "clean" | ||
|
||
ssh "$REMOTE" zfs-cleaner cleaner_datastore_0-1.conf | ||
|
||
echo "non existing" | ||
ssh "$REMOTE" zfs-cleaner cleaner_non_existing_path.conf | ||
|
||
echo "done" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
set -exo pipefail | ||
|
||
REMOTE=$(cat remotehost) | ||
|
||
ssh "$REMOTE" mkdir -p /zfsmnt/ | ||
ssh "$REMOTE" apt install --yes zfsutils-linux | ||
|
||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk0 bs=1M count=128 | ||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk1 bs=1M count=128 | ||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk2 bs=1M count=128 | ||
|
||
ssh "$REMOTE" losetup /dev/loop10 /zfsmnt/disk0 | ||
ssh "$REMOTE" losetup /dev/loop11 /zfsmnt/disk1 | ||
ssh "$REMOTE" losetup /dev/loop12 /zfsmnt/disk2 | ||
|
||
ssh "$REMOTE" zpool create -f datastore0 raidz /dev/loop10 /dev/loop11 /dev/loop12 | ||
|
||
ssh "$REMOTE" zfs snapshot datastore0@0 | ||
ssh "$REMOTE" zfs snapshot datastore0@1 | ||
ssh "$REMOTE" zfs snapshot datastore0@2 | ||
|
||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk3 bs=1M count=128 | ||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk4 bs=1M count=128 | ||
|
||
ssh "$REMOTE" losetup /dev/loop13 /zfsmnt/disk3 | ||
ssh "$REMOTE" losetup /dev/loop14 /zfsmnt/disk4 | ||
|
||
ssh "$REMOTE" zpool create -f datastore1 raidz /dev/loop13 /dev/loop14 | ||
|
||
ssh "$REMOTE" zfs snapshot datastore1@0 | ||
ssh "$REMOTE" zfs snapshot datastore1@1 | ||
|
||
ssh "$REMOTE" bash -c "echo @1 > /root/1.protect" | ||
ssh "$REMOTE" bash -c "echo @1 > /root/2.protect" | ||
|
||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk5 bs=1M count=128 | ||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk6 bs=1M count=128 | ||
ssh "$REMOTE" dd if=/dev/zero of=/zfsmnt/disk7 bs=1M count=128 | ||
|
||
ssh "$REMOTE" losetup /dev/loop15 /zfsmnt/disk5 | ||
ssh "$REMOTE" losetup /dev/loop16 /zfsmnt/disk6 | ||
ssh "$REMOTE" losetup /dev/loop17 /zfsmnt/disk7 | ||
|
||
ssh "$REMOTE" zpool create -f datastore2 raidz /dev/loop15 /dev/loop16 /dev/loop17 |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.