Skip to content

Commit ab4825d

Browse files
committedJul 19, 2023
updates to handle encryption better
1 parent 9e7540b commit ab4825d

File tree

4 files changed

+70
-324
lines changed

4 files changed

+70
-324
lines changed
 

‎lang/en

+61-6
Large diffs are not rendered by default.

‎property-list-en.pl

+1-315
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ sub property_desc
1010
ditto copy of this block is automatically stored. Default setting is
1111
0.',
1212

13-
'feature@allocation_classes' => 'GUID org.zfsonlinux:allocation_classes
14-
READ-ONLY COMPATIBLE yes
15-
DEPENDENCIES none
16-
17-
This feature enables support for separate allocation classes.
18-
19-
This feature becomes active when a dedicated allocation class vdev (dedup or special) is created with the zpool create or zpool add
20-
subcommands. With device removal, it can be returned to the enabled state if all the dedicated allocation class vdevs are removed.',
21-
2213
'feature@async_destroy' => 'GUID com.delphix:async_destroy
2314
READ-ONLY COMPATIBLE yes
2415
DEPENDENCIES none
@@ -336,322 +327,17 @@ sub property_desc
336327
337328
Booting off of zstd-compressed root pools is not yet supported.',
338329

339-
'normalization' => 'Indicates whether the file system should perform a unicode normal-
340-
ization of file names whenever two file names are compared, and
341-
which normalization algorithm should be used. File names are always
342-
stored unmodified, names are normalized as part of any comparison
343-
process. If this property is set to a legal value other than none,
344-
and the utf8only property was left unspecified, the utf8only prop-
345-
erty is automatically set to on. The default value of the
346-
normalization property is none. This property cannot be changed
347-
after the file system is created.',
348-
349-
'nbmand' => 'Controls whether the file system should be mounted with "nbmand"
350-
(Non Blocking mandatory locks). This is used for CIFS clients.
351-
Changes to this property only take effect when the file system is
352-
umounted and remounted. See mount(1M) for more information on
353-
"nbmand" mounts.',
354-
355-
'origin' => 'For cloned file systems or volumes, the snapshot from which the clone
356-
was created. See also the clones property.',
357-
358-
'overlay' => 'Allow mounting on a busy directory or a directory which already contains files/directories. This is the
359-
default mount behavior for Linux filesystems. However, for consistency with ZFS on other platforms overlay
360-
mounts are disabled by default. Set overlay=on to enable overlay mounts.',
361-
362-
'primarycache' => 'Controls what is cached in the primary cache (ARC). If this prop-
363-
erty is set to "all", then both user data and metadata is cached.
364-
If this property is set to "none", then neither user data nor meta-
365-
data is cached. If this property is set to "metadata", then only
366-
metadata is cached. The default value is "all".',
367-
368-
'referenced' => 'The amount of data that is accessible by this dataset, which may or
369-
may not be shared with other datasets in the pool. When a snapshot or
370-
clone is created, it initially references the same amount of space as
371-
the file system or snapshot it was created from, since its contents
372-
are identical.<br />
373-
<br />
374-
This property can also be referred to by its shortened column name,
375-
refer.',
376-
377-
'refquota' => 'Limits the amount of space a dataset can consume. This property enforces a hard limit on the
378-
amount of space used. This hard limit does not include space used by descendents, including
379-
file systems and snapshots.',
380-
381-
'refreservation' => 'The minimum amount of space guaranteed to a dataset, not including
382-
its descendents. When the amount of space used is below this value,
383-
the dataset is treated as if it were taking up the amount of space
384-
specified by refreservation. The refreservation reservation is
385-
accounted for in the parent datasets\' space used, and counts against
386-
the parent datasets\' quotas and reservations.<br />
387-
<br />
388-
If refreservation is set, a snapshot is only allowed if there is
389-
enough free pool space outside of this reservation to accommodate the
390-
current number of "referenced" bytes in the dataset.<br />
391-
<br />
392-
This property can also be referred to by its shortened column name,
393-
refreserv.',
394-
395-
'reservation' => 'The minimum amount of space guaranteed to a dataset and its descen-
396-
dents. When the amount of space used is below this value, the dataset
397-
is treated as if it were taking up the amount of space specified by
398-
its reservation. Reservations are accounted for in the parent
399-
datasets\' space used, and count against the parent datasets\' quotas
400-
and reservations.<br />
401-
<br />
402-
This property can also be referred to by its shortened column name,
403-
reserv.',
404-
405-
'rootcontext' => 'This flag sets the SELinux context for the root inode of the filesystem. See selinux(8) for more information.',
406-
407-
'secondarycache' => 'Controls what is cached in the secondary cache (L2ARC). If this
408-
property is set to "all", then both user data and metadata is
409-
cached. If this property is set to "none", then neither user data
410-
nor metadata is cached. If this property is set to "metadata", then
411-
only metadata is cached. The default value is "all".',
412-
413-
'shareiscsi' => 'Like the "sharenfs" property, "shareiscsi" indicates whether a ZFS
414-
volume is exported as an iSCSI target. The acceptable values for
415-
this property are "on", "off", and "type=disk". The default value
416-
is "off". In the future, other target types might be supported. For
417-
example, "tape".
418-
419-
You might want to set "shareiscsi=on" for a file system so that all
420-
ZFS volumes within the file system are shared by default. Setting
421-
this property on a file system has no direct effect, however.',
422-
423-
'sharenfs' => 'Controls whether the file system is shared via NFS, and what options
424-
are used. A file system with a sharenfs property of off is managed
425-
the traditional way via exports(5). Otherwise, the file system is
426-
automatically shared and unshared with the "zfs share" and "zfs
427-
unshare" commands. If the property is set to on no NFS export options
428-
are used. Otherwise, NFS export options are equivalent to the con-
429-
tents of this property. The export options may be comma-separated.
430-
See exports(5) for a list of valid options.<br />
431-
<br />
432-
When the sharenfs property is changed for a dataset, the mountd(8)
433-
daemon is reloaded.',
434-
435-
'sharesmb' => 'Controls whether the file system is shared by using Samba USERSHARES, and what options are to
436-
be used. Otherwise, the file system is automatically shared and unshared with the zfs share
437-
and zfs unshare commands. If the property is set to on, the net(8) command is invoked to cre‐
438-
ate a USERSHARE.<br />
439-
<br />
440-
Because SMB shares requires a resource name, a unique resource name is constructed from the
441-
dataset name. The constructed name is a copy of the dataset name except that the characters in
442-
the dataset name, which would be illegal in the resource name, are replaced with underscore
443-
(_) characters. The ZFS On Linux driver does not (yet) support additional options which might
444-
be availible in the Solaris version.<br />
445-
<br />
446-
If the sharesmb property is set to off, the file systems are unshared.<br />
447-
<br />
448-
In Linux, the share is created with the ACL (Access Control List) "Everyone:F" ("F" stands for
449-
"full permissions", ie. read and write permissions) and no guest access (which means samba
450-
must be able to authenticate a real user, system passwd/shadow, ldap or smbpasswd based) by
451-
default. This means that any additional access control (dissalow specific user specific access
452-
etc) must be done on the underlaying filesystem.<br />
453-
<br />
454-
Example to mount a SMB filesystem shared through ZFS (share/tmp): Note that a user and
455-
his/her password must be given!<br />
456-
<br />
457-
smbmount //127.0.0.1/share_tmp /mnt/tmp -o user=workgroup/turbo,password=obrut,uid=1000<br />
458-
<br />
459-
Minimal /etc/samba/smb.conf configuration<br />
460-
<br />
461-
* Samba will need to listen to \'localhost\' (127.0.0.1) for the zfs utilities to communitate
462-
with samba. This is the default behavior for most Linux distributions.<br />
463-
<br />
464-
* Samba must be able to authenticate a user. This can be done in a number of ways, depending
465-
on if using the system password file, LDAP or the Samba specific smbpasswd file. How to do
466-
this is outside the scope of this manual. Please refer to the smb.conf(5) manpage for more
467-
information.<br />
468-
<br />
469-
* See the USERSHARE section of the smb.conf(5) man page for all configuration options in
470-
case you need to modify any options to the share afterwards. Do note that any changes done
471-
with the \'net\' command will be undone if the share is every unshared (such as at a reboot
472-
etc). In the future, ZoL will be able to set specific options directly using
473-
sharesmb=&#60;option&#62;.',
474-
475-
'size' => 'Total size of the storage pool.',
476-
477-
'snapdir' => 'Controls whether the ".zfs" directory is hidden or visible in the
478-
root of the file system as discussed in the "Snapshots" section.
479-
The default value is "hidden".',
480-
481-
'snapdev' => 'Controls whether the snapshots devices of zvol\'s are hidden or visible. The default value is hidden.',
482-
483-
'snapshot_count' => 'The total number of snapshots that exist under this location in the
484-
dataset tree. This value is only available when a snapshot_limit
485-
has been set somewhere in the tree under which the dataset resides.',
486-
487-
'snapshot_limit' => ' Limits the number of snapshots that can be created on a dataset and
488-
its descendents. Setting a snapshot_limit on a descendent of a
489-
dataset that already has a snapshot_limit does not override the
490-
ancestor\'s snapshot_limit, but rather imposes an additional limit.
491-
The limit is not enforced if the user is allowed to change the
492-
limit. For example, this means that recursive snapshots taken from
493-
the global zone are counted against each delegated dataset within a
494-
zone. This feature must be enabled to be used (see zpool-fea‐
495-
tures(5)).',
496330

