Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am trying to understand why my attempts to mount DO’s block storage device to docker’s /var/lib/docker dir results in lost+found.
First, Terraform is used to provision a digital ocean droplet and attach a volume to it. Then ansible is used to configure the host.
Please note that playbook below is using static/explicit values due to needing to debug:
---
- name: mount point of attached volume
stat:
path: /mnt/name_of_attached_volume
- name: get digital_ocean_volume_path_by_name
stat:
path: /dev/disk/by-id/scsi-0DO_Volume_name_of_attached_volume
- name: unmount images volume
command: umount /mnt/name_of_attached_volume
- name: Label the volume
command: parted -s /dev/disk/by-id/scsi-0DO_Volume_name_of_attached_volume mklabel gpt
- name: Create an ext4 partition
command: parted -s -a opt /dev/disk/by-id/scsi-0DO_Volume__name_of_attached_volume mkpart primary ext4 0% 100%
- name: Build the ext4 metadata
command: mkfs.ext4 /dev/disk/by-id/scsi-0DO_Volume__name_of_attached_volume-part1
####################################################################
# since the mount point -- `/var/lib/docker` -- already exists #
# by virtue of docker being installed on the host, no need to #
# create a mount point but I do need stop docker running #
####################################################################
- name: stop docker service
service:
name: docker
state: stopped
- name: mount volume read-write
mount:
path: /var/lib/docker
src: /dev/disk/by-id/scsi-0DO_Volume__name_of_attached_volume-part1
fstype: ext4
opts: defaults,discard
dump: 0
passno: 2
state: mounted
- name: remove mount point for images volume
command: rmdir /mnt/name_of_attached_volume
- name: Start docker service
service:
name: docker
state: started
enabled: "{{ docker_service_enabled }}"
After running the playbook above, the result of for running ls -la /var/lib/docker is:
drwxr-xr-x 3 root root 4096
drwx--x--x 14 root root 4096
drwx------ 2 root root 16384 Jan 25 16:47 lost+found
**Why is this so? ** I do not believe that the directory should be lost+found.
I am obviously missing/misunderstanding a step. Greatly appreciate tips please. Thank you!
WildcatMedia
jeffs
0621335d663b4b699a60eb27e28153
accesstrax
Dwight Trumbower
admin
yimprogramming
samunyi90
1d6ce141ab5444dfb1ea2dd29cf4b1
Matt Fricker
joel9b158e40551b15093f213f