claranet / centos7-ami

Shell script to build CentOS 7 AMI
GNU General Public License v2.0
34 stars 18 forks source link

Using docker/rkt with this ami #2

Open pporada-gl opened 8 years ago

pporada-gl commented 8 years ago

When using container technology, the backing filesystem, in this case XFS, needs to have support for working around d_type. This support can be enabled by changing the mkfs.xfs line to

mkfs.xfs -m crc=0 -n ftype=1 -L root ${DEVICE}2

After the script runs, you can check the fytpe on the newly partition volume.

xfs_info /rootfs | grep ftype

https://github.com/coreos/rkt/issues/3040 for more info

bashtoni commented 8 years ago

Thanks. We've been using direct-lvm but I can see adding this would allow people to use Docker more easily.

I need to check the implications of enabling ftype=1. OverlayFS is still in 'technology preview' even in the forthcoming EL7.3 release: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/7.3_Release_Notes/technology_previews_file_systems.html

crc checks should still be enabled, as they provide protection against metadata corruption in the case of host failure.

pporada-gl commented 8 years ago

Good point about the crc checks. I read the XFS man page entry for it, but all the examples I saw showed people disabling it. I guess that means do my own research instead of trusting.

As for ftype=1, we're not ready to switch over to Project Atomic yet, but PA has been discussing enabling it. https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2016-August/msg00011.html

pporada-gl commented 8 years ago

Ahhh, this is why CRC was set to 0.

+ mkfs.xfs -m crc=1 -n ftype=1 -L root /dev/xvdb2
cannot specify both crc and ftype
Usage: mkfs.xfs