You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crds/doc-ru-nfsstorageclass.yaml
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,18 @@ spec:
75
75
matchExpressions:
76
76
description: |
77
77
Список сложных условий выбора узлов. Каждое условие задаёт ключ, оператор и, при необходимости, значения для фильтрации узлов на основе их меток или других полей.
78
+
volumeCleanup:
79
+
description: |
80
+
**Функция доступна в Enterprise Edition.**
81
+
82
+
Метод очистки тома после удаления PV.
83
+
По умолчанию драйвер NFS CSI удаляет каталог, созданный для PV на сервере NFS, не выполняя никакой очистки данных
84
+
Если параметр `volumeCleanup` задан, драйвер удалит каждый файл в каталоге PV.
85
+
86
+
Допустимые значения параметра:
87
+
- **Discard** — используется функция `Discard`(trim) файловой системы для освобождения блоков данных (Эта опция доступна только в том случае, если она поддерживается, например, в NFSv4.2.).
88
+
- **RandomFillSinglePass** — перед удалением содержимое каждого файла перезаписывается случайными данными один раз. Реализуется путем вызова утилиты `shred`.
89
+
- **RandomFillThreePass** — перед удалением содержимое каждого файла перезаписывается случайными данными три раза. Реализуется путем вызова утилиты `shred`.
message: "Discard mode is only available when connection.nfsVersion is '4.2'."
42
47
properties:
43
48
connection:
44
49
type: object
@@ -191,6 +196,24 @@ spec:
191
196
type: array
192
197
items:
193
198
type: string
199
+
volumeCleanup:
200
+
type: string
201
+
x-doc-d8editions: [ee,fe]
202
+
description: |
203
+
**This feature is available in Enterprise Edition.**
204
+
205
+
Specifies the cleanup method to be applied to the PV’s subdirectory content before deletion.
206
+
By default, the NFS CSI driver simply deletes the directory created for the Persistent Volume (PV) on the NFS server without performing any data cleanup.
207
+
When volumeCleanup is enabled, the driver will erase each file in the PV directory.
208
+
209
+
Valid options are:
210
+
- **Discard**: Uses the filesystem’s discard (trim) functionality to free data blocks. (This option is available only when supported, for example with NFSv4.2.)
211
+
- **RandomFillSinglePass**: Overwrites the content of each file once with random data before deletion. This is implemented by invoking the utility `shred`.
212
+
- **RandomFillThreePass**: Overwrites the content of each file three times with random data before deletion. This is implemented by invoking the utility `shred`.
Copy file name to clipboardExpand all lines: docs/README.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,3 +81,49 @@ A directory `<directory from share>/<PV name>` will be created for each PV.
81
81
### Checking module health
82
82
83
83
You can verify the functionality of the module using the instructions [in FAQ](./faq.html#how-to-check-module-health).
84
+
85
+
### Selects the method to clean the volume before deleting the PV
86
+
87
+
Files with user data may remain on the volume to be deleted. These files will be deleted and will not be accessible to other users via NFS.
88
+
89
+
However, the deleted files' data may be available to other clients if the server grants block-level access to its storage.
90
+
91
+
The `volumeCleanup` parameter will help you choose how to clean the volume before deleting it.
92
+
93
+
> **Caution.** This option does not affect files already deleted by the client application.
94
+
95
+
> **Caution.** This option affects only commands sent via the NFS protocol. The server-side execution of these commands is defined by:
96
+
>
97
+
> - NFS server service;
98
+
> - the file system;
99
+
> - the level of block devices and their virtualization (e.g. LVM);
100
+
> - the physical devices themselves.
101
+
>
102
+
> Make sure the server is trusted. Do not send sensitive data to servers that you are not sure of.
103
+
104
+
#### `SinglePass` method
105
+
106
+
Used if `volumeCleanup` is set to `RandomFillSinglePass`.
107
+
108
+
The contents of the files are overwritten with a random sequence before deletion. The random sequence is transmitted over the network.
109
+
110
+
#### `ThreePass` method
111
+
112
+
Used if `volumeCleanup` is set to `RandomFillThreePass`.
113
+
114
+
The contents of the files are overwritten three times with a random sequence before deletion. The three random sequences are transmitted over the network.
115
+
116
+
#### `Discard` method
117
+
118
+
Used if `volumeCleanup` is set to `Discard`.
119
+
120
+
Many file systems implement support for solid-state drives, allowing the space occupied by a file to be freed at the block level without writing new data to extend the life of the solid-state drive. However, not all solid-state drives guarantee that the freed block data is inaccessible.
121
+
122
+
If `volumeCleanup` is set to `Discard`, file contents are marked as free via the `falloc` system call with the `FALLOC_FL_PUNCH_HOLE` flag. The file system will free the blocks fully used by the file, via the `blkdiscard` call, and the remaining space will be overwritten with zeros.
123
+
124
+
Advantages of this method:
125
+
126
+
- the amount of traffic does not depend on the size of the files, only on the number of files;
127
+
- the method can make old data unavailable in some server configurations;
0 commit comments