| /src/tests/sys/cddl/zfs/tests/snapused/ |
| H A D | snapused.kshlib | 37 typeset dataset=$1 39 if [[ "$(get_prop type $dataset)" == "snapshot" ]]; then 43 used=$(get_prop used $dataset) 44 usedbychildren=$(get_prop usedbychildren $dataset) 45 usedbydataset=$(get_prop usedbydataset $dataset) 46 usedbyrefreservation=$(get_prop usedbyrefreservation $dataset) 47 usedbysnapshots=$(get_prop usedbysnapshots $dataset) 51 log_fail "$dataset: used($used) is not the sum($used_sum) of usedby*" 57 typeset dataset=$1 58 for child in $($ZFS list -rH -t filesystem,volume -o name $dataset) [all …]
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapused/ |
| H A D | snapused.kshlib | 38 typeset dataset=$1 40 if [[ "$(get_prop type $dataset)" == "snapshot" ]]; then 44 used=$(get_prop used $dataset) 45 usedbychildren=$(get_prop usedbychildren $dataset) 46 usedbydataset=$(get_prop usedbydataset $dataset) 47 usedbyrefreservation=$(get_prop usedbyrefreservation $dataset) 48 usedbysnapshots=$(get_prop usedbysnapshots $dataset) 52 log_fail "$dataset: used($used) is not the sum($used_sum) of usedby*" 58 typeset dataset=$1 59 for child in $(zfs list -rH -t filesystem,volume -o name $dataset) [all …]
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/inheritance/ |
| H A D | inherit_001_pos.ksh | 56 typeset dataset=$1 61 create_pool "$dataset" "$disks" 63 log_must zfs create $dataset 64 log_must zfs set canmount=off $dataset 66 log_must zfs create $dataset 71 list="$list $dataset" 79 typeset dataset=$1 91 log_note "Leaving properties for $dataset unchanged." 93 update_recordsize $dataset $init_code 96 log_note "Leaving properties for $dataset at default values." [all …]
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/ |
| H A D | readonly_001_pos.ksh | 50 for dataset in $TESTPOOL/$TESTFS $TESTPOOL/$TESTVOL ; do 51 snapexists ${dataset}@$TESTSNAP && \ 52 destroy_dataset ${dataset}@$TESTSNAP -R 58 typeset dataset=$1 60 typeset fstype=$(get_prop type $dataset) 63 typeset mtpt=$(get_prop mountpoint $dataset) 72 typeset dataset=$1 74 typeset fstype=$(get_prop type $dataset) 77 typeset mtpt=$(get_prop mountpoint $dataset) 85 typeset dataset=$1 [all …]
|
| H A D | zfs_set_common.kshlib | 54 typeset dataset=$3 60 [[ -n $prop ]] && old_value=$(get_prop $prop $dataset) 63 [[ -z $prop || -z $dataset ]] && \ 66 log_must zfs set $prop=$expect_value $dataset 71 [[ -n $prop ]] && cur_value=$(get_prop $prop $dataset) 77 log_fail "The '$dataset' '$prop' value" \ 80 log_fail "The '$dataset' '$prop' value '$cur_value'" \ 86 log_fail "The '$dataset' '$prop' value '$cur_value'" \ 93 log_mustnot zfs set $prop=$expect_value $dataset 95 [[ -n $prop ]] && cur_value=$(get_prop $prop $dataset) [all …]
|
| H A D | snapdir_001_pos.ksh | 51 for dataset in $all_datasets; do 52 snapexists ${dataset}@snap && destroy_dataset ${dataset}@snap 58 typeset dataset=$1 60 typeset mtpt=$(get_prop mountpoint $dataset) 81 for dataset in $all_datasets; do 82 log_must zfs snapshot ${dataset}@snap 87 for dataset in $all_datasets; do 89 if [ "$dataset" = "$TESTPOOL/$TESTVOL" ]; then 91 "$dataset" "false" 94 "$dataset" [all …]
|
| H A D | canmount_002_pos.ksh | 121 dataset=${dataset_pos[i]} 122 set_n_check_prop "noauto" "canmount" "$dataset" 123 log_must zfs set mountpoint=$tmpmnt $dataset 124 log_must zfs set sharenfs=on $dataset 125 if ismounted $dataset; then 127 log_must mounted $dataset 128 log_must zfs unmount $dataset 129 log_must unmounted $dataset 131 log_must unmounted $dataset 136 log_must unmounted $dataset [all …]
|
| H A D | canmount_001_pos.ksh | 93 for dataset in "${dataset_pos[@]}" ; do 95 set_n_check_prop "$value" "canmount" "$dataset" 97 log_mustnot ismounted $dataset 98 log_mustnot zfs mount $dataset 99 log_mustnot ismounted $dataset 101 if ! ismounted $dataset ; then 102 log_must zfs mount $dataset 104 log_must ismounted $dataset 109 for dataset in "${dataset_neg[@]}" ; do 112 "$dataset" "false" [all …]
|
| /src/tests/sys/cddl/zfs/tests/cli_root/zfs_set/ |
| H A D | readonly_001_pos.ksh | 58 for dataset in $TESTPOOL/$TESTFS $TESTPOOL/$TESTVOL ; do 59 snapexists ${dataset}@$TESTSNAP && \ 60 log_must $ZFS destroy -R ${dataset}@$TESTSNAP 66 typeset dataset=$1 68 typeset fstype=$(get_prop type $dataset) 71 typeset mtpt=$(get_prop mountpoint $dataset) 80 typeset dataset=$1 82 typeset fstype=$(get_prop type $dataset) 85 typeset mtpt=$(get_prop mountpoint $dataset) 93 typeset dataset=$1 [all …]
|
| H A D | snapdir_001_pos.ksh | 59 for dataset in $all_datasets; do 60 snapexists ${dataset}@snap && \ 61 log_must $ZFS destroy ${dataset}@snap 67 typeset dataset=$1 69 typeset mtpt=$(get_prop mountpoint $dataset) 102 for dataset in $all_datasets; do 103 log_must $ZFS snapshot ${dataset}@snap 108 for dataset in $all_datasets; do 110 if [[ $dataset == "$TESTPOOL/$TESTVOL" ]] ; then 112 "$dataset" "false" [all …]
|
| H A D | canmount_002_pos.ksh | 136 dataset=${dataset_pos[i]} 137 set_n_check_prop "noauto" "canmount" "$dataset" 138 log_must $ZFS set mountpoint=$tmpmnt $dataset 139 if ismounted $dataset; then 141 log_must mounted $dataset 142 log_must $ZFS unmount $dataset 143 log_must unmounted $dataset 145 log_must unmounted $dataset 148 log_must unmounted $dataset 150 log_must unmounted $dataset [all …]
|
| H A D | canmount_001_pos.ksh | 108 for dataset in "${dataset_pos[@]}" ; do 110 set_n_check_prop "$value" "canmount" "$dataset" 112 log_mustnot ismounted $dataset 113 log_mustnot $ZFS mount $dataset 114 log_mustnot ismounted $dataset 116 if ! ismounted $dataset ; then 117 log_must $ZFS mount $dataset 119 log_must ismounted $dataset 124 for dataset in "${dataset_neg[@]}" ; do 127 "$dataset" "false" [all …]
|
| /src/tests/sys/cddl/zfs/tests/inheritance/ |
| H A D | inherit_001_pos.ksh | 65 typeset dataset=$1 70 create_pool "$dataset" "$disks" 72 log_must $ZFS create $dataset 73 log_must $ZFS set canmount=off $dataset 75 log_must $ZFS create $dataset 80 list="$list $dataset" 89 typeset dataset=$1 100 log_note "Leaving properties for $dataset unchanged." 102 update_recordsize $dataset $init_code 105 log_note "Leaving properties for $dataset at default values." [all …]
|
| H A D | inherit.kshlib | 35 typeset dataset=$2 37 prop_val=`$ZFS get -H -o source $prop $dataset` 41 "property for dataset $dataset" 101 typeset dataset=$3 103 $ZFS set $prop=$prop_val $dataset 104 check_val=`get_prop $prop $dataset` 107 log_fail "Property $prop of $dataset has value $check_val"\
|
| /src/sys/contrib/openzfs/cmd/ |
| H A D | mount_zfs.c | 52 parse_dataset(const char *target, char **dataset) in parse_dataset() argument 70 strlcpy(*dataset, target, PATH_MAX); in parse_dataset() 80 strlcpy(*dataset, nm, PATH_MAX); in parse_dataset() 112 mtab_update(const char *dataset, const char *mntpoint, const char *type, in mtab_update() argument 119 mnt.mnt_fsname = (char *)dataset; in mtab_update() 131 dataset, strerror(errno)); in mtab_update() 140 dataset, strerror(errno)); in mtab_update() 159 char dataset[PATH_MAX], *pdataset = dataset; in main() local 222 dataset, argv[1], strerror(errno)); in main() 234 "failure.\n"), dataset); in main() [all …]
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_share/ |
| H A D | zfs_share_012_pos.ksh | 47 dataset="$TESTPOOL/$TESTFS" 48 mountpt=$(get_prop mountpoint $dataset) 52 zfs set canmount=on $dataset 53 zfs set sharenfs=off $dataset 68 log_must zfs set canmount=noauto $dataset 69 zfs mount $dataset > /dev/null 2>&1 70 log_must mounted $dataset 71 log_must zfs set sharenfs=on $dataset 75 log_must zfs umount $dataset 76 log_must unmounted $dataset
|
| /src/sys/contrib/openzfs/module/os/freebsd/spl/ |
| H A D | spl_zone.c | 60 zone_dataset_attach(struct ucred *cred, const char *dataset, int jailid) in zone_dataset_attach() argument 71 zd = malloc(sizeof (*zd) + strlen(dataset) + 1, M_ZONES, M_WAITOK); in zone_dataset_attach() 85 if (strcmp(dataset, zd2->zd_dataset) == 0) { in zone_dataset_attach() 102 strcpy(zd->zd_dataset, dataset); in zone_dataset_attach() 113 zone_dataset_detach(struct ucred *cred, const char *dataset, int jailid) in zone_dataset_detach() argument 134 if (strcmp(dataset, zd->zd_dataset) == 0) in zone_dataset_detach() 156 zone_dataset_visible(const char *dataset, int *write) in zone_dataset_visible() argument 164 if (dataset[0] == '\0') in zone_dataset_visible() 184 if (strlen(dataset) >= len && in zone_dataset_visible() 185 memcmp(dataset, zd->zd_dataset, len) == 0 && in zone_dataset_visible() [all …]
|
| /src/sys/contrib/openzfs/module/os/linux/spl/ |
| H A D | spl-zone.c | 142 zone_dataset_lookup(zone_datasets_t *zds, const char *dataset, size_t dsnamelen) in zone_dataset_lookup() argument 149 if (strncmp(zd->zd_dsname, dataset, dsnamelen) == 0) in zone_dataset_lookup() 168 zone_dataset_name_check(const char *dataset, size_t *dsnamelen) in zone_dataset_name_check() argument 171 if (dataset[0] == '\0' || dataset[0] == '/') in zone_dataset_name_check() 174 *dsnamelen = strlen(dataset); in zone_dataset_name_check() 176 if (dataset[*dsnamelen - 1] == '/') in zone_dataset_name_check() 183 zone_dataset_attach(cred_t *cred, const char *dataset, int userns_fd) in zone_dataset_attach() argument 194 if ((error = zone_dataset_name_check(dataset, &dsnamelen)) != 0) in zone_dataset_attach() 213 zd = zone_dataset_lookup(zds, dataset, dsnamelen); in zone_dataset_attach() 222 strlcpy(zd->zd_dsname, dataset, dsnamelen + 1); in zone_dataset_attach() [all …]
|
| /src/sys/contrib/openzfs/etc/systemd/system-generators/ |
| H A D | zfs-mount-generator.c | 206 const char *dataset = strtok_r(line, "\t", &toktmp); in line_worker() local 228 size_t pool_len = strlen(dataset); in line_worker() 229 if ((toktmp = strchr(dataset, '/')) != NULL) in line_worker() 230 pool_len = toktmp - dataset; in line_worker() 231 const char *pool = *(tofree++) = strndup(dataset, pool_len); in line_worker() 235 getpid(), dataset); in line_worker() 279 if (strcmp(dataset, p_encroot) == 0) { in line_worker() 303 getpid(), dataset, p_keyloc); in line_worker() 316 getpid(), dataset, keyloadunit, destdir, in line_worker() 330 dataset, cachefile, wants, after); in line_worker() [all …]
|
| /src/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/ |
| H A D | zfs_rename_002_pos.ksh | 58 set -A dataset "$TESTPOOL/$TESTFS@snapshot" "$TESTPOOL/$TESTFS1" \ 77 rename_dataset ${dataset[i]} ${dataset[i]}-new 78 rename_dataset ${dataset[i]}-new ${dataset[i]} 83 if [[ ${dataset[i]} == *@* ]]; then 84 data=$(snapshot_mountpoint ${dataset[i]})/$TESTFILE0 85 elif [[ ${dataset[i]} == "$TESTPOOL/$TESTVOL" ]] && is_global_zone; then 89 data=$(get_prop mountpoint ${dataset[i]})/$TESTFILE0
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_rename/ |
| H A D | zfs_rename_002_pos.ksh | 52 set -A dataset "$TESTPOOL/$TESTFS@snapshot" "$TESTPOOL/$TESTFS1" \ 71 rename_dataset ${dataset[i]} ${dataset[i]}-new 72 rename_dataset ${dataset[i]}-new ${dataset[i]} 77 if [[ ${dataset[i]} == *@* ]]; then 78 data=$(snapshot_mountpoint ${dataset[i]})/$TESTFILE0 79 elif [[ ${dataset[i]} == "$TESTPOOL/$TESTVOL" ]] && is_global_zone; then 83 data=$(get_prop mountpoint ${dataset[i]})/$TESTFILE0
|
| /src/tests/sys/cddl/zfs/tests/cli_user/zfs_list/ |
| H A D | setup.ksh | 37 for dataset in $DATASETS 39 log_must $ZFS create $TESTPOOL/$TESTFS/$dataset 40 enc=$(get_prop encryption $TESTPOOL/$TESTFS/$dataset) 46 log_must $ZFS snapshot $TESTPOOL/$TESTFS/${dataset}@snap 50 log_must $ZFS create -V 64M $TESTPOOL/$TESTFS/${dataset}-vol 52 log_must $ZFS snapshot $TESTPOOL/$TESTFS/${dataset}-vol@snap 58 $TESTPOOL/$TESTFS/$dataset 59 if datasetexists $TESTPOOL/$TESTFS/${dataset}-vol; then 61 $TESTPOOL/$TESTFS/${dataset}-vol
|
| /src/sys/contrib/openzfs/contrib/dracut/90zfs/ |
| H A D | zfs-lib.sh.in | 22 dataset="${1}" 23 mountpoint="$(zfs get -H -o value mountpoint "${dataset}")" 28 mount -t zfs "${dataset}" "${NEWROOT}" || ret=$? 30 mount -o zfsutil -t zfs "${dataset}" "${NEWROOT}" || ret=$? 33 for_relevant_root_children "${dataset}" _mount_dataset_cb || ret=$? 44 dataset="${1}" 47 zfs list -t filesystem -Ho name,mountpoint,canmount -r "${dataset}" | 50 while IFS="${TAB}" read -r dataset mountpoint canmount; do 56 "${exec}" "${dataset}" "${mountpoint}" || _ret=$?
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/zfs_list/ |
| H A D | setup.ksh | 44 for dataset in $DATASETS 46 log_must zfs create $TESTPOOL/$TESTFS/$dataset 48 log_must zfs snapshot $TESTPOOL/$TESTFS/${dataset}@snap 52 log_must zfs create -V 64M $TESTPOOL/$TESTFS/${dataset}-vol 54 log_must zfs snapshot $TESTPOOL/$TESTFS/${dataset}-vol@snap 60 $TESTPOOL/$TESTFS/$dataset 61 if datasetexists $TESTPOOL/$TESTFS/${dataset}-vol; then 63 $TESTPOOL/$TESTFS/${dataset}-vol
|
| /src/sys/contrib/openzfs/contrib/dracut/ |
| H A D | README.md | 3 2. Set `mountpoint=/` for your root dataset (for compatibility, `legacy` also works, but is not rec… 5 zfs set mountpoint=/ pool/dataset 7 3. Either (a) set `bootfs=` on the pool to the dataset: 9 zpool set bootfs=pool/dataset pool 11 4. Or (b) append `root=zfs:pool/dataset` to your kernel cmdline. 16 If the root dataset contains children with `mountpoint=`s of `/etc`, `/bin`, `/lib*`, or `/usr`, th… 21 1. `root=` | Root dataset is… | 25 `ZFS=pool/dataset` | `pool/dataset` | 26 `zfs:pool/dataset` | *(as above)* | 30 The dataset can be at any depth, including being the pool's root dataset (i.e. `root=zfs:pool`). [all …]
|