Absolute Beginner - Raid 1?

New to OpenZFS on OS X (Or ZFS in general)? Ask your questions here!

Absolute Beginner - Raid 1?

Postby Pixxel » Sun Nov 15, 2015 3:56 pm

Hello,

Absolute beginner to ZFS, but I can copy / paste into Terminal.

I have several sets of HFS+ RAID 1 backups at present in an external SAS box, and would like to add another set in ZFS for the anti-bit rot features.

So I have two new Hitachi NAS drives, 3TB each, that I'd like to set up in a ZFS RAID 1 (mirrored), with four partitions thus:

Name of RAID set: zfs_raid1

Partition 1: 500GB, name: zfs_mirror (Copy of bootable HFS+ work volume)
Partition 2: 500GB, name: zfs_weekly_mirror (Weekly copy of above)
Partition 3: 1TB, name: zfs_archive (Data storage, not bootable)
Partition 4: 1TB, name: zfs_tm_archive (Time Machine volume / copy)

Questions:

1. What would I need to type into Terminal to set up the RAID?
2. Do I need to format/partition the two drives with Disk Utility first?
3. What software / command would I use to synch my HFS+ drives to the ZFS partitions? (I currently use SuperDuper / CCC for my HFS+ sets)
4. Would the ZFS partitions be bootable if needed? (assuming the ZFS partition is a copy of a bootable HFS+ volume)
5. If I needed to restore a bootable copy of a HFS+ volume stored on ZFS to a HFS+ volume, is that possible?
6. Will a ZFS partition be recognised / can it be added to Time Machine for backup?
7. Will the ZFS RAID set mount on the desktop / can it be ejected as other HFS+ externals can?
8. Can the ZFS set be set to verify (scrub?) all files regularly or is that a Terminal command when needed?

I'd like maximum compatibility with my other drives (HFS+), if possible, for recovery purposes.

I've found some answers to some of these questions on other ZFS sites, but since the versions of ZFS for Mac seem to vary a bit, I'd like to check and get the answers right for the O3X version.

Any help would be appreciated.

Thanks!
Pixxel
 
Posts: 2
Joined: Sun Nov 15, 2015 3:23 pm

Re: Absolute Beginner - Raid 1?

Postby lundman » Sun Nov 15, 2015 9:27 pm

With ZFS you tend not to use partitions, but rather make a "pool" of your storage, then just make filesystems in it. (Creating a filesystem is very light in ZFS, almost the same as just making a new directory).

So your 3TB should probably just be mirrored in the pool.

Code: Select all
 
1:  zpool create -f -o ashift=12 -O casesensitivity=insensitive -O normalization=formD $poolname mirror /dev/diskX /dev/diskY


Where you should replace $poolname with the name you wish to give your pool. "tank" is often used in ZFS documentation, but I'm sure you can think of a non-Matrix name. You also need to replace /dev/diskX and Y with the disk name for your 3TB disks. See the output of "diskutil list"

Note that if the disks already have a filesystem on them, you should unmount them, or you will get a "is busy" error.

You would then create each filesystem in the pool with

Code: Select all
sudo zfs create $poolname/zfs_mirror
sudo zfs create $poolname/zfs_weekly_mirror
sudo zfs create $poolname/zfs_archive
sudo zfs create $poolname/zfs_tm_archive


That would let all datasets use any of the space though, if you want to limit the usage, as you said use
Code: Select all
sudo zfs set quota=500G $poolname/zfs_mirror
OR, if you want to do that when creating
sudo zfs create -o quota=500G $poolname/zfs_mirror
the commands are equivalent


2: No, you don't have to do anything. zpool create -f will put a gpt on there for you and set up the HDDs the way you want.

3. SuperDuper / CCC will probably work, I like cmdline, so I use 'rsync' for nearly everything I do.

4. You can not boot ZFS, so the concept of bootable doesn't apply (yet).

5. Depends on how you store it, but generally, yes you can.

6. I think you can tell TM to backup ZFS as client, but not as storage destination. I forget which way around it goes. Eventually we hope to fix it.

7. The default is you get icons on Desktop if you have set Finder to show them, under /Volumes. You can not eject ZFS using Finder, or dragging to Trash. You have to cmdline "zpool export" it. (No need for just reboots). We will fix this.

