Recommended zpool creation options?

Moderators: jhartley, MSR734, nola

Re: Recommended zpool creation options?

Post by robbedoes » Fri Sep 28, 2012 12:30 pm

How about a compressed mirror of 2 disks for starters:
sudo zpool create -m /zfs -O compression=gzip-6 pool0 mirror /dev/disk1 /dev/disk2
robbedoes Offline


 
Posts: 1
Joined: Mon Sep 24, 2012 4:33 pm

Re: Recommended zpool creation options?

Post by lmamakos » Sat Sep 29, 2012 11:39 pm

I'm new here, so I apologize if I'm tripping over some issue with this port of ZFS vs. more generalized use..

Why worry about compression and case sensitivity options on the pool? You can vary these on a per-ZFS filesystem when you create them with 'zfs create foo' and try them out to your heart's content. Or fiddle with them later with 'zfs set compression=gzip-1 as you like.

I mostly have been using ZFS on a couple of FreeBSD systems, and it never occurred to me to worry about these options on the pool. I've only worried about attaching the volumes to be included in the pool when creating the pool. Then again, I don't have anything of consequence in the "root" of the ZFS pool; everything interesting is in a ZFS file system created in the pool.

Related, I've been running my HFS+ volumes on my OS X system as case sensitive for quite a while now. While I've heard of issues with some software, this hasn't been an issue for me; everything I'm using seems to work fine on a case sensitive file system. (Notably, though, I'm not using any Adobe software, so I wouldn't be surprised if there were issues there). But, since you can screw around with case sensitivity when creating the zfs file system, it's easy to try it both ways and see what happens.
lmamakos Offline


 
Posts: 1
Joined: Sat Sep 29, 2012 10:54 pm

Re: Recommended zpool creation options?

Post by alexwasserman » Sat Oct 06, 2012 11:35 pm

Last I checked you can't change case sensitivity after create-time, and if you don't want multiple filesystems, or copy a lot of data over early on it can be a pain to have to move it around.
alexwasserman Offline


 
Posts: 21
Joined: Mon Sep 17, 2012 4:04 pm

file system properties before and after restoration

Post by grahamperrin » Sat Dec 08, 2012 5:28 pm

Before and after restoration

An example, for backups of a file system named strawberry

Code: Select all
zfs create -o casesensitivity=insensitive -o normalization=formD -o atime=off -o snapdir=visible -o canmount=noauto -o compression=gzip-9 jungle/backups/strawberry


  • canmount=noauto is good for backups that will be performed with zfs send and zfs receive
  • compression=gzip-9 is good for backups that will be performed whilst you do not use the computer.

Thanks to Patrick (Jolly) for the canmount=noauto hint.

----

If the disk for strawberry is lost or damaged then with a replacement disk, preparation for restoration might be:

Code: Select all
sudo zpool create -o ashift=12 -O casesensitivity=insensitive -O normalization=formD -O atime=off -O snapdir=visible -O compression=gzip-9 strawberry /dev/diskn


  • atime=off should be good for most use cases
  • compression=gzip-9 can be changed to compression=on (or off) after restoration is complete.

I can't recall who gave me the atime hint. Not specific to ZFS, there are published explanations of the rarity of requirement for atime=on
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Cross references

Post by grahamperrin » Sun Jan 13, 2013 9:20 am

Quickstart Guide needs help

Best practice installation commands (but those commands are unrelated to installation of ZEVO)

With or without changes to the quick start guide, I do like Tom's idea:

tomunderhill wrote:… a two or three page document to allow enthusiasts to hit the ground running with a minimum of frustration and reformatting. …


Best practice should be consistent and as far as possible, not specific to any version of ZEVO or the operating system.

The ashift value of 12 does seem preferable often enough to treat it as best practice.

Force is not best practice

Reasons for force vary, but as a rule of thumb I should not treat -f as best practice.

For a two-page document we might have:

  • part one with best practices that are almost without exception
  • part two with tips and tricks for particular environments

– then call that document Best practices, tips and tricks or words to that effect.

Maybe part two could be a cheat sheet.

Afterthought: one page per best practice, cheat, tip or trick. Putting myself in the shoes of a newcomer to ZFS, I'd like the strict separation and white space.

Environments in which a tip, trick or cheat might apply

Needs thought.

There is, at least, the bug in diskutil(8) in 10.8, 10.8.1 and 10.8.2 that makes it preferable to not use diskutil for some things (example).

Let's find, amongst topics, an example of force, with an explanation for its application …
Last edited by grahamperrin on Mon Jan 14, 2013 4:14 am, edited 1 time in total.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

sudo

Post by grahamperrin » Mon Jan 14, 2013 4:04 am

TomUnderhill wrote:… elevating all the commands with sudo …


Not all commands should be elevated.

Note to self:

> In at least one use case,
> zpool create …
> requires superuser privileges …

If I recall correctly (someone please correct me if I'm wrong): there's some difference between internal and external disks …
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: sudo

Post by grahamperrin » Thu Jan 17, 2013 3:50 pm

grahamperrin wrote:Not all commands should be elevated. …


At viewtopic.php?p=3817#p3817 for example, problems with a mount point owned by root. Food for thought.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

One-line summaries

Post by grahamperrin » Sat Sep 28, 2013 8:44 pm

For users of ZEVO Community Edition 1.1.1:

-o ashift=12 -O casesensitivity=insensitive

For users of MacZFS:

-o ashift=12 -O casesensitivity=insensitive -O normalization=formD

Consider those options to be the bare essentials because if you don't get them right at the time of creation of the pool, you can not change them.

(There's an assumption that ashift=12 is appropriate.)


Last bumped by grahamperrin on Sat Sep 28, 2013 8:44 pm.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Previous

Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron