*New 12.1 series Release:
2020-09-13: XigmaNAS 12.1.0.4.7743 - released

*New 11.4 series Release:
2020-09-12: XigmaNAS 11.4.0.4.7741 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

upgrade a 2 disk mirror to 3 disk raidz?

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
disaster
Starter
Starter
Posts: 31
Joined: 18 Apr 2014 10:16
Location: Italy
Status: Offline

upgrade a 2 disk mirror to 3 disk raidz?

#1

Post by disaster »

Hi,
I've been happily running my Nas4Free system on a ZFS mirrored setup with 2*3TB WD RED, now the space is almost finished and I was wondering if I could add a third disk and migrare the mirror to a raidz with 1 disk parity (to that I would get 6TB usable out of 3*3TB disks right?)
Is this possible or do I have to backup my data to an external drive, restart from scratch and then move back all my data?

Will I be able to add a fourth disk to the raidz in the future? (so 3 + 1 parity) Or will I have to start from scratch again?

thanks a lot and best regards

User avatar
ms49434
Developer
Developer
Posts: 994
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#2

Post by ms49434 »

- ZFS doesn't have an in-built online or offline RAID-level conversion tool.
- You should always have a backup of your data.

There are several options available to increase the capacity of your pool:

a) [1 new drive, capacity 2x drives]: Create a new pool, restore from backup:
make a backup of your pool, destroy your pool, create a RAIDZ1 from 3 drives and restore your data. If your backup is faulty you might loose all your data - have 2 backups instead. You need to redo the configuration of datasets, volumes, shares etc...

b) [2 new drives, capacity = 1x old drive plus 1x new drive] Expand your pool with another mirrored vdev:
buy another 2 drives, create a mirrored virtual device and add it to your existing pool. This is the easiest option because you don't need to move or copy your existing data and your datasets/volume configuration remains the same.

c) [2 new drives, capacity = 1x new drive] Replace existing drives with higher capacity drives:
Buy 2 larger drives and attach them to your existing mirror (4-way mirror). Wait until syncronisation is completed, then detach both old drives. Issue a command to expand the capacity of your pool. This option is easy to perform as well, there's no need to move or copy your existing data and your datasets/volume configuration remains the same.

and the expert options:
d) [1 new drive, capacity = 2x drives]: Create a new pool, restore from existing pool:
Break your mirror, create a RAIDZ1 containing your new drive, the detached drive from the mirror and a fake drive. Do the basic configuration, then copy the data from your broken but still working original pool via ZFS snapshort and ZFS send/receive. Once finished you destroy your original pool, the remaining drive will be used to replace the fake drive. Issue a command to expand the capacity of your pool.

e) [2 new drives, capacity = 3x drives]: Create a new pool, restore from existing pool:
Break your mirror, create a RAIDZ1 containing your 2 new drives, the detached drive from the mirror and a fake drive. Do the basic configuration, then copy the data from your broken but still working original pool via ZFS snapshort and ZFS send/receive. Once finished you destroy your original pool, the remaining drive will be used to replace the fake drive. Issue a command to expand the capacity of your pool.
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

disaster
Starter
Starter
Posts: 31
Joined: 18 Apr 2014 10:16
Location: Italy
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#3

Post by disaster »

Thanks a lot, it's very clear.
I thinkd I'll go with 2 new mirrored drives :-D

C.C. Chan
Starter
Starter
Posts: 38
Joined: 21 Nov 2013 05:04
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#4

Post by C.C. Chan »

ms49434 wrote:
15 Oct 2017 16:00
- ZFS doesn't have an in-built online or offline RAID-level conversion tool.
- You should always have a backup of your data.

There are several options available to increase the capacity of your pool:

a) [1 new drive, capacity 2x drives]: Create a new pool, restore from backup:
make a backup of your pool, destroy your pool, create a RAIDZ1 from 3 drives and restore your data. If your backup is faulty you might loose all your data - have 2 backups instead. You need to redo the configuration of datasets, volumes, shares etc...

