编辑
2025-12-11
运维
00

配置 SSH 免密:

shell
ssh-copy-id -i ~/.ssh/id_ed25519.pub <user>@<host>

在目标端配置 sudo 免密:

https://serverfault.com/questions/160581/how-to-setup-passwordless-sudo-on-linux

%wheel ALL=(ALL:ALL) NOPASSWD: ALL

The key is to add it after the last line which says

#includedir /etc/sudoers.d

创建快照:

shell
# sudo btrfs subvolume snapshot -r <fs-path> <snapshot-path> sudo btrfs subvolume snapshot -r / /sysfs_ro

NOTE

这里创建的只读快照,是只有单个 subvolume 的。如果需要迁移多个 subvolume,需要执行多次快照和发送。

编辑
2025-12-11
运维
00

需要安装好:

  • pv
  • zstd

把命令中的 ssh <user>@<host> 替换成目标端:

shell
docker images --format "{{.Repository}}:{{.Tag}}" | grep -v 'none' \ | xargs -I{} bash -c \ "docker save {} | zstd -T0 --fast | pv | ssh <user>@<host> 'zstd -d | docker load'"
编辑
2025-09-06
运维
00

ArchLinux (2025-09-06)启动 GPU 容器失败:

bash
-> % docker run --rm --gpus=all nvidia/cuda:12.1.1-base-ubuntu22.04 nvidia-smi Unable to find image 'nvidia/cuda:12.1.1-base-ubuntu22.04' locally 12.1.1-base-ubuntu22.04: Pulling from nvidia/cuda aece8493d397: Already exists dd4939a04761: Pull complete b0d7cc89b769: Pull complete 1532d9024b9c: Pull complete 04fc8a31fa53: Pull complete Digest: sha256:457a4076c56025f51217bff647ca631c7880ad3dbf546b03728ba98297ebbc22 Status: Downloaded newer image for nvidia/cuda:12.1.1-base-ubuntu22.04 docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy' nvidia-container-cli: ldcache error: process /sbin/ldconfig terminated with signal 9
编辑
2025-08-30
日常
00
编辑
2025-08-28
日常
00

机箱上有一个不可拆卸的螺丝柱顶到了内存插槽的第八槽,导致硬件错误