zpool create has implied "-f" ??

All your general support questions for OpenZFS on OS X.

zpool create has implied "-f" ??

Postby haer22 » Thu Apr 20, 2017 11:51 pm

I got this when I tried to re-create my pool. I expected to get complaints that the disk belonged to another pool (gaia). But I like to test things before comitting.
Code: Select all
[ihecc:~] root# zpool create -o ashift=12 -o failmode=continue -O atime=off -O compression=lz4 -O canmount=noauto -O casesensitivity=insensitive -O normalization=formD -O checksum=edonr -O mountpoint=/Volumes/g2 g2 raidz2 disk12 disk13 disk14 disk15 disk16
invalid vdev specification
use '-f' to override the following errors:
/dev/disk12s1 is part of exported or potentially active ZFS pool gaia. Please see zpool(1M).
/dev/disk13s1 is part of exported or potentially active ZFS pool gaia. Please see zpool(1M).
/dev/disk14s1 is part of exported or potentially active ZFS pool gaia. Please see zpool(1M).
/dev/disk15s1 is part of exported or potentially active ZFS pool gaia. Please see zpool(1M).
/dev/disk16s1 is part of exported or potentially active ZFS pool gaia. Please see zpool(1M).
[ihecc:~] root# zpool list
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
g2    36,2T  10,6M  36,2T         -     0%     0%  1.00x  ONLINE  -
zeus  25,2T  12,6T  12,6T         -    29%    49%  1.00x  ONLINE  -
[ihecc:~] root#

See, it did complain and said "use '-f' to override. BUT, zpool still created the pool g2 !
That is a bit dangerous and a change of behaviour with the latest version.
When I tried to add a log device, "zpool add" complained as well, but did not add the log device. Which is as expected.
Code: Select all
[ihecc:~] root# zpool add g2 log media-931B9542-FFEE-4805-A21E-3C5E836730FC
invalid vdev specification
use '-f' to override the following errors:
/private/var/run/disk/by-id/media-931B9542-FFEE-4805-A21E-3C5E836730FC is part of exported or potentially active ZFS pool gaia. Please see zpool(1M).
[ihecc:~] root# zpool add -f g2 log media-931B9542-FFEE-4805-A21E-3C5E836730FC
[ihecc:~] root#

So what happened to zpool create in the last version?
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am

Re: zpool create has implied "-f" ??

Postby Brendon » Fri Apr 21, 2017 1:16 pm

The last version didn't check at all! I've not seen it do this, but will check somthing similar myself today.

Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: zpool create has implied "-f" ??

Postby Brendon » Fri Apr 21, 2017 3:16 pm

Thats unfortunate, it is definitely doing the create regardless.

I'll look into it (https://github.com/openzfsonosx/zfs/issues/568)

Cheers
Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 23 guests