Skip to content

Commit

Permalink
Don't consider unmounted datasets, this is especially important with BE
Browse files Browse the repository at this point in the history
  • Loading branch information
bdrewery committed May 3, 2014
1 parent 24d02f9 commit 3628f79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/zfstools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def filter_datasets(datasets, included_excluded_datasets, property)
all_datasets = included_excluded_datasets['included'] + included_excluded_datasets['excluded']

datasets.each do |dataset|
# Skip unmounted datasets
next if dataset.properties['mounted'] == 'no'
# If the dataset is already included/excluded, skip it (for override checking)
next if all_datasets.include? dataset
value = dataset.properties[property]
Expand All @@ -123,6 +125,7 @@ def find_eligible_datasets(interval, pool)
properties = [
"#{snapshot_property}:#{interval}",
snapshot_property,
'mounted',
]
datasets = Zfs::Dataset.list(pool, properties)

Expand Down

0 comments on commit 3628f79

Please sign in to comment.