IceWhaleTech / CasaOS

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

[Bug] Storage merging #1536

Open XiSl0w opened 9 months ago

XiSl0w commented 9 months ago

Apps Not Recognizing Merged Disk Space in CasaOS

There appears to be an issue with the disks merging feature in CasaOS. While the merging of disks seems to work correctly, applications only recognize the disk space of the main storage disk and do not account for the total merged disk space. This results in inaccurate disk space reporting within apps.

To Reproduce

Steps to reproduce the behavior:

  1. Merge multiple disks using CasaOS's disk merging feature.
  2. Open any application that displays or utilizes disk space information (In my case its sonarr)
  3. Observe that the application only recognizes the disk space of the main storage disk, not the total of the merged disks.
  4. This results in a discrepancy in disk space reporting.

Expected behavior

The expected behavior is that after merging disks in CasaOS, all applications should recognize and utilize the total combined disk space of the merged disks, not just the main storage disk.

Screenshots

Screenshot 2023-11-30 at 5 20 14 AM Screenshot 2023-11-30 at 5 20 27 AM Screenshot 2023-11-30 at 5 20 35 AM

Desktop (please complete the following information):

 - OS: CasaOS (Connected through casaos.local from macos)
 - Browser Edge
 - Version 0.4.4.3

System Time

Local time: Wed 2023-11-29 21:22:49 EST
Universal time: Thu 2023-11-30 02:22:49 UTC
RTC time: Thu 2023-11-30 02:22:49
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

Additional context

I got my zimaboard 832 three days ago, on 27th of November.

jerrykuku commented 8 months ago

The merge disk feature of CasaOS was designed to be merged into the /DATA directory. So the space you see on the system disk is still the original size.

baoduy commented 4 months ago

I think after merged the storages it should using the external storages instead of still target to the main storage.

mariodian commented 3 months ago

I have the same issue, the difference is it used to work until recent restart of the server. Disks still show as merged, but when I open any app it can't see the data. I can see the data in Files explorer but only on the merged disk, not as a whole.

mariodian commented 2 months ago

I fixed this by manually moving all the movies and whatnot to /DATA from the secondary disk and /var/lib/casaos/files, truncating tables o_merge and o_merge_disk in /var/lib/casaos/db/local-storage.db, restarting the server, formatting the secondary disk and re-merging it back to the system disk. I was lucky that all of the data could temporarily fit on the main disk. If it can't you will have to backup elsewhere first.

The reason I had to fiddle with local-storage.db was because I could not re-merge in the UI.