--When using Docker on NILFS2 filesystem, set the storage driver to "devicemapper".
/etc/docker/daemon.json
{
"storage-driver": "devicemapper"
}
The scariest thing about using the Raspberry PI 3b regularly is that the SD card suddenly breaks one day. So I converted/(rootfs) to NILFS, but docker didn't work well, so make a note of it.
Operates only with a 32GB micro SD card. Set/dev/mmcblk0p2 to NILFS2.
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux
pi@raspberrypi:~ $ df -hT
File system type size used remaining used%Mount position
udev devtmpfs 424M 0 424M 0% /dev
tmpfs tmpfs 93M 8.7M 84M 10% /run
/dev/mmcblk0p2 nilfs2 30G 19G 9.6G 66% /
tmpfs tmpfs 463M 4.0K 463M 1% /dev/shm
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 vfat 253M 68M 185M 27% /boot
tmpfs tmpfs 93M 4.0K 93M 1% /run/user/1000
pi@raspberrypi:~ $ docker version
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.11.6
Git commit: 4c52b90
Built: Fri, 13 Sep 2019 10:45:43 +0100
OS/Arch: linux/arm
Experimental: false
Server:
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.11.6
Git commit: 4c52b90
Built: Fri Sep 13 09:45:43 2019
OS/Arch: linux/arm
Experimental: false
--overlay2 (default) ... △ (hello-world, busybox works, but ubuntu and large images (with multiple layers) cannot be pulled. --overlay ... × (It is said that permission is denied and it does not work at all) --vfs ... ○, but the performance is the worst. --devicemapper ... ◎. It seems to work fine.
It seems that a huge sparse file is created in advance, and it is cut out and used. It's refreshing to see 100G files on an SD card that is only 32GB. w
root@raspberrypi:/var/lib/docker# ls -lh devicemapper/devicemapper/data
-rw-------1 root root 100G December 29 08:34 devicemapper/devicemapper/data
--Memoized the procedure to make root of Raspbian OS NILFS. (I was addicted to various places unexpectedly)
Recommended Posts