zfs-verify stuff

This commit is contained in:
Edwin Eefting
2022-01-18 20:54:19 +01:00
parent 6791bc4abd
commit 86d504722c
5 changed files with 85 additions and 1 deletions

View File

@ -46,7 +46,8 @@ class ZfsAutoverify(ZfsAuto):
target_name = self.make_target_name(source_dataset)
target_dataset = ZfsDataset(target_node, target_name)
XXX
if source_dataset.properties['type']=="filesystem":
print("JOOO")
except Exception as e:
fail_count = fail_count + 1

View File

@ -1103,3 +1103,21 @@ class ZfsDataset:
resume_token = None
source_snapshot = self.find_next_snapshot(source_snapshot, also_other_snapshots)
def mount(self, mount_point):
cmd = [
"mount", "-t zfs", "-o zfsutil", self.name, mount_point
]
self.debug("Mounting to {}".format(mount_point))
self.zfs_node.run(cmd=cmd, valid_exitcodes=[0])
def unmount(self):
cmd = [
"umount", self.name
]
self.debug("Unmounting")
self.zfs_node.run(cmd=cmd, valid_exitcodes=[0])