Merge pull request #578 from nix-community/zpool_update

types zpool: create pool if device is a zfs_member
This commit is contained in:
lassulus 2024-03-21 14:28:25 +07:00 committed by GitHub
commit a8c966ee11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,6 +73,9 @@
elif (blkid "$dev" -o export | grep '^PTUUID='); then elif (blkid "$dev" -o export | grep '^PTUUID='); then
echo "device $dev already has a partuuid, skipping creating zpool ${config.name}" >&2 echo "device $dev already has a partuuid, skipping creating zpool ${config.name}" >&2
continue=0 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 elif (blkid "$dev" -o export | grep '^TYPE='); then
echo "device $dev already has a partition, skipping creating zpool ${config.name}" >&2 echo "device $dev already has a partition, skipping creating zpool ${config.name}" >&2
continue=0 continue=0