/freebsd/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 …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/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 …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/inheritance/ |
H A D | inherit_001_pos.ksh | 55 typeset dataset=$1 60 create_pool "$dataset" "$disks" 62 log_must zfs create $dataset 63 log_must zfs set canmount=off $dataset 65 log_must zfs create $dataset 70 list="$list $dataset" 78 typeset dataset=$1 90 log_note "Leaving properties for $dataset unchanged." 92 update_recordsize $dataset $init_code 95 log_note "Leaving properties for $dataset at default values." [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_set/ |
H A D | readonly_001_pos.ksh | 49 for dataset in $TESTPOOL/$TESTFS $TESTPOOL/$TESTVOL ; do 50 snapexists ${dataset}@$TESTSNAP && \ 51 destroy_dataset ${dataset}@$TESTSNAP -R 57 typeset dataset=$1 59 typeset fstype=$(get_prop type $dataset) 62 typeset mtpt=$(get_prop mountpoint $dataset) 71 typeset dataset=$1 73 typeset fstype=$(get_prop type $dataset) 76 typeset mtpt=$(get_prop mountpoint $dataset) 84 typeset dataset=$1 [all …]
|
H A D | zfs_set_common.kshlib | 53 typeset dataset=$3 59 [[ -n $prop ]] && old_value=$(get_prop $prop $dataset) 62 [[ -z $prop || -z $dataset ]] && \ 65 log_must zfs set $prop=$expect_value $dataset 70 [[ -n $prop ]] && cur_value=$(get_prop $prop $dataset) 76 log_fail "The '$dataset' '$prop' value" \ 79 log_fail "The '$dataset' '$prop' value '$cur_value'" \ 85 log_fail "The '$dataset' '$prop' value '$cur_value'" \ 92 log_mustnot zfs set $prop=$expect_value $dataset 94 [[ -n $prop ]] && cur_value=$(get_prop $prop $dataset) [all …]
|
H A D | snapdir_001_pos.ksh | 50 for dataset in $all_datasets; do 51 snapexists ${dataset}@snap && destroy_dataset ${dataset}@snap 57 typeset dataset=$1 59 typeset mtpt=$(get_prop mountpoint $dataset) 80 for dataset in $all_datasets; do 81 log_must zfs snapshot ${dataset}@snap 86 for dataset in $all_datasets; do 88 if [ "$dataset" = "$TESTPOOL/$TESTVOL" ]; then 90 "$dataset" "false" 93 "$dataset" [all …]
|
H A D | canmount_002_pos.ksh | 120 dataset=${dataset_pos[i]} 121 set_n_check_prop "noauto" "canmount" "$dataset" 122 log_must zfs set mountpoint=$tmpmnt $dataset 123 log_must zfs set sharenfs=on $dataset 124 if ismounted $dataset; then 126 log_must mounted $dataset 127 log_must zfs unmount $dataset 128 log_must unmounted $dataset 130 log_must unmounted $dataset 135 log_must unmounted $dataset [all …]
|
H A D | canmount_001_pos.ksh | 92 for dataset in "${dataset_pos[@]}" ; do 94 set_n_check_prop "$value" "canmount" "$dataset" 96 log_mustnot ismounted $dataset 97 log_mustnot zfs mount $dataset 98 log_mustnot ismounted $dataset 100 if ! ismounted $dataset ; then 101 log_must zfs mount $dataset 103 log_must ismounted $dataset 108 for dataset in "${dataset_neg[@]}" ; do 111 "$dataset" "false" [all …]
|
/freebsd/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 …]
|
/freebsd/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"\
|
/freebsd/sys/contrib/openzfs/cmd/ |
H A D | mount_zfs.c | 51 parse_dataset(const char *target, char **dataset) in parse_dataset() argument 69 strlcpy(*dataset, target, PATH_MAX); in parse_dataset() 79 strlcpy(*dataset, nm, PATH_MAX); in parse_dataset() 111 mtab_update(const char *dataset, const char *mntpoint, const char *type, in mtab_update() argument 118 mnt.mnt_fsname = (char *)dataset; in mtab_update() 130 dataset, strerror(errno)); in mtab_update() 139 dataset, strerror(errno)); in mtab_update() 158 char dataset[PATH_MAX], *pdataset = dataset; in main() local 221 dataset, argv[1], strerror(errno)); in main() 233 "failure.\n"), dataset); in main() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_share/ |
H A D | zfs_share_012_pos.ksh | 46 dataset="$TESTPOOL/$TESTFS" 47 mountpt=$(get_prop mountpoint $dataset) 51 zfs set canmount=on $dataset 52 zfs set sharenfs=off $dataset 67 log_must zfs set canmount=noauto $dataset 68 zfs mount $dataset > /dev/null 2>&1 69 log_must mounted $dataset 70 log_must zfs set sharenfs=on $dataset 74 log_must zfs umount $dataset 75 log_must unmounted $dataset
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
H A D | spl_zone.c | 59 zone_dataset_attach(struct ucred *cred, const char *dataset, int jailid) in zone_dataset_attach() argument 70 zd = malloc(sizeof (*zd) + strlen(dataset) + 1, M_ZONES, M_WAITOK); in zone_dataset_attach() 84 if (strcmp(dataset, zd2->zd_dataset) == 0) { in zone_dataset_attach() 101 strcpy(zd->zd_dataset, dataset); in zone_dataset_attach() 112 zone_dataset_detach(struct ucred *cred, const char *dataset, int jailid) in zone_dataset_detach() argument 133 if (strcmp(dataset, zd->zd_dataset) == 0) in zone_dataset_detach() 155 zone_dataset_visible(const char *dataset, int *write) in zone_dataset_visible() argument 163 if (dataset[0] == '\0') in zone_dataset_visible() 183 if (strlen(dataset) >= len && in zone_dataset_visible() 184 memcmp(dataset, zd->zd_dataset, len) == 0 && in zone_dataset_visible() [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-zone.c | 124 zone_dataset_lookup(zone_datasets_t *zds, const char *dataset, size_t dsnamelen) in zone_dataset_lookup() argument 131 if (strncmp(zd->zd_dsname, dataset, dsnamelen) == 0) in zone_dataset_lookup() 150 zone_dataset_name_check(const char *dataset, size_t *dsnamelen) in zone_dataset_name_check() argument 153 if (dataset[0] == '\0' || dataset[0] == '/') in zone_dataset_name_check() 156 *dsnamelen = strlen(dataset); in zone_dataset_name_check() 158 if (dataset[*dsnamelen - 1] == '/') in zone_dataset_name_check() 165 zone_dataset_attach(cred_t *cred, const char *dataset, int userns_fd) in zone_dataset_attach() argument 176 if ((error = zone_dataset_name_check(dataset, &dsnamelen)) != 0) in zone_dataset_attach() 195 zd = zone_dataset_lookup(zds, dataset, dsnamelen); in zone_dataset_attach() 204 strlcpy(zd->zd_dsname, dataset, dsnamelen + 1); in zone_dataset_attach() [all …]
|
/freebsd/sys/contrib/openzfs/etc/systemd/system-generators/ |
H A D | zfs-mount-generator.c | 205 const char *dataset = strtok_r(line, "\t", &toktmp); in line_worker() local 227 size_t pool_len = strlen(dataset); in line_worker() 228 if ((toktmp = strchr(dataset, '/')) != NULL) in line_worker() 229 pool_len = toktmp - dataset; in line_worker() 230 const char *pool = *(tofree++) = strndup(dataset, pool_len); in line_worker() 234 getpid(), dataset); in line_worker() 278 if (strcmp(dataset, p_encroot) == 0) { in line_worker() 302 getpid(), dataset, p_keyloc); in line_worker() 315 getpid(), dataset, keyloadunit, destdir, in line_worker() 329 dataset, cachefile, wants, after); in line_worker() [all …]
|
/freebsd/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
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_rename/ |
H A D | zfs_rename_002_pos.ksh | 51 set -A dataset "$TESTPOOL/$TESTFS@snapshot" "$TESTPOOL/$TESTFS1" \ 70 rename_dataset ${dataset[i]} ${dataset[i]}-new 71 rename_dataset ${dataset[i]}-new ${dataset[i]} 76 if [[ ${dataset[i]} == *@* ]]; then 77 data=$(snapshot_mountpoint ${dataset[i]})/$TESTFILE0 78 elif [[ ${dataset[i]} == "$TESTPOOL/$TESTVOL" ]] && is_global_zone; then 82 data=$(get_prop mountpoint ${dataset[i]})/$TESTFILE0
|
/freebsd/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
|
/freebsd/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=$?
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/zfs_list/ |
H A D | setup.ksh | 43 for dataset in $DATASETS 45 log_must zfs create $TESTPOOL/$TESTFS/$dataset 47 log_must zfs snapshot $TESTPOOL/$TESTFS/${dataset}@snap 51 log_must zfs create -V 64M $TESTPOOL/$TESTFS/${dataset}-vol 53 log_must zfs snapshot $TESTPOOL/$TESTFS/${dataset}-vol@snap 59 $TESTPOOL/$TESTFS/$dataset 60 if datasetexists $TESTPOOL/$TESTFS/${dataset}-vol; then 62 $TESTPOOL/$TESTFS/${dataset}-vol
|
/freebsd/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 …]
|