В контейнере не стало свободного пространства. Также есть расхождение в дисковом пространстве контейнера (lxc info cntn1 - 100Gb) и внутри контейнера (df -h - 50Gb)
lxc info cntn1
root:
path: /
pool: lxd
size: 110GB
type: disk
df -h
Filesystem Size Used Avail Use% Mounted on
lxd/containers/cntn1 59G 50G 9.4G 85% /
Вначале добавил root size плюс 10Gb
lxc config device set abc104 root size 110GB
Но через некоторое время места опять стало мало.
После форума нашел, что причина - снепшоты
zfs list -o space | grep cntn1
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV
USEDCHILD
lxd/containers/cntn1 6.98G 103G 53.3G 49.7G 0B 0B
lxd/snapshots/cntn1 1.05T 590K 0B 24K 0B 566K
lxd/snapshots/cntn1/cntn1_snap 1.05T 107K 0B 107K 0B 0B
lxd/snapshots/cntn1/stable_migrate 1.05T 459K 0B 459K 0B 0B
zfs list | grep cntn1
NAME USED AVAIL REFER MOUNTPOINT
lxd/containers/cntn1 104G 6.46G 50.2G /var/lib/lxd/storage-
pools/lxd/containers/cntn1
lxd/snapshots/cntn1 590K 1.05T 24K /lxd/snapshots/cntn1
lxd/snapshots/cntn1/cntn1_snap 107K 1.05T 22.7G /var/lib/lxd/storage-pools/lxd/snapshots/cntn1/cntn1_snap
lxd/snapshots/cntn1/stable_migrate 459K 1.05T 41.4G /var/lib/lxd/storage-pools/lxd/snapshots/cntn1/stable_migrate
Но удаление снепшота не помогло
zfs destroy lxd/snapshots/cntn1/cntn1_snap
zfs list | grep cntn1
NAME USED AVAIL REFER MOUNTPOINT
lxd/containers/cntn1 103G 6.59G 50.3G /var/lib/lxd/storage-pools/lxd/containers/cntn1
lxd/snapshots/cntn1 483K 1.05T 24K /lxd/snapshots/cntn1
lxd/snapshots/cntn1/stable_migrate 459K 1.05T 41.4G /var/lib/lxd/storage-pools/lxd/snapshots/cntn1/stable_migrate
lxc config device set abc104 root size 120GB
zfs set refreservation=10g lxd/containers/cntn1
zfs get refreservation lxd/containers/abc104
NAME PROPERTY VALUE SOURCE
lxd/containers/abc104 refreservation 10G local
zfs list | grep cntn1
NAME USED AVAIL REFER MOUNTPOINT
lxd/containers/cntn1 110G 16.9G 49.9G /var/lib/lxd/storage-pools/lxd/containers/cntn1
lxd/snapshots/cntn1 483K 1.05T 24K /lxd/snapshots/cntn1
lxd/snapshots/cntn1/stable_migrate 459K 1.05T 41.4G /var/lib/lxd/storage-pools/lxd/snapshots/cntn1/stable
df -h
Filesystem Size Used Avail Use% Mounted on
lxd/containers/abc104 67G 51G 17G 76% /
df -h
Filesystem Size Used Avail Use% Mounted on
lxd/containers/abc104 67G 51G 17G 76% /
Комментариев нет:
Отправить комментарий