File tree 3 files changed +46
-5
lines changed
3 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 244
244
type = "topology" ;
245
245
vdev = [
246
246
{
247
- mode = "mirror" ;
248
- members = [ "data1" "data2" ] ;
247
+ # This syntax expects a disk called 'data3' with a gpt partition called 'zfs'.
248
+ members = [ "data1" ] ;
249
+ # It's also possible to use the full path of the device or partition
250
+ # members = [ "/dev/disk/by-id/wwn-0x5000c500af8b2a14" ];
249
251
}
250
252
{
251
- members = [ "data3" ] ;
253
+ mode = "mirror" ;
254
+ members = [ "data2" "data3" ] ;
252
255
}
253
256
] ;
254
257
spare = [ "spare" ] ;
Original file line number Diff line number Diff line change 25
25
} ;
26
26
mode = lib . mkOption {
27
27
default = "" ;
28
+ example = {
29
+ mode = {
30
+ topology = {
31
+ type = "topology" ;
32
+ vdev = [
33
+ {
34
+ # Members can be either specified by a full path or by a disk name
35
+ # This is example uses the full path
36
+ members = [ "/dev/disk/by-id/wwn-0x5000c500af8b2a14" ] ;
37
+ }
38
+ ] ;
39
+ log = [
40
+ {
41
+ # Example using gpt partition labels
42
+ # This expects an disk called `ssd` with a gpt partition called `zfs`
43
+ # disko.devices.disk.ssd = {
44
+ # type = "disk";
45
+ # device = "/dev/nvme0n1";
46
+ # content = {
47
+ # type = "gpt";
48
+ # partitions = {
49
+ # zfs = {
50
+ # size = "100%";
51
+ # content = {
52
+ # type = "zfs";
53
+ # # use your own pool name here
54
+ # pool = "zroot";
55
+ # };
56
+ # };
57
+ # };
58
+ # };
59
+ # };
60
+ members = [ "ssd" ] ;
61
+ }
62
+ ] ;
63
+ } ;
64
+ } ;
65
+ } ;
28
66
type = ( lib . types . oneOf [
29
67
( lib . types . enum modeOptions )
30
68
( lib . types . attrsOf ( diskoLib . subType {
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ diskoLib.testLib.makeDiskoTest {
57
57
vdev = ""
58
58
actual.sort()
59
59
expected=sorted([
60
- 'zroot /dev/disk/by-partlabel/disk-data3-zfs',
61
- 'zroot mirror /dev/disk/by-partlabel/disk-data1-zfs',
60
+ 'zroot /dev/disk/by-partlabel/disk-data1-zfs',
62
61
'zroot mirror /dev/disk/by-partlabel/disk-data2-zfs',
62
+ 'zroot mirror /dev/disk/by-partlabel/disk-data3-zfs',
63
63
'dedup /dev/disk/by-partlabel/disk-dedup3-zfs',
64
64
'dedup mirror /dev/disk/by-partlabel/disk-dedup1-zfs',
65
65
'dedup mirror /dev/disk/by-partlabel/disk-dedup2-zfs',
You can’t perform that action at this time.
0 commit comments