Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker/devicemapper/devicemapper/data confusing rsync #14000

Closed
alfredopalhares opened this issue Jun 18, 2015 · 6 comments
Closed

docker/devicemapper/devicemapper/data confusing rsync #14000

alfredopalhares opened this issue Jun 18, 2015 · 6 comments
Labels
area/storage/devicemapper kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

Comments

@alfredopalhares
Copy link

Hello everyone,

I just bought a brand new SSD and I was migrating my data to a new disk, the usual way is to just set the boot partition, LUKS and LVM, rsync the whole system re-run syslinux and I am good to go.

This is the exact rsync command I run:

sudo rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} --progress /* root@192.168.2.2:/mnt

This was all going fine, until it start copying the file /var/lib/docker/devicemapper/devicemapper/data which seemed huge, until rsync gave me a "No more space left on device" error, while the new hard drive wasn't getting any more data (this while copying the devicemapper/data file).

I've tried to ls the file, but there is nothing on that path.

I had to add the path to the exclude directory of rsync to get a full system move.

What does this file do ? And why does rsync seem to behave like while copying it ?

Regards,
Alfredo Palhares

@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@alfredopalhares
Copy link
Author

Adding --sparse to the above rsync command, makes rsync ignore sparse files.

@OwenChia
Copy link

Just issues the same question.
I have tried using --sparse, it's seems work. But now I can not start docker service.

Here is the log:

Jul 18 14:18:39 Inspiron systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has begun starting up.
Jul 18 14:18:39 Inspiron dockerd[30681]: time="2016-07-18T14:18:39.457936679+08:00" level=info msg="New containerd process, pid: 30701"
Jul 18 14:18:40 Inspiron dockerd[30681]: time="2016-07-18T14:18:40.477497302+08:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devmapper: Unable to find loopback mount for: /var/lib/docker/devicemapper/devicemapper/data"
Jul 18 14:18:40 Inspiron dockerd[30681]: time="2016-07-18T14:18:40.477637412+08:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devmapper: Unable to find loopback mount for: /var/lib/docker/devicemapper/devicemapper/data"
Jul 18 14:18:40 Inspiron systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 18 14:18:40 Inspiron systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Jul 18 14:18:40 Inspiron systemd[1]: docker.service: Unit entered failed state.
Jul 18 14:18:40 Inspiron systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 18 14:18:40 Inspiron polkitd[569]: Unregistered Authentication Agent for unix-process:30668:665262 (system bus name :1.121, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)

@icecrime icecrime added area/storage/devicemapper kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. labels Sep 10, 2016
@shegeley
Copy link

I spent about 3 hours today trying to figure out how to move all the docker data to my Digital Ocean attached volume.

Complete Ubuntu 16.04 instruction

sudo service docker stop
sudo cd /var/lib
sudo rsync -v --sparse  docker  /your/path
sudo rm -rf docker
sudo ln -s docker /your/path

sudo vim /etc/default/docker

Make sure to uncomment the line and paste:
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /your/path"

Then:
sudo vim /lib/systemd/system/docker.service
Make sure Exec Start looks like:
ExecStart=/usr/bin/docker daemon -H fd:// -g /your/path

FINALLY:

systemctl daemon-reload
service docker start

🙌

@tedgoldstein
Copy link

Two comments.

  1. You have the symbolic link command backwards. It should be:

sudo ln -s /your/path docker

  1. You don't really need to reconfigure the DOCKER_OPTS because it happily goes through the symbolic link.

@thaJeztah
Copy link
Member

The devicemapper storage-driver was deprecated, and has been removed, so closing issues related to this storage-driver. See;

@thaJeztah thaJeztah closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage/devicemapper kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
Projects
None yet
Development

No branches or pull requests

7 participants