Skip to content

Instantly share code, notes, and snippets.

@ilovezfs
Created May 2, 2021 15:34
Show Gist options
  • Save ilovezfs/92978595c91e28dce0090a5484988cb5 to your computer and use it in GitHub Desktop.
Save ilovezfs/92978595c91e28dce0090a5484988cb5 to your computer and use it in GitHub Desktop.
#!/bin/bash -x
sw_vers
zpool version
NUMSECTORS=1280000
mydev=`hdiutil attach -nomount ram://$NUMSECTORS`
sudo zpool create foo $mydev
sudo zfs snapshot foo@s1
sudo zfs create foo/bar
sudo zfs rollback foo@s1
sudo zfs unmount foo/bar
sudo zfs unmount -f foo/bar
sudo zfs unmount foo
sudo zfs unmount -f foo
sudo umount -f /Volumes/foo/bar
sudo umount -f /Volumes/foo
sudo zfs mount -a
sudo zpool export foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment