Advertisement
Guest User

Shane - ZFS Deletion

a guest
May 10th, 2016
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. G'day Guys,
  2.  
  3. In episode 139 you had a couple of questions I thought I would respond to.
  4.  
  5. For John - Destroying zfs datasets
  6.  
  7. While Allen's suggestion of keeping everything under a parent dataset
  8. is a good idea, you may not always want to destroy every child set.
  9.  
  10. For an example take the poudriere layout, say I have
  11. /usr/local/poudriere/jails/101amd64
  12. /usr/local/poudriere/jails/101i386
  13. /usr/local/poudriere/jails/102amd64
  14. /usr/local/poudriere/jails/102i386
  15. /usr/local/poudriere/jails/103amd64
  16. /usr/local/poudriere/jails/103i386
  17.  
  18. and I want to get rid of all the 10.1 and 10.2 filesystems - destroying
  19. poudriere/jails will also destroy the 10.3 filesystems I want to keep.
  20.  
  21. To handle this situation I would use -
  22.  
  23. zfs list -o name | awk '/poudriere/ && (/101/ || /102/)' | xargs -L1 zfs destroy -R
  24.  
  25. For Thomas - question 2 - missing port messages
  26.  
  27. You can get the message of an installed port with
  28. pkg info -D security/tor
  29. or
  30. pkg info -D tor-0.2.7.6_1
  31. Which can be expanded to go through all installed ports messages with
  32.  
  33. pkg info -qa | xargs pkg info -D | more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement