addin to stripe pool of 2 disks the mirror with 1 disk

mikroob

Cadet
Joined
Jan 18, 2021
Messages
3
hi to all!
i'am pretty newbie for using zfs filesystem and i have an question.

can i add the third disk to my existing pool to create a mirror? i'm not shure but it probably should names it raidz1-0

what i have: 2tb*2 drives in one stripe pool, and one 4tb drive to mirror them. is it possible?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
If I understand your desire, you want to add vdevs to create a mirror of stripes:

Code:
        NAME                                              STATE     READ WRITE CKSUM
        tank                                              ONLINE       0     0     0
          mirror-0
            stripe-0                                      ONLINE       0     0     0
              gptid/6bf321d8-50f6-11eb-8ce2-d0509901339e  ONLINE       0     0     0
              gptid/47677991-5120-11eb-8ce2-d0509901339e  ONLINE       0     0     0
            stripe-1
              gptid/4a9155c5-5153-11eb-8ce2-d0509901339e  ONLINE       0     0     0


While ZFS will let you create this sort of pool from the command line, the GUI is much more limited. I also don't think you could expand your pool this way from the shell.

If your intention is to convert a stripe pool to a RAIDZ1 pool, this isn't possible, as pool topologies are immutable after creation. You'll need to destroy and rebuild your pool, and you'll only use 2TB of the 4TB drive.
 
Last edited:

mikroob

Cadet
Joined
Jan 18, 2021
Messages
3
yes i think that is what i needed!
what i must do to get these result?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
yes i think that is what i needed!
what i must do to get these result?

You'll have to destroy your pool and recreate it, with something like this:
Code:
zpool destroy tank
zpool create tank mirror sda sdb mirror sdc


Assuming sda and sdb are your 2TB disks, and sdc your 4TB disk. You'll have to reload the contents of your pool after this.

What might be safer is to create your 4TB disk as a separate pool, and then set up replication between the 2 pools.
 

mikroob

Cadet
Joined
Jan 18, 2021
Messages
3
the problem is - the desroing all current pools, a haven't enought spase to backup the data.
so are you recommend replication in that case?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
the problem is - the desroing all current pools, a haven't enought spase to backup the data.
so are you recommend replication in that case?

If you don't have a backup, replication is the safer option.
 
Top