Skip to content

Instantly share code, notes, and snippets.

@dlangille
Last active October 9, 2020 10:03
Show Gist options
  • Select an option

  • Save dlangille/9aec0f3be43d08515a6a to your computer and use it in GitHub Desktop.

Select an option

Save dlangille/9aec0f3be43d08515a6a to your computer and use it in GitHub Desktop.
Doing a dry run of zfs destroy, and seeing what will be destroyed and how much space will be reclaimed
$ zfs destroy -nv system/usr/jails@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/pg93@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/mysql55@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/pg94@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/empty@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/toiler@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/pg90@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/ansible@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/snapshots@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/ansible-slave@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/mysql56@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/mtatest@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/mysql51@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/pg84@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/crey@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/ezjail_archives@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/basejail@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/minion2@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/pg92@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/hodor@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/dbclone.backups@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/cliff@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/pg91@BeforeUpgradingBaseJailFrom9.1To9.3
would destroy system/usr/jails/newjail@BeforeUpgradingBaseJailFrom9.1To9.3
would reclaim 392G
@allanjude

Copy link
Copy Markdown

Seems that would save you a lot of space.

Also, looks like you have some garble in the command:

should just be:
$ zfs destroy -rvn system/usr/jails@BeforeUpgradingBaseJailFrom9.1To9.3

@dlangille

Copy link
Copy Markdown
Author

Fixed the garble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment