So I recently moved most of my docker storage to a second hard drive, called “storage.” After a system restart, docker is creating a folder called “storage,” forcing the physical drive to be renamed “storage1.” How do I prevent this from happening?
I am using Xubuntu.
It looks like you’re relying on media automounting to access the drive, but this is happening too late for Docker.
I would suggest creating the empty folder and explicitly adding the mount to
/etc/fstab
instead. This should mount early enough, and even if it doesn’t it needs an empty folder for the mount point anyway.Edit: Make sure you reference the partition by UUID, because the device name of USB devices sometimes change after a reboot.
Agreed. Needs to be a required mount in fstab. System won’t even start then if the mount fails, docker always has access