Skip to content

Instantly share code, notes, and snippets.

@unchama
Last active February 14, 2025 13:39
Show Gist options
  • Save unchama/0922fce3c490e46b6f9e822f4377853e to your computer and use it in GitHub Desktop.
Save unchama/0922fce3c490e46b6f9e822f4377853e to your computer and use it in GitHub Desktop.
run proxmox-backup-client at container で Error: Operation not supported (os error 95) が出た時のメモ

run proxmox-backup-client at container で Error: Operation not supported (os error 95) が出た時のメモ

結論

  • containerd環境下において proxmox-backup-client backup data.pxar:{バックアップ対象ディレクトリ} ... で取得したファイルレベルバックアップを proxmox-backup-client restore ... でリストアすると Error: Operation not supported (os error 95) がでる
  • strace によると、リストア先ディレクトリに関わらず /tmp//root/.cache/ に対して O_TMPFILE フラグ付きの openat(2) が実行される
    # strace 抜粋
    [pid  3567] openat(AT_FDCWD, "/root/.cache/", O_RDWR|O_CLOEXEC|O_TMPFILE, 0666) = -1 EOPNOTSUPP (Operation not supported)
    [pid  3567] openat(AT_FDCWD, "/tmp", O_RDWR|O_CLOEXEC|O_TMPFILE, 0666) = -1 EOPNOTSUPP (Operation not supported)
    
  • overlayfsO_TMPFILE フラグ付きの openat(2) に非対応?(ちゃんとしらべてない)
  • /root/.cache/ に対して tmpfs をmountしてやると解決した
    mount -t tmpfs tmpfs /root/.cache
    • /root/.cache/ に対して tmpfs をmountすると /tmp への openat(2) は発生しなくなる

環境

# kubelet --version
Kubernetes v1.32.1
# uname -r
6.8.0-53-generic
# containerd --version
containerd containerd.io 1.7.25 bcc810d6b9066471b0b6fa75f557a15a1cbf31bb

再現環境構築

#
kubectl run -it --rm debug-debian --image=debian:12 --overrides='
{
  "apiVersion": "v1",
  "kind": "Pod",
  "spec": {
    "containers": [
      {
        "name": "debug-debian",
        "image": "debian:12",
        "stdin": true,
        "tty": true,
        "securityContext": {
          "privileged": true
        }
      }
    ]
  }
}' -- bash
# 環境構築
echo "Updating package lists..."
apt update
echo "Installing curl..."
apt install -y curl
echo "Adding Proxmox restore Client repository..."
echo "deb http://download.proxmox.com/debian/pbs-client bookworm main" > /etc/apt/sources.list.d/pbs-client.list
curl -fsSL https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -o /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
echo "Updating package lists..."
apt update
echo "Installing proxmox-backup-client version 3.3.2-1..."
apt install -y proxmox-backup-client=3.3.2-1
# 実行コマンド
strace -f -e trace=ioctl,mount,openat proxmox-backup-client restore "host/{バックアップ名}/{バックアップ日時}" "data.pxar" "{リストア先ディレクトリ}" --repository "{pbsのid}@pam@{hostname}:{datastore名}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment