Vdev mirroring and adding a disc went wrong

Hello,

I used to use my FreeNAS-11.3-RELEASE with an hardware-raid and 1 USB-key as boot-pool, now I managed to change the boot-pool to 2 mirrored SSD’s by installing FreeNAS on both without deleting the configuraton of my FreeNAS.

I had 2 identic 2TB WD red HDD’s on an hardware-raid.
Than, because a lot of ppl told me to not use the hardware-raid, I removed it and I got 1 of the HDD’s as the pool, like it was before.

Than I wanted to creade an mirror and I checked for some How-To Videos on YT, but the one I found and used, was only to add a disc to an existing (mirrored) pool. So what happend is that I added now the second disc (which should be the mirror of the first) as an extension of the first. So, yeah I f*cked up :frowning: Now instead of a mirrored 2TB pool I have a non mirrored 4TB pool…

So yeah, do I have the possibility now, to get back from 2 discs to 1, so that i can create and mirrored vdev and add the second as a mirror of the first?

Or do I have to delete the hole pool and begin from new with the 2 “blank” discs?

I hope someone can help me

greets
Roy

If there is enough room on the original 2-TiB HDD, you can “remove” the other single-drive stripe, which will evacuate any data on it and relocate it to the first drive.

The answer to your questions are, in short :

No
YES

You should have used a zpool attach …

But I see @winnielinnie is answering your post as I write this.

Is this really implemented now in OP zfs version?

It might not be in the GUI, but it is possible via the command-line with the zpool remove command.

@DL2ROY, If you want to see the name of the device to remove:

zpool status <poolname>
zpool list -v <poolname>

HMM, but the OP distinctly said a single vdev but not a mirror. Let’s see zpool status

You can remove a single-drive vdev (stripe) from a pool. Mirrors and stripes. It is RAIDZ vdevs that cannot be removed from a pool.

1 Like

Ok,
Thx for the answers.
Sounds good and not good.
We will see what is possible.

This is the boot-pool surely mirror
freenas-boot
mirror-0
da1p2
da0p2

this is the other:
nas
gptid/…
gptid/…

so it looks not mirrored, and of course the size in the pool section shows that it is the double and not mirrored.
I hope now, that it is possible… Space should be enough, the discs have both near 2TB and i have less than 450GB data.

But please be very specific with the commands, i’m not that good in IT and i don’t want to destroy it even more than it is…

Here is the disk section to see the names.
ada0 nas 1.82 TiB
ada1 nas 1.82 TiB
da1 Boot Pool 232.89 GiB

thx and greets
Roy

PS:
I tried to post pictures, but it says that it is not possible here, and FreeNAS don’t let’s me copy/paste from the ssh section.

Did you SSH into the server with Putty or the Windows built-in tool?

Did you mean “SSH”, when in fact it is the GUI’s “Shell”?


Without the full text (preferably formatted), that’s hard to do.

I mean the GUI Shell, with putty over ssh he don’t wants my root password, so it says it’s wrong but it’s the one i use for root in the GUI, that’s why i can’t login over putty…

Just tell me what you need, i’ll try whatever you say me :slight_smile:

i managed now to login via putty…

root@freenas[~]# zpool status
pool: freenas-boot
state: ONLINE
scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    freenas-boot  ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        da1p2   ONLINE       0     0     0
        da0p2   ONLINE       0     0     0

errors: No known data errors

pool: nas
state: ONLINE
scan: scrub repaired 0 in 0 days 02:00:20 with 0 errors on Sun Dec 15 02:00:20 2024
config:

    NAME                                          STATE     READ WRITE CKSUM
    nas                                           ONLINE       0     0     0
      gptid/d9893e93-5657-11ea-8c2c-94de8073836e  ONLINE       0     0     0
      gptid/81a0fa36-c75d-11ef-ab86-94de8073836e  ONLINE       0     0     0

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

What about zpool list -v nas

root@freenas[~]# zpool list -v nas
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
nas 3.62T 428G 3.21T - - 0% 11% 1.00x ONLINE /mnt
gptid/d9893e93-5657-11ea-8c2c-94de8073836e 1.81T 428G 1.39T - - 0% 23%
gptid/81a0fa36-c75d-11ef-ab86-94de8073836e 1.81T 8.54M 1.81T - - 0% 0%
root@freenas[~]#

It looks like the device you want to remove is:
gptid/81a0fa36-c75d-11ef-ab86-94de8073836e

That means in the command-line you can issue:

zpool remove nas gptid/81a0fa36-c75d-11ef-ab86-94de8073836e

It will “evacuate” the data to the other device. Since it’s only a few MiB, it should finish quickly.

After you confirm it is finished (with zpool list -v nas, you can then proceed to attach the drive to the other drive, to make it a 2-way mirror. This can be done in the GUI.

OK, looks good now, it’s again 1.82TiB in total and the second one is unused.
thx a lot for that :slight_smile:

How should i continue now to create the mirror vdev and mirror the first on the second?

In the GUI, go to Pools → locate your pool → click the cogwheel → Status → use the “Extend” option on the existing single-drive device to upgrade it to a 2-way mirror.

I think it’s worded “Extend”? I forget.

Scratch that. It become a feature in the GUI for TrueNAS Core 12. Not available in 11.3.

You’ll have to use the command-line:

zpool attach -s nas gptid/d9893e93-5657-11ea-8c2c-94de8073836e gptid/81a0fa36-c75d-11ef-ab86-94de8073836e

What did you mean by this…? Did you start from scratch with a brand new pool and copy the data over to it?

Are you still using the “hardware RAID” device? :flushed:

Do you have a backup of everything?

sry for the delay, my wife came home…

so, no. the hardware rais is no longer in the system…
and your command seemed to work fine

root@freenas[~]# zpool list -v nas
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
nas 1.81T 428G 1.39T - - 0% 23% 1.00x ONLINE /mnt
mirror 1.81T 428G 1.39T - - 0% 23%
gptid/d9893e93-5657-11ea-8c2c-94de8073836e - - - - - - -
gptid/81a0fa36-c75d-11ef-ab86-94de8073836e - - - - - - -
root@freenas[~]#

very much thx for this :slight_smile:

now i only have to figure out, how to get it accesible from outside, so that i can access it with my laptop when i’m not at home…

@winnielinnie In my defence, I was thinking of Linuxland where you still end of up with this under zfs 2.2.6 after a zpool remove:

root@debvm:~# zpool list -v  npool
NAME                                           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
npool                                         9.50G   278K  9.50G        -         -     0%     0%  1.00x    ONLINE  -
  scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-0-0-4  9.99G   278K  9.50G        -         -     0%  0.00%      -    ONLINE
  indirect-1

Something to avoid.

Hello again,

After upgrading to TrueNAS-13.0-U6.6
my nas is still mirrored, but now my boot is no longer mirrored.
So actually i only have 1 ssd fir the boot-pool…

that’s so annoying :frowning:

and i only upgraded because i have a lot of permission problems with the users and everyone was talking about that i have to upgrade…

what could i check first now?
how can i see if the second ssd is alive, maybe it’s broken and that’s why it don’t work actually?