I moved a volume that was attached to an existing droplet to a new droplet. Then I ran the commands to mount it to the new droplet.
mkdir -p /mnt/test
mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_test /mnt/test
When i checked the directory it was empty, I tried to repeat it a few times and it still empty. When I run df -h
can see it is mounted but empty
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya,
You can confirm that
/mnt/test
is not already being used by another mounted volume or that there are no hidden files in the directory itself. Also you can try to mount the volume back to the old droplet and check if the data is present.If there were any issues while detaching or attaching the volume, filesystem corruption could occur.
Run a filesystem check:
This will try to repair any filesystem issues that might be preventing the volume from being read properly.
fsck
can occasionally cause data corruption on active disks, so only attempt this on an unmounted file system.Using
fsck
as a recovery option can be useful, but it comes with risks and isn’t guaranteed to work, so consider it a last resort method of data recovery. We recommend taking a snapshot of your Droplet first. If the recovery causes data loss, you can restore from the snapshot and try again or use a different method.Regards