Replacing a 2TB single hdd pool by attaching a 8TB drive to create a mirror and then replacing the small 2TB with a 2nd 8TB drive

floogy

Dabbler
Joined
Oct 24, 2012
Messages
22
Hi,

I currently run a 2TB single disk pool and want to replace it with a two 8TB mirror.

Code:
        NAME                                          STATE     READ WRITE CKSUM
        pool1                                         ONLINE       0     0     0
          gptid/b7b60347-2077-11e2-942a-009c02975d54  ONLINE       0     0     0


I want to replace the 2TB single hdd pool 'pool1' by attaching a 8TB drive, to create a mirror 'pool1', and then replacing the small 2TB with a 2nd 8TB drive, and resilvering.

Would this scenario work?

Unfortunately I couldn't find a way to do it in the webgui. I even cannot create a single disk pool from the recognized 8TB WD EDAZ hdd. Is that as expected?

I found this thread similar https://www.truenas.com/community/t...-larger-disks-mirrored-how.82328/#post-569827

to extend a ZFS mirror, add the same number of drives. The result is a striped mirror. For example, if ten new drives are available, a mirror of two drives could be created initially, then extended by adding another mirror of two drives, and repeating three more times until all ten drives have been added.
https://www.ixsystems.com/documentation/freenas/11.3-U5/storage.html#extending-a-pool

Maybe the single disk pool 'pool1' is a stripe pool, and therefor I'm no able to add a mirror disk to expand it into a mirror?
But why I'm not able to create an 8TB single drive pool at all in the webgui?

I'm using FreeNAS 11.3-U5 on a HP microserver N40L. I attached 5 Disks (one on the ATAPI/SATA connector for an optical drive or tape drive) and got a mirrored UltraFit pendrive rpool.

Would upgrading to TrueNAS 12 help with the pool management in the webgui? I read a lot of hassle regarding upgrading the FreeNAS to TrueNAS e.g. with smb and root access etc.
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Would upgrading to TrueNAS 12 help with the pool management in the webgui?
Creating a mirror from a single disk VDEV is possible in 12 but was not possible in 11.3, so I guess that's a clear "yes".
 

floogy

Dabbler
Joined
Oct 24, 2012
Messages
22
Hm, I'm afraid, that I'll be one of the people that will be hit by the upgrade process.

What Do you say regarding the overall process, that I described above? Would it be a plan that lead into success and results in a 8TB mirror pool by retaining all data?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Hm, I'm afraid, that I'll be one of the people that will be hit by the upgrade process.
You can wait for the U1 which is due in a couple of weeks if you're worried about the known issues with 12.0.

Mirror 2+8 - fine.
Detach 2 from the mirror - also fine, pool now becomes 8TB in size. You have the 2TB to fall back on if there's a problem.
Attach new 8 to make 8+8 - no problem, now you have redundancy (and can safely throw away the 2TB disk... or re-use it for something else).
 

floogy

Dabbler
Joined
Oct 24, 2012
Messages
22
I upgraded successfully to TrueNAS Core 12-RELEASE. Initially there appeared a disfunctional FreeNAS webui. I Restarted again the Microserver and it appeared again the faulty webui. I then pressed F4, respectively CRTL+R to reload the Page in Firefox 83 under Windows 10 and the functional WebGUI of TruNAS Core appeared finally, so I guess it was a browser cache issue.

Also the SMB shares are fully functional.

Unfortunately I didn't find the switch to attach the 8TB drive to the 2TB drive. I already did an zpool upgrade on all three pools including the boot pool (freenas-boot). There are options like 'expand' or 'add vdev'. Expand might be the autoexpand feature of ZFS and it didn't worked and gave the error middlewared.service_exception.CallError: [EFAULT] Command gpart resize -a 4k -i 2 ada4 failed (code 1): gpart: autofill: No space left on device, which is true. It got 99% used, but it's working flawlessy, despite the warning, that over 80% usage isn't recomended at all. I think this is fine and simply the wrong option for my task.

Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 361, in run
    await self.future
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 397, in __run_body
    rv = await self.method(*([self] + args))
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool_/expand.py", line 97, in expand
    await self._resize_disk(part_data, pool['encrypt'], geli_resize)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool_/expand.py", line 132, in _resize_disk
    await run('gpart', 'resize', '-a', '4k', '-i', str(partition_number), part_data['disk'])
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/__init__.py", line 62, in run
    cp.check_returncode()
  File "/usr/local/lib/python3.8/subprocess.py", line 444, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '('gpart', 'resize', '-a', '4k', '-i', '2', 'ada4')' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 365, in run
    raise handled
middlewared.service_exception.CallError: [EFAULT] Command gpart resize -a 4k -i 2 ada4 failed (code 1):
gpart: autofill: No space left on device



But, when using 'add vdev' It's unfortunately not offering something like 'attach and create mirror', but only 'stripe'. I'm afraid, that this will create a stripe, and I think I have to attach the 8TB drive better on the command line, right?

I'm wondering, if I'll do it on the command line, will the TrueNAS and webGUI recognize the mirror afterwards?

Do I have to export or disconnect the pool1 in order to attach the 8gig drive to the 2GB single-drive/vdev to create a mirror while retaining all data?