b) [2 new drives, capacity = 1x old drive plus 1x new drive] Expand your pool with another mirrored vdev:
buy another 2 drives, create a mirrored virtual device and add it to your existing pool. This is the easiest option because you don't need to move or copy your existing data and your datasets/volume configuration remains the same.

c) [2 new drives, capacity = 1x new drive] Replace existing drives with higher capacity drives:
Buy 2 larger drives and attach them to your existing mirror (4-way mirror). Wait until syncronisation is completed, then detach both old drives. Issue a command to expand the capacity of your pool. This option is easy to perform as well, there's no need to move or copy your existing data and your datasets/volume configuration remains the same.

and the expert options:
d) [1 new drive, capacity = 2x drives]: Create a new pool, restore from existing pool:
Break your mirror, create a RAIDZ1 containing your new drive, the detached drive from the mirror and a fake drive. Do the basic configuration, then copy the data from your broken but still working original pool via ZFS snapshort and ZFS send/receive. Once finished you destroy your original pool, the remaining drive will be used to replace the fake drive. Issue a command to expand the capacity of your pool.

e) [2 new drives, capacity = 3x drives]: Create a new pool, restore from existing pool:
Break your mirror, create a RAIDZ1 containing your 2 new drives, the detached drive from the mirror and a fake drive. Do the basic configuration, then copy the data from your broken but still working original pool via ZFS snapshort and ZFS send/receive. Once finished you destroy your original pool, the remaining drive will be used to replace the fake drive. Issue a command to expand the capacity of your pool.

Dear Sir,
For your methord d&e, How to get a fake drive into the setup? why need a command to expend the pool capacity on the last step of the process? And what is the command?

Thanks!
NAS1: NAS4Free 10.3.0.3 - Pilingitam (revision 4107) / x86-full on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / Shuttle Inc FB61V30 / 2G RAM / 2T x 2 zfs mirror
NAS2: NAS4Free 9.1.0.1 - Sandstorm (revision 847) / x64-embedded on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / ASUS P5P800-MX / 2G RAM / 2T x 3 zfs raidz
NAS3: NAS4Free 11.2.0.4 - Omnius (revision 6400)/ x64-full on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / ASUS P5P800-MX / 3G RAM / 1T x 4 zfs raidz

User avatar
ms49434
Developer
Developer
Posts: 994
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#5

Post by ms49434 »

C.C. Chan wrote:
14 Jun 2018 13:22

Dear Sir,
For your methord d&e, How to get a fake drive into the setup? why need a command to expend the pool capacity on the last step of the process? And what is the command?

Thanks!
This article might help you: [Howto] Create a degraded RAIDZ2

Resizing is done by performing Disks > ZFS > Pools > Tools, "Bring a device online" with option "Expand device to use all available space." checked for each disk.
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

C.C. Chan
Starter
Starter
Posts: 38
Joined: 21 Nov 2013 05:04
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#6

Post by C.C. Chan »

Thanks for your reply. But the link for your referred is not available. Please resend.
NAS1: NAS4Free 10.3.0.3 - Pilingitam (revision 4107) / x86-full on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / Shuttle Inc FB61V30 / 2G RAM / 2T x 2 zfs mirror
NAS2: NAS4Free 9.1.0.1 - Sandstorm (revision 847) / x64-embedded on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / ASUS P5P800-MX / 2G RAM / 2T x 3 zfs raidz
NAS3: NAS4Free 11.2.0.4 - Omnius (revision 6400)/ x64-full on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / ASUS P5P800-MX / 3G RAM / 1T x 4 zfs raidz

User avatar
ms49434
Developer
Developer
Posts: 994
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#7

Post by ms49434 »

C.C. Chan wrote:
16 Jun 2018 07:15
Thanks for your reply. But the link for your referred is not available. Please resend.
link has been updated
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

C.C. Chan
Starter
Starter
Posts: 38
Joined: 21 Nov 2013 05:04
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#8

Post by C.C. Chan »