497331
'setuid' => 'Controls whether the set-UID bit is respected for the file system.
498332
The default value is "on".',
499333

500-
'sync' => 'Controls the behavior of synchronous requests (e.g. fsync(2),
501-
O_DSYNC). This property accepts the following values:
502-
503-
standard This is the POSIX specified behavior of ensuring all
504-
synchronous requests are written to stable storage and
505-
all devices are flushed to ensure data is not cached by
506-
device controllers (this is the default).
507-
508-
always All file system transactions are written and flushed
509-
before their system calls return. This has a large per-
510-
formance penalty.
511-
512-
disabled Disables synchronous requests. File system transactions
513-
are only committed to stable storage periodically. This
514-
option will give the highest performance. However, it
515-
is very dangerous as ZFS would be ignoring the synchro-
516-
nous transaction demands of applications such as data-
517-
bases or NFS. Administrators should only use this
518-
option when the risks are understood.',
519-
520-
'type' => 'The type of dataset: filesystem, volume, or snapshot.',
521-
522-
'used' => 'The amount of space consumed by this dataset and all its descendents.
523-
This is the value that is checked against this dataset\'s quota and
524-
reservation. The space used does not include this dataset\'s reserva-
525-
tion, but does take into account the reservations of any descendent
526-
datasets. The amount of space that a dataset consumes from its par-
527-
ent, as well as the amount of space that are freed if this dataset is
528-
recursively destroyed, is the greater of its space used and its
529-
reservation.<br />
530-
<br />
531-
When snapshots (see the "Snapshots" section) are created, their space
532-
is initially shared between the snapshot and the file system, and
533-
possibly with previous snapshots. As the file system changes, space
534-
that was previously shared becomes unique to the snapshot, and
535-
counted in the snapshot\'s space used. Additionally, deleting snap-
536-
shots can increase the amount of space unique to (and used by) other
537-
snapshots.<br />
538-
<br />
539-
The amount of space used, available, or referenced does not take into
540-
account pending changes. Pending changes are generally accounted for
541-
within a few seconds. Committing a change to a disk using fsync(2) or
542-
O_SYNC does not necessarily guarantee that the space usage informa-
543-
tion is updated immediately.',
544-
545-
'usedbychildren' => 'The amount of space used by children of this dataset, which would be
546-
freed if all the dataset\'s children were destroyed.',
547-
548-
'usedbydataset' => 'The amount of space used by this dataset itself, which would be freed
549-
if the dataset were destroyed (after first removing any
550-
refreservation and destroying any necessary snapshots or descen-
551-
dents).',
552-
553-
'usedbysnapshots' => 'The amount of space consumed by snapshots of this dataset. In partic-
554-
ular, it is the amount of space that would be freed if all of this
555-
dataset\'s snapshots were destroyed. Note that this is not simply the
556-
sum of the snapshots\' used properties because space can be shared by
557-
multiple snapshots.',
558-
559-
'usedbyrefreservation' => 'The amount of space used by a refreservation set on this dataset,
560-
which would be freed if the refreservation was removed.',
561-
562-
'userrefs' => 'This property is set to the number of user holds on this snapshot. User holds are set by using the zfs hold command.
563-
groupused@group
564-
The amount of space consumed by the specified group in this dataset. Space is charged to the group of each file, as displayed by ls -l. See the userused@user property for more information.
565-
Unprivileged users can only access their own groups\' space usage. The root user, or a user who has been granted the groupused privilege with zfs allow, can access all groups\' usage.',
566-
567-
'utf8only' => 'Indicates whether the file system should reject file names that
568-
include characters that are not present in the UTF-8 character code
569-
set. If this property is explicitly set to off, the normalization
570-
property must either not be explicitly set or be set to none. The
571-
default value for the utf8only property is off. This property can-
572-
not be changed after the file system is created.',
573-
574-
'version' => 'The current on-disk version of the pool. This can be increased, but
575-
never decreased. The preferred method of updating pools is with the
576-
"zpool upgrade" command, though this property can be used when a spe-
577-
cific version is needed for backwards compatibility. Once feature
578-
flags is enabled on a pool this property will no longer have a value.',
579-
580-
'volblocksize' => 'For volumes, specifies the block size of the volume. The blocksize
581-
cannot be changed once the volume has been written, so it should be
582-
set at volume creation time. The default blocksize for volumes is 8
583-
Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid.
584-
585-
This property can also be referred to by its shortened column name,
586-
volblock.',
587334

