This repository was archived by the owner on Oct 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataset_properties.rb
More file actions
96 lines (83 loc) · 2.07 KB
/
dataset_properties.rb
File metadata and controls
96 lines (83 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
VpsAdmin::API::DatasetProperties.register do
property :atime do
type :bool
label 'Access time'
desc 'Controls whether the access time for files is updated when they are read'
default false
end
property :compression do
type :bool
label 'Compression'
desc 'Toggle data compression in this dataset'
default true
end
property :recordsize do
type :integer
label 'Record size'
desc 'Specifies a suggested block size for files in the file system'
default 128*1024
validate do |raw|
raw >= 4096 && raw <= 128 * 1024 && (raw & (raw - 1)) == 0
end
end
property :quota do
type :integer
label 'Quota'
desc 'Limits the amount of space a dataset and all its descendants can consume'
default 0
inheritable false
validate do |raw|
raw >= 0
end
end
property :refquota do
type :integer
label 'Reference quota'
desc 'Limits the amount of space a dataset can consume'
default 0
inheritable false
validate do |raw|
raw >= 0
end
end
property :relatime do
type :bool
label 'Relative access time'
desc "Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours"
default false
end
property :sync do
type :string
label 'Sync'
desc 'Controls the behavior of synchronous requests'
default 'standard'
choices %w(standard disabled)
end
property :sharenfs do
type :string
label 'NFS share'
desc 'Controls NFS sharing'
default ''
end
property :used do
type :integer
label 'Used space'
desc 'Amount of space used by dataset'
default 0
editable false
end
property :referenced do
type :integer
label 'Referenced space'
desc 'Amount of space that is accessible to this dataset'
default 0
editable false
end
property :avail do
type :integer
label 'Available space'
desc 'Amount of space left in dataset'
default 0
editable false
end
end