Client: Podman Engine Version: 4.0.1 API Version: 4.0.1 Go Version: go1.17.8 Git Commit: c8b9a2e3ec3630e9172499e15205c11b823c8107 Built: Sun Mar 13 20:44:23 2022 OS/Arch: linux/amd64
podman version だと
1 2
ERRO[0000] error running `/sbin/newgidmap 538795 0 1000 1 1 200000 4096`: newgidmap: Could not set caps Error: cannot setup namespace using "/sbin/newgidmap": exit status 1
mount | grep (PV名の一部) を実行してデバイス名(/dev/sdX)と、マウントされたパス(/var/lib/kubelet/pods/〜)を取得
1 2 3
実行例 $ mount | grep elasticsearch /dev/sdh on /var/lib/kubelet/pods/d7cdb650-112d-48b0-b4d4-c852f9c8f4c3/volumes/kubernetes.io~iscsi/iscsi-pv-elasticsearch type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
sudo tee 1 > /sys/block/sdh/device/rescan (sdh部分は上記で取得したデバイス名に変更)
デバイスの容量が変更されたことが検知される。(確認するならdmesgに以下のような出力がある)
1
[43366.0] sdh: detected capacity change from 5368709120 to 10737418240
fdisk /dev/sda すると赤字で以下のエラーが表示される。メッセージ通りなら w で書き込めば修正できるはずだが
1 2
GPT PMBR size mismatch (54525951 != 67108863) will be corrected by w(rite). GPT PMBR size mismatch (54525951 != 67108863) will be corrected by w(rite).
w すると、以下のエラーが発生
fdisk: failed to write disklabel: Invalid argument
解決方法
parted をインストールしてそちらを使う。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# parted /dev/sda
(parted) p Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 12582912 blocks) or continue with the current setting? Fix/Ignore? fix
(parted) resizepart 2 Warning: Partition /dev/sda2 is being used. Are you sure you want to continue? Yes/No? yes End? [27.9GB]? 100% ※ このデフォルト値は変更前の値。最大容量ではないので注意
(parted) q Information: You may need to update /etc/fstab.