Skip to content

Commit

Permalink
Merge pull request #578 from nix-community/zpool_update
Browse files Browse the repository at this point in the history
types zpool: create pool if device is a zfs_member
  • Loading branch information
Lassulus authored Mar 21, 2024
2 parents 1efdc66 + f6f2e00 commit a8c966e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/types/zpool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
elif (blkid "$dev" -o export | grep '^PTUUID='); then
echo "device $dev already has a partuuid, skipping creating zpool ${config.name}" >&2
continue=0
elif (blkid "$dev" -o export | grep '^TYPE=zfs_member'); then
# zfs_member is a zfs partition, so we try to add the device to the pool
:
elif (blkid "$dev" -o export | grep '^TYPE='); then
echo "device $dev already has a partition, skipping creating zpool ${config.name}" >&2
continue=0
Expand Down

0 comments on commit a8c966e

Please sign in to comment.