mmatuska / mfsbsd

mfsBSD
http://mfsbsd.vx.sk
BSD 2-Clause "Simplified" License
494 stars 137 forks source link

zfsinstall silently ignores multiple '-r mirror' arguments #133

Closed s1dh closed 2 years ago

s1dh commented 2 years ago

When I run this command : zfsinstall -d vtbd0 -d vtbd1 -r mirror -d vtbd2 -d vtbd3 -r mirror -z 5G -s 2G -p zroot -A

The installation performed flawessy without warnings , but once rebooted zpool status shows :

root@:~ # zpool status
  pool: zroot
 state: ONLINE
config:

    NAME         STATE     READ WRITE CKSUM
    zroot        ONLINE       0     0     0
      mirror-0   ONLINE       0     0     0
        vtbd0p3  ONLINE       0     0     0
        vtbd1p3  ONLINE       0     0     0
        vtbd2p3  ONLINE       0     0     0
        vtbd3p3  ONLINE       0     0     0

errors: No known data errors

whereas we could expect a raid-10 like layout :

root@:~ # zpool status
  pool: zroot
 state: ONLINE
config:

    NAME         STATE     READ WRITE CKSUM
    zroot        ONLINE       0     0     0
      mirror-0   ONLINE       0     0     0
        vtbd0p3  ONLINE       0     0     0
        vtbd1p3  ONLINE       0     0     0
      mirror-1   ONLINE       0     0     0
        vtbd2p3  ONLINE       0     0     0
        vtbd3p3  ONLINE       0     0     0

errors: No known data errors

Of course making zfsinstall able to deal with multiple mirrored vdevs could be great, but if it can not, it could be handy to be warned of the non recognition of multiple -r mirror arguments .