8. If you want it automated, or periodic, you need to set that up. Either crontab, or any of the million GUIs for doing such scripted events. Command is "zpool scrub".
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Absolute Beginner - Raid 1?

Postby Marco » Mon Nov 16, 2015 12:15 am

About question 3:

1) unfortunately, SuperDuper, that I have and use for HFS+, doesn't recognize ZFS.

2) CCC supports writing to ZFS: unfortunately, I don't have it, but they offer a limited trial demo that I experimented with, and it works.

3) I am currently using SyncTwoFolders. It works, and it show what it is doing in the Finder interface. Perhaps this slow it down a bit. I don't know what command it is based on.
Marco
 
Posts: 38
Joined: Tue Mar 25, 2014 1:39 am

Re: Absolute Beginner - Raid 1?

Postby Pixxel » Mon Nov 16, 2015 11:16 am

Thank you both for your replies.

5. If I needed to restore a bootable copy of a HFS+ volume stored on ZFS to a HFS+ volume, is that possible?

Depends on how you store it, but generally, yes you can.

How would I need to store it so that it could be restored as a bootable volume?

Would the way perhaps be to use sparsebundle images on the ZFS volumes for copies of the bootable HFS+ backups (and maybe TM)? Can the Mac mount sparsebundle images on ZFS volumes on the desktop (thus allowing CCC to synch to the image)?

6. Will a ZFS partition be recognised / can it be added to Time Machine for backup?

I think you can tell TM to backup ZFS as client, but not as storage destination. I forget which way around it goes. Eventually we hope to fix it.

Sorry, what's the difference between 'client' and 'storage destination'?

At present, I have my TM backup drives recognised by TM, so I simply select the drive in TM's control panel and choose 'Backup'. This takes a few minutes per backup drive. If I had to do a synch from one HFS+ TM volume to another (using, say, CCC) it takes just over 5 hours, so obviously better to have TM recognise the backup volume as a TM volume.

CCC Synching:

Looking at CCC's release notes here:

http://bombich.com/kb/ccc4/release-notes

There's this section on the version 4.0.2 release notes (5th note from the bottom of 4.0.2 notes):

"Some ZFS volumes not only lack a UUID, but also have an underlying physical device with an identical volume name. This poses a problem for CCC when attempting to positively identify a ZFS destination volume. We have implemented a workaround in which the unmounted volume will be ignored, however this makes it impossible for CCC to pre-mount a ZFS volume that is attached, but not mounted. We're not happy with this workaround, and it can be avoided if the ZFS filesystem implementation is improved to add a volume UUID to each logical volume."

Does this apply to O3X?

Thanks - much learning to do here :-)
Pixxel
 
Posts: 2
Joined: Sun Nov 15, 2015 3:23 pm

Re: Absolute Beginner - Raid 1?

Postby Brendon » Mon Nov 16, 2015 12:57 pm

TM will not backup a ZFS volume at present. ZFS can be used to store backups created by TM though. Personally I use OSX server to server a TM destination that is a zfs dataset. Works fine.

Cheers
Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: Absolute Beginner - Raid 1?

Postby Marco » Fri Nov 27, 2015 8:41 am

Marco wrote:About question 3:

[cut text]

3) I am currently using SyncTwoFolders. It works, and it show what it is doing in the Finder interface. Perhaps this slow it down a bit. I don't know what command it is based on.


Some time after I installed El Capitan I had to stop using SyncTwoFolders, because if I try to copy a large number of files, the system to unresponsive and I have to force a shutdown. Not good.

I am now experimenting with backupList+, which provides a GUI for rsync. As rsync is known to work with zfs, it seems promising. Until now I experienced no troubles.

It does only a fraction of what CCC does, but it is free (donations are encouraged, but not required).

I would be interested in reading about experiences with CCC on zfs.
Marco
 
Posts: 38
Joined: Tue Mar 25, 2014 1:39 am

Re: Absolute Beginner - Raid 1?

Postby haer22 » Sat Nov 28, 2015 2:52 pm

I use CCC daily to copy stuff onto my zfs-volumes from hfs-disks. Works without any problems.
As a special feature of CCC I can run a script before and after the backup. I use that to mount a .dmg and then backup onto that one. Keeps owners and things like that isolated. I gather backups from several servers so keeping owners apart is a good thing.
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am


Return to Absolute Beginners Section

Who is online

Users browsing this forum: No registered users and 7 guests

cron