Estoy ejecutando Linux Mint 20.3 con ZFS (incluido para /
). Hasta hace muy poco, cada vez que instalaba o eliminaba paquetes, también creaba una instantánea para poder seleccionarla al arrancar y revertir un cambio que podría haber dañado el sistema.
Pero parece que hay una limitación de este sistema, ya que no puede manejar una gran cantidad (más de 1200) de instantáneas. Ya no puedo encontrar el problema, pero me sugirió ejecutar for dataset in $(zfs list -t snapshot -o name | grep @autozsys); do sudo zfs destroy "$dataset"; done
para eliminar la mayoría de las instantáneas.
Como no necesitaba estas instantáneas más antiguas, lo intenté. No pude eliminar algunos porque eran clones de otros y sin saber si esto me haría perder datos activos, lo dejé así.
Más tarde supe sobre el zsysctl
comando para administrar instantáneas... Y parece que rompí mi sistema al no usar ese comando sino zfs destroy
directamente.
Ahora, cada vez que yo apt install
o apt remove
, aparece este error (después de una pausa de 30 segundos):ERROR Service took too long to respond. Disconnecting client.
Creo que zsysctl
está parcialmente roto porque la ejecución zsysctl show
da como resultado la última entrada en las listas bpool
y rpool
tiene una fecha 0001-01-01 00:00:00
que obviamente es incorrecta:
$ zsysctl show
Name: rpool/ROOT/ubuntu_uyv8gh
ZSys: true
Last Used: current
History:
- Name: rpool/ROOT/ubuntu_uyv8gh@autozsys_nma9lm
Created on: 2022-11-17 17:43:38
- Name: rpool/ROOT/ubuntu_uyv8gh@autozsys_1ayzvs
Created on: 2022-11-14 13:22:37
- Name: rpool/ROOT/ubuntu_uyv8gh@autozsys_yv8nrd
Created on: 2022-11-11 17:13:10
- Name: rpool/ROOT/ubuntu_uyv8gh@autozsys_yu0btn
Created on: 2022-02-15 15:58:44
- Name: rpool/ROOT/ubuntu_6xf31g
Created on: 2021-10-22 17:13:50
Users:
- Name: pierre
History:
- rpool/USERDATA/pierre_gg46xm@autozsys_nma9lm (2022-11-17 17:43:40)
- rpool/USERDATA/pierre_gg46xm@autozsys_m6wubi (2022-11-17 14:29:58)
- rpool/USERDATA/pierre_gg46xm@autozsys_17okng (2022-11-17 11:29:23)
- rpool/USERDATA/pierre_gg46xm@autozsys_dgvgfz (2022-11-17 10:29:19)
- rpool/USERDATA/pierre_gg46xm@autozsys_5mk4hd (2022-11-16 15:55:03)
- rpool/USERDATA/pierre_gg46xm@autozsys_z90d2e (2022-11-16 14:54:03)
- rpool/USERDATA/pierre_gg46xm@autozsys_pfutl5 (2022-11-16 13:54:03)
- rpool/USERDATA/pierre_gg46xm@autozsys_5dfwde (2022-11-16 12:42:58)
- rpool/USERDATA/pierre_gg46xm@autozsys_iuusno (2022-11-16 11:42:54)
- rpool/USERDATA/pierre_gg46xm@autozsys_zzrd7w (2022-11-16 10:41:57)
- rpool/USERDATA/pierre_gg46xm@autozsys_d4kkrw (2022-11-16 09:41:55)
- rpool/USERDATA/pierre_gg46xm@autozsys_2ws9fj (2022-11-15 16:06:23)
- rpool/USERDATA/pierre_gg46xm@autozsys_cfb7iu (2022-11-15 15:06:23)
- rpool/USERDATA/pierre_gg46xm@autozsys_3rcqfi (2022-11-15 13:35:17)
- rpool/USERDATA/pierre_gg46xm@autozsys_56mb7s (2022-11-15 12:07:32)
- rpool/USERDATA/pierre_gg46xm@autozsys_9b068o (2022-11-15 11:06:38)
- rpool/USERDATA/pierre_gg46xm@autozsys_o610qz (2022-11-15 10:06:35)
- rpool/USERDATA/pierre_gg46xm@autozsys_fw4jbj (2022-11-15 08:38:21)
- rpool/USERDATA/pierre_gg46xm@autozsys_j9ow55 (2022-11-14 17:00:43)
- rpool/USERDATA/pierre_gg46xm@autozsys_mfc8hk (2022-11-14 15:59:43)
- rpool/USERDATA/pierre_gg46xm@autozsys_1ayzvs (2022-11-14 13:22:39)
- rpool/USERDATA/pierre_gg46xm@autozsys_y6xypr (2022-11-14 12:57:47)
- rpool/USERDATA/pierre_gg46xm@autozsys_o0aj49 (2022-11-14 11:57:46)
- rpool/USERDATA/pierre_gg46xm@autozsys_iljt6z (2022-11-14 10:57:43)
- rpool/USERDATA/pierre_gg46xm@autozsys_2fmmg5 (2022-11-14 09:56:43)
- rpool/USERDATA/pierre_gg46xm@autozsys_lxkohx (2022-11-14 08:55:51)
- rpool/USERDATA/pierre_gg46xm@autozsys_czv8zx (2022-11-13 16:58:50)
- rpool/USERDATA/pierre_gg46xm@autozsys_8kl96y (2022-11-13 15:57:50)
- rpool/USERDATA/pierre_gg46xm@autozsys_5ks5h8 (2022-11-13 14:56:50)
- rpool/USERDATA/pierre_gg46xm@autozsys_5m7wwk (2022-11-13 13:56:50)
- rpool/USERDATA/pierre_gg46xm@autozsys_40udn4 (2022-11-13 12:28:40)
- rpool/USERDATA/pierre_gg46xm@autozsys_uagprp (2022-11-13 11:28:39)
- rpool/USERDATA/pierre_gg46xm@autozsys_4vbncy (2022-11-13 10:28:39)
- rpool/USERDATA/pierre_gg46xm@autozsys_9buhaa (2022-11-13 09:26:59)
- rpool/USERDATA/pierre_gg46xm@autozsys_92de9m (2022-11-12 14:48:45)
- rpool/USERDATA/pierre_gg46xm@autozsys_x5vgcm (2022-11-12 12:00:12)
- rpool/USERDATA/pierre_gg46xm@autozsys_pm05qo (2022-11-12 10:43:35)
- rpool/USERDATA/pierre_gg46xm@autozsys_kxd0z1 (2022-11-12 09:43:32)
- rpool/USERDATA/pierre_gg46xm@autozsys_welapl (2022-11-11 17:18:27)
- rpool/USERDATA/pierre_gg46xm@autozsys_yv8nrd (2022-11-11 17:13:11)
- rpool/USERDATA/pierre_gg46xm-rpool.ROOT.ubuntu-6xf31g (2022-11-09 07:17:16)
- rpool/USERDATA/pierre_gg46xm@autozsys_yu0btn (2022-02-15 15:58:45)
- rpool/USERDATA/pierre_hntkn5 (0001-01-01 00:00:00)
- Name: root
History:
- rpool/USERDATA/root_gg46xm@autozsys_nma9lm (2022-11-17 17:43:40)
- rpool/USERDATA/root_gg46xm@autozsys_1ayzvs (2022-11-14 13:22:39)
- rpool/USERDATA/root_gg46xm@autozsys_yv8nrd (2022-11-11 17:13:11)
- rpool/USERDATA/root_gg46xm-rpool.ROOT.ubuntu-6xf31g (2022-11-09 07:17:16)
- rpool/USERDATA/root_gg46xm@autozsys_yu0btn (2022-02-15 15:58:45)
- rpool/USERDATA/root_hntkn5 (0001-01-01 00:00:00)
Correr zsysctl save -vv
no da mucha más información:
$ zsysctl save -vv
DEBUG /zsys.Zsys/SaveUserState() call logged as [e560ff96:3c3c6ace]
DEBUG Check if grpc request peer is authorized
DEBUG Polkit call result, authorized: true
DEBUG Didn't receive any information from service in 30s
ERROR Service took too long to respond. Disconnecting client.
¿Cómo me recupero de este estado parcialmente roto?
Respuesta1
Puede eliminar varias instantáneas utilizando %
.
Ejemplo:
zfs destroy rpool/USERDATA/pierre_gg46xm@autozsys_nma9lm%autozsys_yv8nrd
Esto elimina todo deautozsys_nma9lma través deautozsys_yv8nrd.
Si tiene clones entremezclados entre las más de 1200 instantáneas, entonces puede valer la pena reevaluar la configuración o separar sus datos en grupos de datos específicos.
Veo que has usado el zsysctl
. No estoy familiarizado con él, pero ZFS ya está optimizado con dos comandos principales; zfs
y zpool
.
No parece ser de mucha utilidad usarlo zsysctl
aquí porque definitivamente complica su configuración. Puede ser una abstracción innecesaria yno tiene futuro en la plataforma. Considere eliminarlo.
zsys se elimina de ubuntu #235
zsys no puede manejar grandes cantidades de instantáneas #224
(Yo diría lo mismo para la raíz de ZFS y la gran cantidad de instantáneas)