588-
'volsize' => 'For volumes, specifies the logical size of the volume. By default,
589-
creating a volume establishes a reservation of equal size. For storage
590-
pools with a version number of 9 or higher, a refreservation is
591-
set instead. Any changes to volsize are reflected in an equivalent
592-
change to the reservation (or refreservation). The volsize can only
593-
be set to a multiple of volblocksize, and cannot be zero.
594-
595-
The reservation is kept equal to the volume\'s logical size to prevent
596-
unexpected behavior for consumers. Without the reservation, the volume
597-
could run out of space, resulting in undefined behavior or data
598-
corruption, depending on how the volume is used. These effects can
599-
also occur when the volume size is changed while it is in use (particularly
600-
when shrinking the size). Extreme care should be used when
601-
adjusting the volume size.
602-
603-
Though not recommended, a "sparse volume" (also known as "thin provisioning")
604-
can be created by specifying the -s option to the "zfs
605-
create -V" command, or by changing the reservation after the volume
606-
has been created. A "sparse volume" is a volume where the reservation
607-
is less then the volume size. Consequently, writes to a sparse volume
608-
can fail with ENOSPC when the pool is low on space. For a sparse
609-
volume, changes to volsize are not reflected in the reservation.',
610-
611335
'vscan' => 'Controls whether regular files should be scanned for viruses when a
612336
file is opened and closed. In addition to enabling this property,
613337
the virus scan service must also be enabled for virus scanning to
614338
occur. The default value is "off".',
615339

