Error response from daemon: error creating overlay mount to /media/new/path/docker/overlay2/cf4XXXX9/merged: invalid argument

I’m getting this error message when trying to the following to run docker from a media USB storage device. [Reference: How to move docker's default /var/lib/docker to another directory on Ubuntu/Debian Linux -].
Open file /lib/systemd/system/docker.service with your favorite text editor and replace the following line where /new/path/docker is a location of your new chosen docker directory:
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecStart=/usr/bin/dockerd --data-root /media/new/path/docker -H fd:// --containerd=/run/containerd/containerd.sock

stop docker service: # systemctl stop docker

Hi Nmev,

Welcome to our forums.

What filesystem do you have on that media USB storate device?

You can verify it by running

# sudo fdisk -l

For example, my output would be the following for my NTFS formatted external disk:

Disk /dev/sdb: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x210f61fa

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953458175 1953456128 931.5G  7 HPFS/NTFS/exFAT