Lines Matching refs:md

11 md=$(mdconfig -s40m) || exit 1
12 unit=${md#md}
21 } | disklabel -R $md /dev/stdin
27 echo ok $i - "Sized ${md}a to 10m"
31 geli init -Bnone -PKtmp.key ${md}a || echo -n "not "
32 echo ok $i - "Initialised geli on ${md}a"
34 geli attach -pk tmp.key ${md}a || echo -n "not "
35 echo ok $i - "Attached ${md}a as ${md}a.eli"
38 newfs -U ${md}a.eli >/dev/null || echo -n "not "
39 echo ok $i - "Initialised the filesystem on ${md}a.eli"
41 out=$(fsck -tufs -y ${md}a.eli)
43 echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \
51 geli backup ${md}a tmp.meta || echo -n "not "
52 echo ok $i - "Backed up ${md}a metadata"
55 geli detach ${md}a.eli || echo -n "not "
56 echo ok $i - "Detached ${md}a.eli"
60 echo ok $i - "Sized ${md}a to 20m"
62 geli attach -pktmp.key ${md}a && echo -n "not "
63 echo ok $i - "Attaching ${md}a fails after resizing the consumer"
66 geli restore tmp.meta ${md}a && echo -n "not "
67 echo ok $i - "Restoring metadata on ${md}a.eli fails without -f"
69 geli restore -f tmp.meta ${md}a || echo -n "not "
70 echo ok $i - "Restoring metadata on ${md}a.eli can be forced"
73 geli attach -pktmp.key ${md}a || echo -n "not "
74 echo ok $i - "Attaching ${md}a is now possible"
77 growfs -y ${md}a.eli >/dev/null || echo -n "not "
78 echo ok $i - "Extended the filesystem on ${md}a.eli"
81 out=$(fsck -tufs -y ${md}a.eli)
83 echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \
90 geli detach ${md}a.eli || echo -n "not "
91 echo ok $i - "Detached ${md}a.eli"
95 echo ok $i - "Sized ${md}a to 30m"
98 geli resize -s20m ${md}a || echo -n "not "
101 geli resize -s20m ${md}a && echo -n "not "
105 geli attach -pktmp.key ${md}a || echo -n "not "
106 echo ok $i - "Attaching ${md}a works ok"
109 growfs -y ${md}a.eli >/dev/null || echo -n "not "
110 echo ok $i - "Extended the filesystem on ${md}a.eli"
113 out=$(fsck -tufs -y ${md}a.eli)
115 echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \
119 geli detach ${md}a.eli
120 gpart destroy -F $md >/dev/null
123 # Verify that the man page example works, changing ada0 to $md,
127 gpart create -s GPT $md || echo -n "not "
128 echo ok $i - "Installed a GPT on ${md}"
130 gpart add -s 20m -t freebsd-ufs -i 1 $md || echo -n "not "
133 geli init -B none -K tmp.key -P ${md}p1 || echo -n "not "
134 echo ok $i - "Initialised geli on ${md}p1"
136 gpart resize -s 30m -i 1 $md || echo -n "not "
137 echo ok $i - "Resized partition ${md}p1 to 30m"
139 geli resize -s 20m ${md}p1 || echo -n "not "
140 echo ok $i - "Resized geli on ${md}p1 to 30m"
142 geli attach -k tmp.key -p ${md}p1 || echo -n "not "
143 echo ok $i - "Attached ${md}p1.eli"
146 geli detach ${md}p1.eli