zfs oneliners

  • remove all snapshots
    zfs list -H -o name -t snapshot | xargs -n1 zfs destroy

  • list all snapshots
    zfs list -t snapshot

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

2 Responses to zfs oneliners

  1. rpetrenko says:

    * view disk metadata
    zdb -l /dev/rdsk/c0t0d0s0

  2. Allan Jude says:

    You can delete a range of snapshots more quickly, and more safely with: zfs destroy -v dataset@firstsnap%lastsnap

    It will destroy those snapshots and every snapshot in between

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s