해당 문서는 CentOS 7.7 기준입니다.
crio service status -> failld
kernel does not support overlay fs, the backing xfs filesystem is formatted without d_type support
backing filesystem으로 xfs를 사용할 때 ftype을 1로 설정해야한다는 에러
xfs 파일시스템의 d_type -> ftype이 0이면 overlay filesystem을 사용할 수 없습니다.
현재 cri-o 컨테이너가 사용중인 파일 시스템 xfs가 d_type이 0이여서 생긴 문제
ftype이 0이면 d_type을 support하지 않습니다.
[host ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 50G 0 disk
├─xvda1 202:1 0 1M 0 part
├─xvda2 202:2 0 2G 0 part
└─xvda3 202:3 0 48G 0 part /
xvdb 202:16 0 500G 0 disk
└─xvdb1 202:17 0 500G 0 part
└─appvg-applv 253:0 0 500G 0 lvm /app
[host ~]# xfs_info /
meta-data=/dev/xvda3 isize=256 agcount=4, agsize=3145600 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=12582400, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=6143, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[host ~]# xfs_info /app
meta-data=/dev/mapper/app isize=512 agcount=4, agsize=32767744 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=131070976, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=63999, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
cri-o 시스템의 마운트가 ftype=0 인 볼륨에 마운트 되어있었습니다.
$ vi /etc/containers/storage.conf
[storage]
# Default Storage Driver, Must be set for proper operation.
driver = "overlay"
# Temporary storage location
runroot = "/run/containers/storage"
# Primary Read/Write location of container storage
graphroot = "/var/lib/containers/storage"
d_type이 1인 xfs새로 마운트 해줘야 합니다.
/etc/containers/storage.conf
파일의 /var/~~
, /run/~~
앞에 d_type이 1인 파일시스템의 최상위 경로를 추가하여 ex) /app/var
/~~
[crio]
# Path to the "root directory". CRI-O stores all of its data, including
# containers images, in this directory.
#root = "/var/lib/containers/storage"
root="/app/crio"
# Path to the "run directory". CRI-O stores all of its state in this directory.
#runroot = "/var/run/containers/storage"
# Storage driver used to manage the storage of images and containers. Please
# refer to containers-storage.conf(5) to see all available storage drivers.
#storage_driver = ""
# List to pass options to the storage driver. Please refer to
# containers-storage.conf(5) to see all available storage options.
#storage_option = [
#]