Home
last modified time | relevance | path

Searched refs:dataset (Results 1 – 25 of 183) sorted by relevance

12345678

/freebsd/tests/sys/cddl/zfs/tests/snapused/
H A Dsnapused.kshlib37 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 Dsnapused.kshlib28 typeset dataset=$1
30 if [[ "$(get_prop type $dataset)" == "snapshot" ]]; then
34 used=$(get_prop used $dataset)
35 usedbychildren=$(get_prop usedbychildren $dataset)
36 usedbydataset=$(get_prop usedbydataset $dataset)
37 usedbyrefreservation=$(get_prop usedbyrefreservation $dataset)
38 usedbysnapshots=$(get_prop usedbysnapshots $dataset)
42 log_fail "$dataset: used($used) is not the sum($used_sum) of usedby*"
48 typeset dataset=$1
49 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 Dinherit_001_pos.ksh46 typeset dataset=$1
51 create_pool "$dataset" "$disks"
53 log_must zfs create $dataset
54 log_must zfs set canmount=off $dataset
56 log_must zfs create $dataset
61 list="$list $dataset"
69 typeset dataset=$1
81 log_note "Leaving properties for $dataset unchanged."
83 update_recordsize $dataset $init_code
86 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 Dreadonly_001_pos.ksh40 for dataset in $TESTPOOL/$TESTFS $TESTPOOL/$TESTVOL ; do
41 snapexists ${dataset}@$TESTSNAP && \
42 destroy_dataset ${dataset}@$TESTSNAP -R
48 typeset dataset=$1
50 typeset fstype=$(get_prop type $dataset)
53 typeset mtpt=$(get_prop mountpoint $dataset)
62 typeset dataset=$1
64 typeset fstype=$(get_prop type $dataset)
67 typeset mtpt=$(get_prop mountpoint $dataset)
75 typeset dataset=$1
[all …]
H A Dzfs_set_common.kshlib44 typeset dataset=$3
50 [[ -n $prop ]] && old_value=$(get_prop $prop $dataset)
53 [[ -z $prop || -z $dataset ]] && \
56 log_must zfs set $prop=$expect_value $dataset
61 [[ -n $prop ]] && cur_value=$(get_prop $prop $dataset)
67 log_fail "The '$dataset' '$prop' value" \
70 log_fail "The '$dataset' '$prop' value '$cur_value'" \
76 log_fail "The '$dataset' '$prop' value '$cur_value'" \
83 log_mustnot zfs set $prop=$expect_value $dataset
85 [[ -n $prop ]] && cur_value=$(get_prop $prop $dataset)
[all …]
H A Dsnapdir_001_pos.ksh41 for dataset in $all_datasets; do
42 snapexists ${dataset}@snap && destroy_dataset ${dataset}@snap
48 typeset dataset=$1
50 typeset mtpt=$(get_prop mountpoint $dataset)
71 for dataset in $all_datasets; do
72 log_must zfs snapshot ${dataset}@snap
77 for dataset in $all_datasets; do
79 if [ "$dataset" = "$TESTPOOL/$TESTVOL" ]; then
81 "$dataset" "false"
84 "$dataset"
[all …]
H A Dcanmount_002_pos.ksh111 dataset=${dataset_pos[i]}
112 set_n_check_prop "noauto" "canmount" "$dataset"
113 log_must zfs set mountpoint=$tmpmnt $dataset
114 log_must zfs set sharenfs=on $dataset
115 if ismounted $dataset; then
117 log_must mounted $dataset
118 log_must zfs unmount $dataset
119 log_must unmounted $dataset
121 log_must unmounted $dataset
126 log_must unmounted $dataset
[all …]
H A Dcanmount_001_pos.ksh83 for dataset in "${dataset_pos[@]}" ; do
85 set_n_check_prop "$value" "canmount" "$dataset"
87 log_mustnot ismounted $dataset
88 log_mustnot zfs mount $dataset
89 log_mustnot ismounted $dataset
91 if ! ismounted $dataset ; then
92 log_must zfs mount $dataset
94 log_must ismounted $dataset
99 for dataset in "${dataset_neg[@]}" ; do
102 "$dataset" "false"
[all …]
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_set/
H A Dreadonly_001_pos.ksh58 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 Dsnapdir_001_pos.ksh59 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 Dcanmount_002_pos.ksh136 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 Dcanmount_001_pos.ksh108 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 Dinherit_001_pos.ksh65 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 …]
/freebsd/sys/contrib/openzfs/cmd/
H A Dmount_zfs.c42 parse_dataset(const char *target, char **dataset) in parse_dataset() argument
60 strlcpy(*dataset, target, PATH_MAX); in parse_dataset()
70 strlcpy(*dataset, nm, PATH_MAX); in parse_dataset()
102 mtab_update(const char *dataset, const char *mntpoint, const char *type, in mtab_update() argument
109 mnt.mnt_fsname = (char *)dataset; in mtab_update()
121 dataset, strerror(errno)); in mtab_update()
130 dataset, strerror(errno)); in mtab_update()
149 char dataset[PATH_MAX], *pdataset = dataset; in main() local
212 dataset, argv[1], strerror(errno)); in main()
224 "failure.\n"), dataset); in main()
[all …]
/freebsd/sys/contrib/openzfs/module/os/linux/spl/
H A Dspl-zone.c166 zone_dataset_lookup(zone_datasets_t *zds, const char *dataset, size_t dsnamelen) in zone_dataset_lookup() argument
173 if (strncmp(zd->zd_dsname, dataset, dsnamelen) == 0) in zone_dataset_lookup()
192 zone_dataset_name_check(const char *dataset, size_t *dsnamelen) in zone_dataset_name_check() argument
195 if (dataset[0] == '\0' || dataset[0] == '/') in zone_dataset_name_check()
198 *dsnamelen = strlen(dataset); in zone_dataset_name_check()
200 if (dataset[*dsnamelen - 1] == '/') in zone_dataset_name_check()
207 zone_dataset_attach(cred_t *cred, const char *dataset, int userns_fd) in zone_dataset_attach() argument
218 if ((error = zone_dataset_name_check(dataset, &dsnamelen)) != 0) in zone_dataset_attach()
237 zd = zone_dataset_lookup(zds, dataset, dsnamelen); in zone_dataset_attach()
246 strlcpy(zd->zd_dsname, dataset, dsnamelen + 1); in zone_dataset_attach()
[all …]
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/
H A Dspl_zone.c60 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 …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_share/
H A Dzfs_share_012_pos.ksh37 dataset="$TESTPOOL/$TESTFS"
38 mountpt=$(get_prop mountpoint $dataset)
42 zfs set canmount=on $dataset
43 zfs set sharenfs=off $dataset
58 log_must zfs set canmount=noauto $dataset
59 zfs mount $dataset > /dev/null 2>&1
60 log_must mounted $dataset
61 log_must zfs set sharenfs=on $dataset
65 log_must zfs umount $dataset
66 log_must unmounted $dataset
/freebsd/sys/contrib/openzfs/etc/systemd/system-generators/
H A Dzfs-mount-generator.c207 const char *dataset = strtok_r(line, "\t", &toktmp); in line_worker() local
229 size_t pool_len = strlen(dataset); in line_worker()
230 if ((toktmp2 = strchr(dataset, '/')) != NULL) in line_worker()
231 pool_len = toktmp2 - dataset; in line_worker()
232 const char *pool = *(tofree++) = strndup(dataset, pool_len); in line_worker()
236 getpid(), dataset); in line_worker()
280 if (strcmp(dataset, p_encroot) == 0) { in line_worker()
304 getpid(), dataset, p_keyloc); in line_worker()
317 getpid(), dataset, keyloadunit, destdir, in line_worker()
331 dataset, cachefile, wants, after); in line_worker()
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zoned_uid/
H A Dzoned_uid_common.kshlib35 typeset dataset=$1
36 get_prop zoned_uid "$dataset"
44 typeset dataset=$1
46 zfs set zoned_uid="$uid" "$dataset"
54 typeset dataset=$1
55 zfs set zoned_uid=0 "$dataset"
204 typeset dataset=$1
207 zfs allow -u "$uid" "$perms" "$dataset"
219 typeset dataset=$1
223 zfs unallow -u "$uid" "$perms" "$dataset"
[all …]
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/
H A Dzfs_rename_002_pos.ksh58 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 Dzfs_rename_002_pos.ksh42 set -A dataset "$TESTPOOL/$TESTFS@snapshot" "$TESTPOOL/$TESTFS1" \
61 rename_dataset ${dataset[i]} ${dataset[i]}-new
62 rename_dataset ${dataset[i]}-new ${dataset[i]}
67 if [[ ${dataset[i]} == *@* ]]; then
68 data=$(snapshot_mountpoint ${dataset[i]})/$TESTFILE0
69 elif [[ ${dataset[i]} == "$TESTPOOL/$TESTVOL" ]] && is_global_zone; then
73 data=$(get_prop mountpoint ${dataset[i]})/$TESTFILE0
/freebsd/tests/sys/cddl/zfs/tests/cli_user/zfs_list/
H A Dsetup.ksh37 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 Dzfs-lib.sh.in22 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/contrib/dracut/
H A DREADME.md3 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 …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_user/zfs_list/
H A Dsetup.ksh34 for dataset in $DATASETS
36 log_must zfs create $TESTPOOL/$TESTFS/$dataset
38 log_must zfs snapshot $TESTPOOL/$TESTFS/${dataset}@snap
42 log_must zfs create -V 64M $TESTPOOL/$TESTFS/${dataset}-vol
44 log_must zfs snapshot $TESTPOOL/$TESTFS/${dataset}-vol@snap
50 $TESTPOOL/$TESTFS/$dataset
51 if datasetexists $TESTPOOL/$TESTFS/${dataset}-vol; then
53 $TESTPOOL/$TESTFS/${dataset}-vol

12345678