IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
23.74k stars 1.28k forks source link

Can't update Casaos #1475

Open harkfujow opened 8 months ago

harkfujow commented 8 months ago

I'm running Casaos on a Zimaboard 832. I've attached a 2TB nvme HDD to expand the storage. That is where I'm keeping all of my Docker containers. I'm also using the merge storage feature. Notwithstanding, I seem to have no more space on the internal HDD. I have no idea how as I'm only running Docker containers on the Zimaboard. Consequently. I can't upgrade Casaos to the newest version. It just hangs if I use the GUI and tells me I don't have enough space if I use the command line. Any thoughts on how to get around this? I've deleted some of the pre-installed stuff (e.g. libreoffice and gnome games). I'm out of storage space on the internal drive (it literally reads 0 bytes free in the GUI). Though, a weird thing is that running df -BM is showing 26,631M of 27,713M used on /dev/mmcblk0p2. Which would make me think there is some room. Though, as my Linux skills are not good, I could be wrong. A reboot doesn't change this. I'm at a loss.

LinkLeong commented 8 months ago

Your problem is that the storage space is full is it?docker data is divided into two parts,one is the user data and the other is the image.currently the image is on the system disk.do you have a lot of applications installed?

JimCallahanOrlando commented 8 months ago

What is the recommended procedure for moving Docker from theSystem/OS disk to an added disk?

For example, Stack Overflow says: https://stackoverflow.com/questions/59345566/move-docker-volume-to-different-partition

While IBM says: https://www.ibm.com/docs/en/z-logdata-analytics/5.1.0?topic=compose-relocating-docker-root-directory

I plan on running a PostgreSQL Docker container (PostGIS/PostGIS). If I don't want to fill-up the OS/System disk with my Docker Containers and Data Volumes so how do I specify I want to use the added disk rather than the original OS/System disk? The IBM way or the Stack Overflow method?

harkfujow commented 8 months ago

Originally, I had docker on the system drive. Then I moved the images to the nvme drive. Or at least I thought I did. I did something similar to the IBM method to move them.

I currently have 26 containers, though 2 aren't running (by design).

JimCallahanOrlando commented 8 months ago

I plan to modify the IBM method by copying instead of moving for two reasons:

  1. If I unmount and remove the additional drive, I still want Docker installed on the system disk.
  2. Even though I stop the Docker daemon, CasaOS may restart it. After watching an htop dynamic display of processes it looks like CasaOS frequently checks a configuration file to make sure all of its services are running. Thus, Docker could be restarted while still moving files; which could leave the system in an unpredictable half-moved state.

I have a 2.5 inch SATA SSD connected using the SATA cable and attached to the bottom of the Zima Board with a rubber band. So, it would be easy to physically remove this disk. I have not used the experimental "merge filesystem".

Thus, my current plan (subject to change) is to:

  1. Copy the files to the new drive
  2. Stop Docker
  3. Edit the file that points to the docker location
  4. Restart Docker

The remaining issue is if I unmount and remove the drive I have to remember to edit the file that points to the location of Docker.

Given how large Docker multi-media (Plex or Jellyfin) or Docker database (MySQL or Postgres) installations could become, setting up Docker on an expansion drive may become a common use case.

Perhaps CasaOS could include a feature to copy Docker to a mounted filesystem (including modifying the file that points to the installation) and if when starting Docker the drive that the pointer file points to is not mounted give an error message and offer to point back to the Docker installation on the system disk?

spuder commented 8 months ago

There is a guide on moving the data to a second drive:

https://wiki.casaos.io/en/guides/move-docker-images-and-volumes-to-a-diffferent-storage