616-
'written' => 'The amount of referenced space written to this dataset since the previous snapshot.',
617-
618-
'xattr' => 'Controls whether extended attributes are enabled for this file system. The default value is on.',
619-
620-
'zoned' => 'Controls whether the dataset is managed from a non-global zone. See
621-
the "Zones" section for more information. The default value is
622-
"off".<br /><br />
623-
624-
<h4>Zones</h4>
625-
A ZFS file system can be added to a non-global zone by using zonecfg\'\s
626-
"add fs" subcommand. A ZFS file system that is added to a non-global
627-
zone must have its mountpoint property set to legacy.
628-
629-
The physical properties of an added file system are controlled by the
630-
global administrator. However, the zone administrator can create, mod-
631-
ify, or destroy files within the added file system, depending on how
632-
the file system is mounted.
633-
634-
A dataset can also be delegated to a non-global zone by using zonecfg\'\s
635-
"add dataset" subcommand. You cannot delegate a dataset to one zone and
636-
the children of the same dataset to another zone. The zone administra-
637-
tor can change properties of the dataset or any of its children. How-
638-
ever, the "quota" property is controlled by the global administrator.
639-
640-
A ZFS volume can be added as a device to a non-global zone by using
641-
zonecfg\'\s "add device" subcommand. However, its physical properties can
642-
only be modified by the global administrator.
643-
644-
For more information about zonecfg syntax, see zonecfg(1M).
645-
646-
After a dataset is delegated to a non-global zone, the "zoned" property
647-
is automatically set. A zoned file system cannot be mounted in the
648-
global zone, since the zone administrator might have to set the mount
649-
point to an unacceptable value.
650-
651-
The global administrator can forcibly clear the "zoned" property,
652-
though this should be done with extreme care. The global administrator
653-
should verify that all the mount points are acceptable before clearing
654-
the property.');
340+
);
655341
return %hash;
656342
}
657343

‎property.cgi

+6-1
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,17 @@ if ($text{'prop_'.$in{'property'}})
4242
}
4343
print ui_table_end();
4444

