dataSource:
name: volumesnapshot-test-pvc-nfs-retain
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
Error: could not get snapshot snapshot-abb03b32-432c-4c63-b550-a571050b787e: 404 Not Found
command terminated with exit code 1
์จ. Tridentctl ์ค๋
์ท ์ญ์
Error: could not delete snapshot snapshot-abb03b32-432c-4c63-b550-a571050b787e: 404 Not Found
command terminated with exit code 1
์ด๊ฒ์ด ๋ฒ๊ทธ๋ผ๋ฉด ์ดํด๋ณด์ญ์์ค. ๊ทธ๋ ์ง ์์ผ๋ฉด ์ผ์ง์ฐฝ์ ๋ง์ ์ค๋ ์ท ๊ฐ์ฒด๊ฐ ๋จ๊ฒ ๋ฉ๋๋ค. deletePolicy is Retain?์ ์ฌ์ฉํ์ฌ trident ์ค๋ ์ท ๊ฐ์ฒด๋ฅผ ์ ๊ฑฐํ๋ ๋ฐฉ๋ฒ์ ๋ํ ์ง์นจ/์ง์นจ์ ์ง๊ธ ์ ๊ณตํ์ญ์์ค.
dataSource:
name: volumesnapshot-test-pvc-nfs-delete
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
Trident Snapshot ๊ฐ์ฒด๋ deleteRetain: Delete ๋ก ์ฑ๊ณต์ ์ผ๋ก ์ญ์ ๋์์ต๋๋ค.
์ด ๊ฒฝ์ฐ volumenapshots.snapshot.storage.k8s.io ์ญ์ ํ ์๋ ์ ๊ฑฐ๋ฉ๋๋ค.
ํ๊ฒฝ
๋ฌธ์ ๋ฅผ ์ฌํํ๋ ๋ฐ ๋์์ด ๋๋๋ก ํ๊ฒฝ์ ๋ํ ์ ํํ ์ ๋ณด๋ฅผ ์ ๊ณตํ์ธ์.
์๋ ํ์ธ์ @gnarl , ์ด๊ฒ์ ๋ํ ์ ๋ฐ์ดํธ๊ฐ ์์ต๋๊น?
์ด ๋ฌธ์ ๋ ์ด๋ฌํ ํ๋ซํผ์ ์ต๋ ์ค๋ ์ท ์๊ฐ ONTAP๋ณด๋ค ์ ๊ธฐ ๋๋ฌธ์ Element OS(์๋ง๋ E-Series๋ ๋ง์ฐฌ๊ฐ์ง)์ ๋ ํฐ ์ํฅ์ ๋ฏธ์นฉ๋๋ค. ONTAP์์๋ "์ ์ผํ" ๋ฌธ์ ๊ฐ ๋จ์ ์ค๋ ์ท์ด๊ณ Element OS์์๋ ์ค๋ ์ท ๋ณดํธ๊ฐ ์๋์ ๋ฉ์ถฅ๋๋ค. ์๋ ๋ง๋ฃ๊ฐ ์์ผ๋ฉด ์ผ ์ด๋ด์ ์ต๋ ์ค๋ ์ท ์์ ๋๋ฌํ๊ธฐ ๋๋ฌธ์ ๋๋ค.
@khankth ,
์ฌ๊ธฐ์ ๋ฌธ์ ๋ volumeSnapshotContent์ "Retain"์ ์ญ์ ์ ์ฑ ์ด ์๊ณ ๋ชฉํ๊ฐ ์ค์ ๋ก ์ค๋ ์ท์ ์ญ์ ํ๋ ๊ฒ์ด๋ผ๋ฉด volumeSnapshot ๋ฐ volumeSnapshotConent๋ฅผ ์ญ์ ํ๊ธฐ ์ ์ "Delete"๋ก ์ ๋ฐ์ดํธํด์ผ ํ๋ค๋ ๊ฒ์ ๋๋ค. ์ด๋ reclaimPolicy๊ฐ "์ ์ง"๋ก ์ค์ ๋ PV ์ญ์ ๊ฐ ์๋ํ๋ ๋ฐฉ์๊ณผ ๋ค๋ฆ ๋๋ค. ์ด ๊ฒฝ์ฐ K8S๋ PV๋ฅผ ์ฑ๊ณต์ ์ผ๋ก ์ญ์ ํ๊ธฐ ์ ์ PV ํธ์ง์ ์ค์ ํ๊ณ reclaimPolicy๋ฅผ "Delete"๋ก ๋ณ๊ฒฝํ๋๋ก ๊ฐ์ ํฉ๋๋ค.
์ด ์ฌ์ฉ ์ฌ๋ก๋ฅผ ์ฒ๋ฆฌํ๋ ๋ฐฉ๋ฒ์ ๋ํด ํ๊ณผ ์ด์ผ๊ธฐํ๊ฒ ์ต๋๋ค.
@khankth tridentctl
๋ก ์ค๋
์ท์ ์ญ์ ํ ๋ ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํด์ผ ํฉ๋๋ค.
tridentctl delete snapshot -h
Delete one or more volume snapshots from Trident
Usage:
tridentctl delete snapshot <volume/snapshot> [<volume/snapshot>...] [flags]
Aliases:
snapshot, s, snap, snapshots
Flags:
--all Delete all snapshots
-h, --help help for snapshot
--volume string Delete all snapshots in volume
Global Flags:
-d, --debug Debug output
-n, --namespace string Namespace of Trident deployment
-o, --output string Output format. One of json|yaml|name|wide|ps (default)
-s, --server string Address/port of Trident REST interface
# tridentctl delete snapshot snapshot-9c214e0f-547d-41b5-923d-a075bcc97d8a pvc-fb6eabff-93b4-4df5-b5ab-943bcda44ad8 -n trident
Error: could not delete snapshot snapshot-9c214e0f-547d-41b5-923d-a075bcc97d8a: 404 Not Found
command terminated with exit code 1
# tridentctl delete snapshot pvc-fb6eabff-93b4-4df5-b5ab-943bcda44ad8/snapshot-9c214e0f-547d-41b5-923d-a075bcc97d8a -n trident
# tridentctl get snapshot -n trident
+------+--------+
| NAME | VOLUME |
+------+--------+
+------+--------+
๋ํ ๊ทํ๊ฐ ์ง์ ํ ๋ค๋ฅธ ์ค๋ฅ [ tridentctl get snapshot
๋ ์ค๋
์ท์ ์ธ๋ถ ์ ๋ณด๋ฅผ ๋ฐํํ์ง ์์ต๋๋ค]๋ ์ด ์ปค๋ฐ ์์ v21.04๋ก ์์ ๋์์ต๋๋ค.