Code:
root@FAMP:~ # gpart list ada0
Geom name: ada0
modified: false
state: CORRUPT
fwheads: 16
fwsectors: 63
last: 15628052446
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
   Mediasize: 8001560772608 (7.3T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   efimedia: HD(1,GPT,bae3fd87-cef6-44ec-b067-9eb59fa896f5,0x800,0x3a3811800)
   rawuuid: bae3fd87-cef6-44ec-b067-9eb59fa896f5
   rawtype: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
   label: My Book
   length: 8001560772608
   offset: 1048576
   type: ms-basic-data
   index: 1
   end: 15628050431
   start: 2048
Consumers:
1. Name: ada0
   Mediasize: 8001563222016 (7.3T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0

root@FAMP:~ # gpart list ada4
Geom name: ada4
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada4p1
   Mediasize: 2147483648 (2.0G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e1
   efimedia: HD(1,GPT,b7923aca-2077-11e2-942a-009c02975d54,0x80,0x400000)
   rawuuid: b7923aca-2077-11e2-942a-009c02975d54
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 2147483648
   offset: 65536
   type: freebsd-swap
   index: 1
   end: 4194431
   start: 128
2. Name: ada4p2
   Mediasize: 1998251367936 (1.8T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 2147549184
   Mode: r1w1e2
   efimedia: HD(2,GPT,b7b60347-2077-11e2-942a-009c02975d54,0x400080,0xe8a0880f)
   rawuuid: b7b60347-2077-11e2-942a-009c02975d54
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 1998251367936
   offset: 2147549184
   type: freebsd-zfs
   index: 2
   end: 3907029134
   start: 4194432
Consumers:
1. Name: ada4
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Mode: r2w2e5


Code:
root@floogy:~ # smartctl -i /dev/ada0 | grep ^Serial
Serial Number:    VGH2WNSG
root@floogy:~ # smartctl -i /dev/ada4 | grep ^Serial
Serial Number:    MN5210FA18ANYK
root@floogy:~ # glabel status
                                      Name  Status  Components
                             gpt/My%20Book     N/A  ada0p1
gptid/bae3fd87-cef6-44ec-b067-9eb59fa896f5     N/A  ada0p1
gptid/e7d789f4-d38f-11e2-8be6-009c02975d54     N/A  ada1p2
gptid/e85b8618-d38f-11e2-8be6-009c02975d54     N/A  ada2p2
gptid/e8c82e62-d38f-11e2-8be6-009c02975d54     N/A  ada3p2
gptid/b7b60347-2077-11e2-942a-009c02975d54     N/A  ada4p2
gptid/7c144084-2c3c-11eb-bf43-009c02975d54     N/A  da0p1
gptid/f0d04058-2c37-11eb-bf43-009c02975d54     N/A  da1p1
root@floogy:~ # camcontrol devlist
<WDC WD80EDAZ-11TA3A0 81.00A81>    at scbus0 target 0 lun 0 (pass0,ada0)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus1 target 0 lun 0 (pass1,ada1)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus2 target 0 lun 0 (pass2,ada2)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus3 target 0 lun 0 (pass3,ada3)
<Hitachi HDS723020BLA642 MN6OAA10>  at scbus4 target 1 lun 0 (pass4,ada4)
<SanDisk Ultra Fit 1.00>           at scbus7 target 0 lun 0 (pass5,da0)
<SanDisk Ultra Fit 1.00>           at scbus8 target 0 lun 0 (pass6,da1)
root@floogy:~ # freebsd-version
12.2-RC3
root@floogy:~ # zpool list
NAME           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
datapool      8.12T  3.01T  5.12T        -         -     5%    37%  1.00x    ONLINE  /mnt
freenas-boot  28.5G  7.84G  20.7G        -         -     5%    27%  1.00x    ONLINE  -
pool1         1.81T  1.76T  58.4G        -         -    58%    96%  1.00x    ONLINE  /mnt
root@floogy:~ # zpool status
  pool: datapool
state: ONLINE
  scan: scrub repaired 0B in 12:39:01 with 0 errors on Sun Nov  8 12:39:04 2020
config:

        NAME                                            STATE     READ WRITE CKSUM
        datapool                                        ONLINE       0     0     0
          raidz1-0                                      ONLINE       0     0     0
            gptid/e7d789f4-d38f-11e2-8be6-009c02975d54  ONLINE       0     0     0
            gptid/e85b8618-d38f-11e2-8be6-009c02975d54  ONLINE       0     0     0
            gptid/e8c82e62-d38f-11e2-8be6-009c02975d54  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
state: ONLINE
  scan: scrub repaired 0B in 00:06:00 with 0 errors on Mon Nov 23 03:51:01 2020
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: pool1
state: ONLINE
  scan: scrub repaired 0B in 1 days 03:01:26 with 0 errors on Mon Nov  2 03:01:27 2020
config:

        NAME                                          STATE     READ WRITE CKSUM
        pool1                                         ONLINE       0     0     0
          gptid/b7b60347-2077-11e2-942a-009c02975d54  ONLINE       0     0     0

errors: No known data errors
 
Last edited:
Top