Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Create zfs mirror by adding a drive?

Whitesnake

Newbie
Joined
Mar 12, 2021
Messages
2
I can confirm, that mirroring is possible in v12 with the GUI. I extended one HDD with another (which was larger, but doesn't matter).
 

MrMacintosh

Neophyte
Joined
Mar 23, 2021
Messages
5
I followed the tutorial of creating the partition so I can extend my 1 drive hdd into a 2 drive mirror, but I still ran into the following error: no such device in pool.

glabel status:
Code:
gptid/5fbe4e11-0688-11eb-8ce8-b42e99aa79e4     N/A  ada0p1
gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4     N/A  ada1p2
gptid/5fc4847b-0688-11eb-8ce8-b42e99aa79e4     N/A  ada0p3
gptid/4d75763c-8c49-11eb-881d-b42e99aa79e4     N/A  ada2p1
gptid/521b6dac-8c49-11eb-881d-b42e99aa79e4     N/A  ada2p2


zpool attach CorCollection gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4 gptid/521b6dac-8c49-11eb-881d-b42e99aa79e4
Code:
cannot attach gptid/521b6dac-8c49-11eb-881d-b42e99aa79e4 to gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4: no such device in pool
 

sretalla

Wizened Sage
Joined
Jan 1, 2016
Messages
3,922
I still ran into the following error: no such device in pool.
Could you share zpool status -v CorCollection ? we need to see the gptid of the disk that's already in the pool to understand if you did it the wrong way around or if it's something else.
 

MrMacintosh

Neophyte
Joined
Mar 23, 2021
Messages
5
Could you share zpool status -v CorCollection ? we need to see the gptid of the disk that's already in the pool to understand if you did it the wrong way around or if it's something else.
Code:
root@freenas[~]# zpool status -v CorCollection
  pool: CorCollection
 state: ONLINE
  scan: scrub repaired 0 in 0 days 02:24:14 with 0 errors on Sun Mar 14 03:24:14 2021
config:

        NAME                                              STATE     READ WRITE CKSUM
        CorCollection                                     ONLINE       0     0   0
          gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4.eli  ONLINE       0     0   0

errors: No known data errors
root@freenas[~]#
 

sretalla

Wizened Sage
Joined
Jan 1, 2016
Messages
3,922
gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4.eli
So there's your problem.. you're working with a GELI encrypted pool and trying to apply a process that doesn't take encryption into account.

I haven't done much with GELI encryption, so am no expert on it, but I could manage to find this, which seems to offer the steps:

As can be seen there in the commands for attaching the new disk, the gptid is specified including the .eli at the end.
 

MrMacintosh

Neophyte
Joined
Mar 23, 2021
Messages
5
So there's your problem.. you're working with a GELI encrypted pool and trying to apply a process that doesn't take encryption into account.

I haven't done much with GELI encryption, so am no expert on it, but I could manage to find this, which seems to offer the steps:

As can be seen there in the commands for attaching the new disk, the gptid is specified including the .eli at the end.
I followed it, but still attach failed. This time with a no Geom provider error.

When I look, I see that my new drive is not added to the geli status list


Code:
root@freenas[/data/geli]# geli init -s 4096 -B none -K /data/geli/[keyname].key gptid/521b6dac-8c49-11eb-881d-b42e99aa79e4
Enter new passphrase:
Reenter new passphrase:
root@freenas[/data/geli]# geli status
                                          Name  Status  Components
                                    ada1p1.eli  ACTIVE  ada1p1
gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4.eli  ACTIVE  gptid/4c653e93-06b6-11eb
 

MrMacintosh

Neophyte
Joined
Mar 23, 2021
Messages
5
Update: I used the new disk without the eli, since it didnt get encrypted, and it worked. Though I wonder if it's a bad idea to attach a non ecrypted mirror to an encrypted drive.

Code:
 pool: CorCollection
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Wed Mar 24 14:26:31 2021
        2.40G scanned at 117M/s, 632K issued at 30.1K/s, 491G total
        0 resilvered, 0.00% done, no estimated completion time
config:

        NAME                                                STATE     READ WRITE CKSUM
        CorCollection                                       ONLINE       0     0     0
          mirror-0                                          ONLINE       0     0     0
            gptid/4c653e93-06b6-11eb-802b-b42e99aa79e4.eli  ONLINE       0     0
            gptid/521b6dac-8c49-11eb-881d-b42e99aa79e4      ONLINE       0     0
 

sretalla

Wizened Sage
Joined
Jan 1, 2016
Messages
3,922
Though I wonder if it's a bad idea to attach a non ecrypted mirror to an encrypted drive.
Well, if you took the time to encrypt the first disk, you're probably not going to want to have an unencrypted copy sitting right next to it (which is what you now have).

ZFS will happily write to them both, so there's no problem from that perspective.
 

MrMacintosh

Neophyte
Joined
Mar 23, 2021
Messages
5
Well, if you took the time to encrypt the first disk, you're probably not going to want to have an unencrypted copy sitting right next to it (which is what you now have).

ZFS will happily write to them both, so there's no problem from that perspective.
I ended up detaching the disk and making it a new vdev. Since I'm just using them as a backup, I basically just backed up the data to an external hdd. Then I'm going to just use the two as a mirror for data and plex stuff. I realized that redundancy is not too important for me as much as just backups, so I don't really need a mirror.

This is making me rethink how I use my main computer and my server for the future. Lots of 1 to 2 TB hdds in my main computer holding junk, while I offload the important stuff to the NAS server. I'll probably use a new thread to discuss my dillemma.
 

RegularJoe

Senior Member
Joined
Aug 19, 2013
Messages
305
It is NOT clear at all what "Extend" means, when you have a single vdev stripe that would tell me that we are concatenating the chosen disk to the existing disk so that the stripe has 2 members and is larger. VMware does this and it adds an extent to your existing iSCSI/FC LUN.

I just mirrored a 128GB NVME with a 500GB NVME. I do not intend on keeping the 128 gig disk in so for me this was painless.

Next I have to figure out if I want to offline or detach the smaller 128GB NVME disk.
 
Top