projectatomic / container-storage-setup

Service to set up storage for Docker and other container systems
Apache License 2.0
153 stars 77 forks source link

"container-storage-setup create" does not create SystemD's mount unit file #284

Open eburgueno opened 4 years ago

eburgueno commented 4 years ago

The behaviour of container-storage-setup differs when ran without arguments and when ran using container-storage-setup create. The first ones creates the SystemD unit file to mount the LV on reboot, but the second form does not. In fact, it actually removes it:

# container-storage-setup --version
0.11.0

# cat /etc/sysconfig/docker-storage-setup 
STORAGE_DRIVER=overlay2
DEVS=/dev/sdb
WIPE_SIGNATURES=true
VG=vg_docker
CONTAINER_ROOT_LV_NAME=lv_docker
CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/docker

# container-storage-setup
(...)
  Physical volume "/dev/sdb1" successfully created.
  Volume group "vg_docker" successfully created
  Logical volume "lv_docker" created.

# updatedb && locate var-lib-docker.mount
/etc/systemd/system/var-lib-docker.mount
/etc/systemd/system/docker-storage-setup.service.wants/var-lib-docker.mount

# container-storage-setup list
# container-storage-setup create -o /etc/sysconfig/docker-storage default /etc/sysconfig/docker-storage-setup
INFO: Device /dev/sdb is already partitioned and is part of volume group vg_docker
Created storage configuration default
# container-storage-setup list
NAME                     DRIVER           STATUS          
default                  overlay2         active   
# updatedb && locate var-lib-docker.mount 
# ls -l /etc/systemd/system/var-lib-docker.mount
ls: cannot access /etc/systemd/system/var-lib-docker.mount: No such file or directory