Change data volume #75

Open
opened 2026-03-18 01:44:45 +00:00 by jeppebundsgaard · 2 comments

My harddisk is full. I want to move the nextcloud datadir to a new disk, mounted at /mnt/HC1. I have tried a lot. The solution I would believe would work is this:

in ~/.abra/servers/domain.com/sky.domain.com.datadir.yml I have

volumes: sky_domain_com_nextdata: driver: local driver_opts: type: none device: /mnt/HC1/sky-domain-data o: bind

and in .env:
COMPOSE_FILE="compose.yml:../../servers/domain.com/sky.domain.com.datadir.yml"

the yml is used, but the volume is not changed to the new version.

I have tried to delete the volume on the server:
docker volume rm sky_domain_com_nextdata but I get:

Error response from daemon: remove sky_domain_com_nextdata: volume is in use - [1c2c5bf124cde8a8ff090c21bcb6853d498b873cdbe0736af48485489c7db184, 1dacc4a504c0647f24c86995387e1efe78944cde489cb915d5dc68a57bb97b81, 239c5348ffe52b6230de5dc85b3acbaadbcb31ab7ae0ca79cc343e07f82a373a]

What is the best way to migrate to another drive?

My harddisk is full. I want to move the nextcloud datadir to a new disk, mounted at /mnt/HC1. I have tried a lot. The solution I would believe would work is this: in `~/.abra/servers/domain.com/sky.domain.com.datadir.yml` I have ` volumes: sky_domain_com_nextdata: driver: local driver_opts: type: none device: /mnt/HC1/sky-domain-data o: bind ` and in .env: `COMPOSE_FILE="compose.yml:../../servers/domain.com/sky.domain.com.datadir.yml"` the yml is used, but the volume is not changed to the new version. I have tried to delete the volume on the server: `docker volume rm sky_domain_com_nextdata` but I get: > Error response from daemon: remove sky_domain_com_nextdata: volume is in use - [1c2c5bf124cde8a8ff090c21bcb6853d498b873cdbe0736af48485489c7db184, 1dacc4a504c0647f24c86995387e1efe78944cde489cb915d5dc68a57bb97b81, 239c5348ffe52b6230de5dc85b3acbaadbcb31ab7ae0ca79cc343e07f82a373a] What is the best way to migrate to another drive?
Owner

Hey @jeppebundsgaard! We should totally have more docs on this!

Error response from daemon: remove sky_domain_com_nextdata: volume is in use

That is usually because there is a container/stack still using the volume, you need to undeploy first.

@3wordchant I think you might have a good angle on this.

I myself would probably just undeploy everything, mv all the shit to my new drive and then symlink the volume path to the new drive? I'm a pretty shitty sysadmin tbh...

Hey @jeppebundsgaard! We should totally have more docs on this! > Error response from daemon: remove sky_domain_com_nextdata: volume is in use That is usually because there is a container/stack still using the volume, you need to undeploy first. @3wordchant I think you might have a good angle on this. I myself would probably just undeploy everything, `mv` all the shit to my new drive and then symlink the volume path to the new drive? I'm a pretty shitty sysadmin tbh...

Hey @jeppebundsgaard! We should totally have more docs on this!

Would be much appreciated :-)

Error response from daemon: remove sky_domain_com_nextdata: volume is in use

That is usually because there is a container/stack still using the volume, you need to undeploy first.

I did undeploy, but the containers were still lying around as DEAD, and I couldn't remove them (the container-ids were non-existing).

I myself would probably just undeploy everything, mv all the shit to my new drive and then symlink the volume path to the new drive? I'm a pretty shitty sysadmin tbh...

At 3 AM, I ended up doing exactly that: Moving, symlinking. But I also felt that was not the most transparent and sustainable solution.

> Hey @jeppebundsgaard! We should totally have more docs on this! Would be much appreciated :-) > > Error response from daemon: remove sky_domain_com_nextdata: volume is in use > > That is usually because there is a container/stack still using the volume, you need to undeploy first. I did undeploy, but the containers were still lying around as DEAD, and I couldn't remove them (the container-ids were non-existing). > I myself would probably just undeploy everything, `mv` all the shit to my new drive and then symlink the volume path to the new drive? I'm a pretty shitty sysadmin tbh... At 3 AM, I ended up doing exactly that: Moving, symlinking. But I also felt that was not the most transparent and sustainable solution.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/nextcloud#75
No description provided.