45+
#this is where we see if we can/and how to edit zfs properties
4546
if (can_edit($in{'zfs'}, $in{'property'}) =~ 1) {
4647
print ui_form_start('cmd.cgi', 'post');
4748
print ui_hidden('property', $in{'property'});
4849
print ui_hidden('zfs', $in{'zfs'});
4950
print ui_hidden('pool', $in{'pool'});
50-
if ($in{'property'} =~ 'mountpoint') {
51+
if ($in{'property'} =~ 'keystatus' and $get{$in{'zfs'}}{$in{'property'}}{value} =~ 'unavailable') {
52+
print ui_hidden('cmd', 'load-key');
53+
print "<a href='cmd.cgi?zfs=$in{'zfs'}&cmd=zfsact&action=load-key'>Load key</a>";
54+
#print ui_submit('submit'), "<br />";
55+
} elsif ($in{'property'} =~ 'mountpoint') {
5156
print ui_hidden('cmd', 'setzfs');
5257
print ui_filebox('set', $get{$in{'zfs'}}{$in{'property'}}{value}, 0, undef, undef, 1);
5358
print ui_submit('submit'), "<br />";

‎zfsmanager-lib.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ sub properties_list
99
#return hash of properties that can be set manually and their data type
1010
{
1111
my %list = ('atime' => 'boolean', 'devices' => 'boolean', 'exec' => 'boolean', 'nbmand' => 'boolean', 'readonly' => 'boolean', 'setuid' => 'boolean', 'shareiscsi' => 'boolean', 'utf8only' => 'boolean', 'vscan' => 'boolean', 'zoned' => 'boolean', 'relatime' => 'boolean', 'overlay' => 'boolean',
12-
'aclinherit' => 'discard, noallow, restricted, passthrough, passthrough-x', 'aclmode' => 'discard, groupmaks, passthrough', 'casesensitivity' => 'sensitive, insensitive, mixed', 'checksum' => 'on, off, fletcher2, fletcher4, sha256', 'compression' => 'on, off, lzjb, lz4, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8, gzip-9, zle', 'copies' => '1, 2, 3', 'dedup' => 'on, off, verify, sha256', 'logbias' => 'latency, throughput', 'normalization' => 'none, formC, formD, formKC, formKD', 'primarycache' => 'all, none, metadata', 'secondarycache' => 'all, none, metadata', 'snapdir' => 'hidden, visible', 'snapdev' => 'hidden, visible', 'sync' => 'standard, always, disabled', 'xattr' => 'on, off, sa', 'com.sun:auto-snapshot' => 'true, false', 'acltype' => 'noacl, posixacl', 'redundant_metadata' => 'all, most', 'recordsize' => '512, 1K, 2K, 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K, 1M', 'canmount' => 'on, off, noauto',
13-
'quota' => 'text', 'refquota' => 'text', 'reservation' => 'text', 'refreservation' => 'text', 'volsize' => 'text', 'filesystem_limit' => 'text', 'snapshot_limit' => 'text',
12+
'aclinherit' => 'discard, noallow, restricted, passthrough, passthrough-x', 'aclmode' => 'discard, groupmaks, passthrough', 'casesensitivity' => 'sensitive, insensitive, mixed', 'checksum' => 'on, off, fletcher2, fletcher4, sha256', 'compression' => 'on, off, lzjb, lz4, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8, gzip-9, zle, zstd', 'copies' => '1, 2, 3', 'dedup' => 'on, off, verify, sha256', 'logbias' => 'latency, throughput', 'normalization' => 'none, formC, formD, formKC, formKD', 'primarycache' => 'all, none, metadata', 'secondarycache' => 'all, none, metadata', 'snapdir' => 'hidden, visible', 'snapdev' => 'hidden, visible', 'sync' => 'standard, always, disabled', 'xattr' => 'on, off, sa', 'com.sun:auto-snapshot' => 'true, false', 'acltype' => 'noacl, posixacl', 'redundant_metadata' => 'all, most', 'recordsize' => '512, 1K, 2K, 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K, 1M', 'canmount' => 'on, off, noauto',
13+
'keylocation' => 'text', 'keystatus' => 'special','quota' => 'text', 'refquota' => 'text', 'reservation' => 'text', 'refreservation' => 'text', 'volsize' => 'text', 'filesystem_limit' => 'text', 'snapshot_limit' => 'text',
1414
'mountpoint' => 'special', 'sharesmb' => 'special', 'sharenfs' => 'special', 'mounted' => 'special', 'context' => 'special', 'defcontext' => 'special', 'fscontext' => 'special', 'rootcontext' => 'special');
1515
return %list;
1616
}

0 commit comments

Comments
 (0)
Please sign in to comment.