This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Create ZFS with single disk, add second after for mirroring.

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
icoleman.uk
NewUser
NewUser
Posts: 6
Joined: 07 Jan 2013 17:46
Status: Offline

Create ZFS with single disk, add second after for mirroring.

Post by icoleman.uk »

Hi,

Here's my situation:

I have 2 identical 3TB drives. One has data that I do not want to lose and don't have anywhere else to store it. The other is blank.

I want to create a mirrored ZFS filesystem and was trying to achieve the following:

1. Create ZFS filesystem with a single disk using the blank disk.
2. Copy the data from the other disk to the new ZFS filesystem.
3. Blank the other disk and add it to the ZFS filesystem as part of a mirrored set.
4. Let it "rebuild" and relax knowing I now have a bit of redundancy.

The problem:
I am unable to create a ZFS vdev with a single disk. NAS4Free states it needs at least two (which makes sense for mirrored set but doesn't suit my situation).

To be honest I haven't done much with ZFS in the past and am more familiar with RAID (both software and hardware).

Any help would be appreciated. :)

kenZ71
Advanced User
Advanced User
Posts: 379
Joined: 27 Jun 2012 20:18
Location: Northeast, USA
Status: Offline

Re: Create ZFS with single disk, add second after for mirroring.

Post by kenZ71 »

If you have a 3rd disk, it can be any size but must be empty you can try this hack:

1) Create the empty pool with one 3TB and one old disk, say a old 500GB drive

2) copy data to the pool but you are limited to the smallest drive

3) unplug the source drive and verify the data is in the pool

4) take a break then come back and verify again your data is in the pool

5) when absolutely certain all data is in the pool pull the old 500GB drive & replace with the source 3TB

Would suggest putting some tape with a label on the source drive and clearly label as SOURCE

Also, sounds like you don't have a backup copy, might be best to get that sorted first

Finally above hack will only work if your smallest drive can hold all data.
11.2-RELEASE-p3 | ZFS Mirror - 2 x 8TB WD Red | 28GB ECC Ram
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz

Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu

icoleman.uk
NewUser
NewUser
Posts: 6
Joined: 07 Jan 2013 17:46
Status: Offline

Re: Create ZFS with single disk, add second after for mirroring.

Post by icoleman.uk »

Hi,

Thanks for the reply - I'll have a dig around and see if I can come up with a drive that can store my data. I do have a backup of sorts but recovering it would take quite a while so copying from local disks would be preferred.

Am I to assume that it is impossible to create a vdev with only one disk and add another later?

Cheers for your help :)

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Create ZFS with single disk, add second after for mirroring.

Post by raulfg3 »

select stripe to create a one disk ZFS.

then google a bit to convert one single stripe ZFS disk on a ZFS disk mirror.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Create ZFS with single disk, add second after for mirroring.

Post by raulfg3 »

https://blogs.oracle.com/gjl/entry/conv ... fs_pool_to

The correct way is to attach a new device to existing vdev e.g.

# zpool attach -f yourzfspoolofasingledisk ada0 ada1


please keep in mind that command is ilustratice only.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

Post Reply

Return to “ZFS (only!)”