Thanks. I will follow the post if i really need to do that.
NAS1: NAS4Free 10.3.0.3 - Pilingitam (revision 4107) / x86-full on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / Shuttle Inc FB61V30 / 2G RAM / 2T x 2 zfs mirror
NAS2: NAS4Free 9.1.0.1 - Sandstorm (revision 847) / x64-embedded on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / ASUS P5P800-MX / 2G RAM / 2T x 3 zfs raidz
NAS3: NAS4Free 11.2.0.4 - Omnius (revision 6400)/ x64-full on Intel(R) Pentium(R) 4 CPU @ 3.00GHz / ASUS P5P800-MX / 3G RAM / 1T x 4 zfs raidz

Shperrung
experienced User
experienced User
Posts: 149
Joined: 04 Apr 2018 16:29
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#9

Post by Shperrung »

Dear developers and experienced users!
I'm joining to this question and I would to know ho do I move my existing pool from mirrored vdev (2*1Tb) to RAIDZ1 (3*4Tb)?
Motherboard has 4 SATA ports:
2 ports are used by existing "mirror"
1 ports is used by stripe (1*2Tb)
1 port is free
My system is RootOnZFS installed on 2 mirrored SSDs attached to M.2 -> 2 SATA controller.
Overall I have 6 SATA ports.
My question is slightly different because I don't need to growth/extend my pool. I need to move all data form 2HDDS to another 3HDDs with another type of RAID. As I read before RAID1 cannot be reorganized to RAIDZ1 without pool destroy.

ZFS snapshort and ZFS send/receive. - please describe this process in samples of commands

Upd.: Is this right command:

Code: Select all

# zfs send tank/data@snap1 | zfs recv spool/ds01
?
ASRock J3710-ITX, 16Gb RAM; RAID-Z 4Tx3HDD, 2T Stripe; UPS
Debian+OMV+ZFS

cookiemonster
Advanced User
Advanced User
Posts: 329
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#10

Post by cookiemonster »

It looks to me the difficulty with the zfs send approach is that the both sending and receiving zfs pools need to exist in the first place, i.e you need to have the disks installed at source and destination. Therefore in your desired configuration you need 5 ports available: 2 for the existing mirror and 3 for the new raidz array.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

Shperrung
experienced User
experienced User
Posts: 149
Joined: 04 Apr 2018 16:29
Status: Offline

Re: upgrade a 2 disk mirror to 3 disk raidz?

#11

Post by Shperrung »

My situation is complicated by a need to keep the same pool's name because there are installed all extensions and I don't want to reinstall them.
I thought about creating "service" Embeeded Xigmanas install for this mission with default settings to avoid errors in extensions and add-ons.
1. Before Embeeded Xigmanas install I'll detach 2 SSDs with current system and 2 Tb stripe with unnecessary data. Therefore I get 4 free SATA ports for new HDDs and source vdev on mirrored HDDs.
Export "source"pool. Power off NAS
2. Install fresh Embeeded Xigmanas. Import source pool on RAID1. Create RAIDZ1 on new HDDs. Create "newpool" pool and check that it is online. Pool's name has to be unique. It can be renamed later.
Create recursive snapshot of source pool

Code: Select all

zfs snapshot -r RAID@snap
3. ZFS send/receive.

Code: Select all

zfs send -R RAID@snap | zfs receive -vFd newpool
Waiting until snapshot is copied. You can see it on web-gui page Disks > ZFS > Pools > Management in Alloc column.
4. Export all pools.
5. Turn off NAS. Remove HDDs with mirror (old).
6. Turn on NAS. Import new pool on RAID-Z1 (3 new HDDs) with renaming:

Code: Select all

zpool import -f newpool RAID
7. Remove snapshots
zfs destroy -r RAID@snap
Export pool. Turn off NAS. Return back main RootOnZFS installation. Turn it on. Import new pool.
ASRock J3710-ITX, 16Gb RAM; RAID-Z 4Tx3HDD, 2T Stripe; UPS
Debian+OMV+ZFS

Post Reply

Return to “ZFS (only!)”