Darren J Moffat
2008-Jan-02 11:01 UTC
[zfs-discuss] Setting a dataset create time only property at pool creation time.
Our test engineer for the ZFS Crypto project discovered that it isn''t possible to enable encryption on the "top" filesystem in a pool - the one that gets created by default. The intent here is that the default top level filesystem gets the encryption property not the pool itself (because the later has no meaning). Looks like we need to do some work here. But note: # zpool create -o compression=on tpool /tmp/tpool property ''compression'' is not a valid pool property For compression that doesn''t matter too much since it can be set later. The problem we have is similar to this one: # zpool create -o normalization=formC tpool /tmp/tpool property ''normalization'' is not a valid pool property # zpool create tpool /tmp/tpool # zfs set normalization=formC tpool cannot set property for ''tpool'': ''normalization'' is readonly like the normalization property we can only be set at create time. This looks like a generic problem with create time only properties. We need a way to pass any dataset property on via the zpool command to the top dataset so that create time only properties can be set. -- Darren J Moffat
Kalpak Shah
2008-Jan-02 11:18 UTC
[zfs-discuss] Setting a dataset create time only property at pool creation time.
Hi I faced a similar problem when I was adding a property for per-dataset dnode sizes. I got around it by adding a ZPOOL_PROP_DNODE_SIZE and adding the dataset property in dsl_dataset_stats(). That way the root dataset gets the property too. I am not very sure if this is the cleanest solution or not since this is just prototype code. [kalpak at garfield src]# zpool create -d 4096 tank /mnt/store/zfs-fuse/large_dnode/src/img [kalpak at garfield src]# zfs get dnode_size NAME PROPERTY VALUE SOURCE tank dnode_size 4K - Thanks, Kalpak. On Wed, 2008-01-02 at 11:01 +0000, Darren J Moffat wrote:> Our test engineer for the ZFS Crypto project discovered that it isn''t > possible to enable encryption on the "top" filesystem in a pool - the > one that gets created by default. > > The intent here is that the default top level filesystem gets the > encryption property not the pool itself (because the later has no > meaning). Looks like we need to do some work here. > > But note: > > # zpool create -o compression=on tpool /tmp/tpool > property ''compression'' is not a valid pool property > > For compression that doesn''t matter too much since it can be set later. > > The problem we have is similar to this one: > > # zpool create -o normalization=formC tpool /tmp/tpool > property ''normalization'' is not a valid pool property > # zpool create tpool /tmp/tpool > # zfs set normalization=formC tpool > cannot set property for ''tpool'': ''normalization'' is readonly > > like the normalization property we can only be set at create time. > > This looks like a generic problem with create time only properties. We > need a way to pass any dataset property on via the zpool command to the > top dataset so that create time only properties can be set. >
Darren J Moffat
2008-Jan-02 14:32 UTC
[zfs-discuss] Setting a dataset create time only property at pool creation time.
Kalpak Shah wrote:> Hi > > I faced a similar problem when I was adding a property for per-dataset dnode sizes. I got around it by adding a ZPOOL_PROP_DNODE_SIZE and adding the dataset property in dsl_dataset_stats(). That way the root dataset gets the property too. I am not very sure if this is the cleanest solution or not since this is just prototype code.I think a generic solution is needed particular given there is a need for this with all create time only properties. -- Darren J Moffat