IceWhaleTech / CasaOS

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

[Bug] No stroage found #1548

Open ruleechen opened 7 months ago

ruleechen commented 7 months ago

The Storage widget display on the left hand side panel shows Healthy Used 0 Bytes Total 0 Bytes

Steps to reproduce the behavior:

Login

Expected behavior

Expect to see the real stoarges and its size accordingly.

Screenshots

image image

Desktop (please complete the following information):

 - OS: linux
 - CasaOS Version: 0.4.4.3
 - Disk Total: 6496 
 - Disk Used: 2357 
 - System Info: [Ubuntu 18.04.6 LTS   \l Bit:64 Mem:833M Core:4 Linux cm2b 5.0.2-aml-s905 #5.77 SMP PREEMPT Mon Apr 1 17:23:16 MSK 2019 aarch64 aarch64 aarch64 GNU/Linux]
 - Remote Version: 0.4.4.2
 - Browser: Chrome 
 - Version: 119.0.0.0

System Time

root@cm2b:~# timedatectl
                      Local time: Sun 2023-12-10 15:50:28 UTC
                  Universal time: Sun 2023-12-10 15:50:28 UTC
                        RTC time: n/a
                       Time zone: Etc/UTC (UTC, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Logs

sudo journalctl -xef -u casaos-local-storage

Dec 10 15:55:47 cm2b casaos-local-storage[3312]: 2023-12-10T15:55:47.094Z error Failed to parse block devices from output of lsblk {"error": "[]model.LSBLKModel: model.LSBLKModel.RO: ReadBool: expect t or f, but found \", error found in #10 byte of ...|\", \"ro\": \"0\", \"rm\": |..., bigger context ...|id\": null, \"partflags\": null, \"ra\": \"128\", \"ro\": \"0\", \"rm\": \"0\", \"hotplug\": \"1\", \"model\": \"HTS543225|...", "func": "service.(*diskService).LSBLK", "file": "/home/runner/work/CasaOS-LocalStorage/CasaOS-LocalStorage/service/disk.go", "line": 334}

root@cm2b:~# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    0 232.9G  0 disk 
`-sda1         8:1    0 232.9G  0 part /mnt/HITACHI250
mmcblk1      179:0    0   7.3G  0 disk 
|-mmcblk1p1  179:1    0   122M  0 part /boot
`-mmcblk1p2  179:2    0   6.5G  0 part /
mmcblk1boot0 179:32   0     4M  1 disk 
mmcblk1boot1 179:64   0     4M  1 disk 
zram0        253:0    0    50M  0 disk /var/log
zram1        253:1    0   417M  0 disk [SWAP]
root@cm2b:~# lsblk -o name,tran,subsystems
NAME         TRAN SUBSYSTEMS
sda          usb  block:scsi:usb:platform
`-sda1            block:scsi:usb:platform
mmcblk1           block:mmc:mmc_host:platform
|-mmcblk1p1       block:mmc:mmc_host:platform
`-mmcblk1p2       block:mmc:mmc_host:platform
mmcblk1boot0      block:mmc:mmc_host:platform
mmcblk1boot1      block:mmc:mmc_host:platform
zram0             block
zram1             block
LinkLeong commented 6 months ago

You can update to v0.4.4-3, here it should show the size of mmc, sda is a usb device, the stats exclude usb devices.

ruleechen commented 6 months ago

@LinkLeong No luck with v0.4.4-3

sudo journalctl -xef -u casaos-local-storage

Dec 12 12:30:10 cm2b casaos-local-storage[28940]: 2023-12-12T12:30:10.133Z error Failed to parse block devices from output of lsblk {"error": "[]model.LSBLKModel: model.LSBLKModel.RO: ReadBool: expect t or f, but found \", error found in #10 byte of ...|\", \"ro\": \"0\", \"rm\": |..., bigger context ...|id\": null, \"partflags\": null, \"ra\": \"128\", \"ro\": \"0\", \"rm\": \"0\", \"hotplug\": \"1\", \"model\": \"HTS543225|...", "func": "service.(*diskService).LSBLK", "file": "/home/runner/work/CasaOS-LocalStorage/CasaOS-LocalStorage/service/disk.go", "line": 334}

image
LinkLeong commented 6 months ago

Can you reinstall 0.4.4-3, we have changed the installer of 0.4.4-3, but not the version number. 你可以重新安装一下0.4.4-3吗,我们中间对0.4.4-3的安装包进行过更换,但没有修改版本号.

ruleechen commented 6 months ago

@LinkLeong Thank you for working on this. I have run the following commands to install the latest version 0.4.4-3

root@cm2b:~# casaos-uninstall /Y /Y /Y
root@cm2b:~# curl -fsSL https://get.casaos.io/v0.4.4-3 | sudo bash

All the reinstall steps progress fine but still no storage found on the widget. And again the logs indicates there is the same error.

sudo journalctl -xef -u casaos-local-storage

Dec 16 02:25:46 cm2b casaos-local-storage[15858]: 2023-12-16T02:25:46.065Z error Failed to parse block devices from output of lsblk {"error": "[]model.LSBLKModel: model.LSBLKModel.RO: ReadBool: expect t or f, but found \", error found in #10 byte of ...|\", \"ro\": \"0\", \"rm\": |..., bigger context ...|id\": null, \"partflags\": null, \"ra\": \"128\", \"ro\": \"0\", \"rm\": \"0\", \"hotplug\": \"1\", \"model\": \"HTS543225|...", "func": "service.(*diskService).LSBLK", "file": "/home/runner/work/CasaOS-LocalStorage/CasaOS-LocalStorage/service/disk.go", "line": 334}

I'm glad to help on providing any other debugging info you need. Thank you agian.

BTW, I'm on the environment ARMBIAN 5.77 user-built Ubuntu 18.04.6 LTS 5.0.2-aml-s905. Is it a supported system?

LinkLeong commented 6 months ago

Can you provide me with this command output, I'll parse it and see what's wrong lsblk -O -J -b. 能给我提供下这个命令的输出吗,我去解析一下看看什么问题lsblk -O -J -b

ruleechen commented 6 months ago

On my machine

root@cm2b:~# lsblk -O -J -b

The output of the command is

{
   "blockdevices": [
      {"name": "sda", "kname": "sda", "maj:min": "8:0", "fstype": null, "mountpoint": null, "label": null, "uuid": null, "parttype": null, "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "1", "model": "HTS543225L9A300 ", "serial": "00000000011A", "size": "250059350016", "state": "running", "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "1", "sched": "mq-deadline", "rq-size": "2", "type": "disk", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "1", "pkname": null, "hctl": "0:0:0:0", "tran": "usb", "subsystems": "block:scsi:usb:platform", "rev": "8137", "vendor": "Hitachi ", "zoned": "none",
         "children": [
            {"name": "sda1", "kname": "sda1", "maj:min": "8:1", "fstype": "exfat", "mountpoint": "/mnt/HITACHI250G", "label": "HITACHI250G", "uuid": "8684-8613", "parttype": "0xaf", "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "1", "model": null, "serial": null, "size": "250058113024", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "1", "sched": "mq-deadline", "rq-size": "2", "type": "part", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "1", "pkname": "sda", "hctl": null, "tran": null, "subsystems": "block:scsi:usb:platform", "rev": null, "vendor": null, "zoned": "none"}
         ]
      },
      {"name": "mmcblk1", "kname": "mmcblk1", "maj:min": "179:0", "fstype": null, "mountpoint": null, "label": null, "uuid": null, "parttype": null, "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "1", "model": null, "serial": "0x097a5b89", "size": "7818182656", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "0", "sched": "mq-deadline", "rq-size": "128", "type": "disk", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": null, "hctl": null, "tran": null, "subsystems": "block:mmc:mmc_host:platform", "rev": "0x8", "vendor": null, "zoned": "none",
         "children": [
            {"name": "mmcblk1p1", "kname": "mmcblk1p1", "maj:min": "179:1", "fstype": "vfat", "mountpoint": "/boot", "label": "BOOT_EMMC", "uuid": "0E68-244B", "parttype": "0xc", "partlabel": null, "partuuid": "2dd60000-01", "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "1", "model": null, "serial": null, "size": "127926272", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "0", "sched": "mq-deadline", "rq-size": "128", "type": "part", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": "mmcblk1", "hctl": null, "tran": null, "subsystems": "block:mmc:mmc_host:platform", "rev": null, "vendor": null, "zoned": "none"},
            {"name": "mmcblk1p2", "kname": "mmcblk1p2", "maj:min": "179:2", "fstype": "ext4", "mountpoint": "/", "label": "ROOT_EMMC", "uuid": "6f30c1fe-54e7-4eb9-809a-8002c3de63b1", "parttype": "0x83", "partlabel": null, "partuuid": "2dd60000-02", "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "1", "model": null, "serial": null, "size": "6988759040", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "0", "sched": "mq-deadline", "rq-size": "128", "type": "part", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": "mmcblk1", "hctl": null, "tran": null, "subsystems": "block:mmc:mmc_host:platform", "rev": null, "vendor": null, "zoned": "none"}
         ]
      },
      {"name": "mmcblk1boot0", "kname": "mmcblk1boot0", "maj:min": "179:32", "fstype": null, "mountpoint": null, "label": null, "uuid": null, "parttype": null, "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "1", "rm": "0", "hotplug": "1", "model": null, "serial": null, "size": "4194304", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "0", "sched": "mq-deadline", "rq-size": "128", "type": "disk", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": null, "hctl": null, "tran": null, "subsystems": "block:mmc:mmc_host:platform", "rev": null, "vendor": null, "zoned": "none"},
      {"name": "mmcblk1boot1", "kname": "mmcblk1boot1", "maj:min": "179:64", "fstype": null, "mountpoint": null, "label": null, "uuid": null, "parttype": null, "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "1", "rm": "0", "hotplug": "1", "model": null, "serial": null, "size": "4194304", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "512", "opt-io": "0", "phy-sec": "512", "log-sec": "512", "rota": "0", "sched": "mq-deadline", "rq-size": "128", "type": "disk", "disc-aln": "0", "disc-gran": "0", "disc-max": "0", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": null, "hctl": null, "tran": null, "subsystems": "block:mmc:mmc_host:platform", "rev": null, "vendor": null, "zoned": "none"},
      {"name": "zram0", "kname": "zram0", "maj:min": "253:0", "fstype": null, "mountpoint": "/var/log", "label": null, "uuid": null, "parttype": null, "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "0", "model": null, "serial": null, "size": "52428800", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "4096", "opt-io": "4096", "phy-sec": "4096", "log-sec": "4096", "rota": "0", "sched": null, "rq-size": "128", "type": "disk", "disc-aln": "0", "disc-gran": "4096", "disc-max": "2199023255040", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": null, "hctl": null, "tran": null, "subsystems": "block", "rev": null, "vendor": null, "zoned": "none"},
      {"name": "zram1", "kname": "zram1", "maj:min": "253:1", "fstype": null, "mountpoint": "[SWAP]", "label": null, "uuid": null, "parttype": null, "partlabel": null, "partuuid": null, "partflags": null, "ra": "128", "ro": "0", "rm": "0", "hotplug": "0", "model": null, "serial": null, "size": "437219328", "state": null, "owner": "root", "group": "disk", "mode": "brw-rw----", "alignment": "0", "min-io": "4096", "opt-io": "4096", "phy-sec": "4096", "log-sec": "4096", "rota": "0", "sched": null, "rq-size": "128", "type": "disk", "disc-aln": "0", "disc-gran": "4096", "disc-max": "2199023255040", "disc-zero": "0", "wsame": "0", "wwn": null, "rand": "0", "pkname": null, "hctl": null, "tran": null, "subsystems": "block", "rev": null, "vendor": null, "zoned": "none"}
   ]
}
MidoCG commented 3 days ago

Hello @ruleechen has this been solved ? I face the same issue, sorry for the ping.

ruleechen commented 2 days ago

@MidoCG No. It's because of my old Armbian system. I have managed to upgrade my system to latest version. Everything works good then.