alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.55k stars 221 forks source link

🐛 [Multiple] localdisk mounts using label show up as empty folder #1055

Closed nkm8 closed 1 year ago

nkm8 commented 1 year ago

Description

I have 2 localdisk mounts available - both with drive labels. I am seeing very odd behavior where 1 of the drives will mount in the addon as an empty folder when using the label.

Working:

Broken:

Interestingly, this doesn't apply to all addons. I also observed that when I mount the drive in question by name instead of label, it shows up correctly in the addon. This is currently a workaround, but isn't ideal because a folder of sdb mounted in the addon isn't very descriptive.

Reproduction steps

1. Configure addon with multiple localdisk mounts using labels
2. Observe folder in `/mnt` is empty

Addon Logs

Broken:

Starting...
/etc/cont-init.d/00-banner.sh: executing

-----------------------------------------------------------
 Add-on: Cloudcommander
 Cloud Commander a file manager for the web with console and editor
-----------------------------------------------------------
 Add-on version: 16.17.7
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.10.5
 Home Assistant Supervisor: 2023.10.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
localdisks='NUC-INT-SSD,NUC-EXT-HDD'
Timezone set from Etc/UTC to America/New_York
/etc/cont-init.d/00-local_mounts.sh: executing
---------------------------------------------------
[09:19:32] INFO: Available Disks for mounting :
NAME        LABEL            SIZE FSTYPE   RO
sda         NUC-INT-SSD      1.8T ext4      0
sdb         NUC-EXT-HDD      4.6T ext4      0
|-nvme0n1p1 hassos-boot       32M vfat      0
|-nvme0n1p2                   24M squashfs  0
|-nvme0n1p3                  256M squashfs  0
|-nvme0n1p4                   24M squashfs  0
|-nvme0n1p5                  256M squashfs  0
|-nvme0n1p7 hassos-overlay    96M ext4      0
`-nvme0n1p8 hassos-data    476.3G ext4      0
---------------------------------------------------
Supported fs :  ext3 ext2 ext4 squashfs vfat msdos iso9660 btrfs
Inspired from : github.com/dianlight
---------------------------------------------------
Local Disks mounting...
... NUC-INT-SSD is a device by label
[09:19:32] INFO: Mounting NUC-INT-SSD of type ext4
[09:19:32] INFO: Success! NUC-INT-SSD mounted to /mnt/NUC-INT-SSD
... NUC-EXT-HDD is a device by label
[09:19:32] INFO: Mounting NUC-EXT-HDD of type ext4
[09:19:32] INFO: Success! NUC-EXT-HDD mounted to /mnt/NUC-EXT-HDD
/etc/cont-init.d/00-smb_mounts.sh: executing
/etc/cont-init.d/01-config_yaml.sh: executing
[09:19:32] INFO: Load environment variables from /config/addons_config/cloudcommander/config.yaml if existing
/etc/cont-init.d/01-custom_script.sh: executing
[09:19:32] INFO: Execute /config/addons_autoscripts/cloudcommander.sh if existing
[09:19:32] INFO: ... no script found
/etc/cont-init.d/99-run.sh: executing
[09:19:33] INFO: Starting...
url: http://localhost:8000/api/hassio_ingress/XXXX/
[09:19:36] INFO: Started !
GET / 302 2.376 ms - 86

Working:

Starting...
/etc/cont-init.d/00-banner.sh: executing

-----------------------------------------------------------
 Add-on: Cloudcommander
 Cloud Commander a file manager for the web with console and editor
-----------------------------------------------------------
 Add-on version: 16.17.7
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.10.5
 Home Assistant Supervisor: 2023.10.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
localdisks='NUC-INT-SSD,sdb'
Timezone set from Etc/UTC to America/New_York
/etc/cont-init.d/00-local_mounts.sh: executing
---------------------------------------------------
[09:20:44] INFO: Available Disks for mounting :
NAME        LABEL            SIZE FSTYPE   RO
sda         NUC-INT-SSD      1.8T ext4      0
sdb         NUC-EXT-HDD      4.6T ext4      0
|-nvme0n1p1 hassos-boot       32M vfat      0
|-nvme0n1p2                   24M squashfs  0
|-nvme0n1p3                  256M squashfs  0
|-nvme0n1p4                   24M squashfs  0
|-nvme0n1p5                  256M squashfs  0
|-nvme0n1p7 hassos-overlay    96M ext4      0
`-nvme0n1p8 hassos-data    476.3G ext4      0
---------------------------------------------------
Supported fs :  ext3 ext2 ext4 squashfs vfat msdos iso9660 btrfs
Inspired from : github.com/dianlight
---------------------------------------------------
Local Disks mounting...
... NUC-INT-SSD is a device by label
[09:20:44] INFO: Mounting NUC-INT-SSD of type ext4
[09:20:44] INFO: Success! NUC-INT-SSD mounted to /mnt/NUC-INT-SSD
... sdb is a physical device
[09:20:44] INFO: Mounting sdb of type ext4
[09:20:44] INFO: Success! sdb mounted to /mnt/sdb
/etc/cont-init.d/00-smb_mounts.sh: executing
/etc/cont-init.d/01-config_yaml.sh: executing
[09:20:44] INFO: Load environment variables from /config/addons_config/cloudcommander/config.yaml if existing
/etc/cont-init.d/01-custom_script.sh: executing
[09:20:44] INFO: Execute /config/addons_autoscripts/cloudcommander.sh if existing
[09:20:44] INFO: ... no script found
/etc/cont-init.d/99-run.sh: executing
[09:20:44] INFO: Starting...
url: http://localhost:8000/api/hassio_ingress/XXXX/
[09:20:46] INFO: Started !
GET / 302 2.708 ms - 86


### Architecture

amd64

### OS

HAos
alexbelgium commented 1 year ago

Thanks for reporting! I've updated cloudcommander, please let me know if it is solved

nkm8 commented 1 year ago

Thanks for the quick response - I updated and re-tested, but unfortunately I am still seeing the same issue:

Starting...
/etc/cont-init.d/00-banner.sh: executing

-----------------------------------------------------------
 Add-on: Cloudcommander
 Cloud Commander a file manager for the web with console and editor
-----------------------------------------------------------
 Add-on version: 16.17.7-2
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.10.5
 Home Assistant Supervisor: 2023.10.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
localdisks='NUC-INT-SSD,NUC-EXT-HDD'
Timezone set from Etc/UTC to America/New_York
/etc/cont-init.d/00-local_mounts.sh: executing
---------------------------------------------------
[22:59:21] INFO: Available Disks for mounting :
NAME        LABEL            SIZE FSTYPE   RO
sda         NUC-INT-SSD      1.8T ext4      0
sdb         NUC-EXT-HDD      4.6T ext4      0
|-nvme0n1p1 hassos-boot       32M vfat      0
|-nvme0n1p2                   24M squashfs  0
|-nvme0n1p3                  256M squashfs  0
|-nvme0n1p4                   24M squashfs  0
|-nvme0n1p5                  256M squashfs  0
|-nvme0n1p7 hassos-overlay    96M ext4      0
`-nvme0n1p8 hassos-data    476.3G ext4      0
---------------------------------------------------
Supported fs :  ext3 ext2 ext4 squashfs vfat msdos iso9660 btrfs
Inspired from : github.com/dianlight
---------------------------------------------------
Local Disks mounting...
... NUC-INT-SSD is a device by label
[22:59:21] INFO: Mounting NUC-INT-SSD of type ext4
[22:59:21] INFO: Success! NUC-INT-SSD mounted to /mnt/NUC-INT-SSD
... NUC-EXT-HDD is a device by label
[22:59:21] INFO: Mounting NUC-EXT-HDD of type ext4
[22:59:21] INFO: Success! NUC-EXT-HDD mounted to /mnt/NUC-EXT-HDD
/etc/cont-init.d/00-smb_mounts.sh: executing
/etc/cont-init.d/01-config_yaml.sh: executing
Load environment variables from /config/addons_config/cloudcommander/config.yaml if existing
---------------------------------------------------------
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
... no env variables found, exiting
/etc/cont-init.d/01-custom_script.sh: executing
Execute /config/addons_autoscripts/cloudcommander.sh if existing
---------------------------------------------------------
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
... no script found, exiting
/etc/cont-init.d/99-run.sh: executing
[22:59:22] INFO: Starting...
url: http://localhost:8000/api/hassio_ingress/XXXX/
[22:59:23] INFO: Started !
alexbelgium commented 1 year ago

I'm sorry I don't have additional ideas... On my system mounting 2 disk by labels works. Have you tried rebooting just in case? Otherwise i'm sorry I don't see how to help you

nkm8 commented 1 year ago

I have rebooted several times - no difference. It is odd that some addons work and others don't, but there is a workaround, so everything is still functional.

Thanks for your help!

nkm8 commented 1 year ago

Closing - I took a closer look and the mount by label in Emby is also broken. That means that it is consistently broken, which makes me feel better.

alexbelgium commented 1 year ago

So strange, it works for me...

nkm8 commented 1 year ago

It used to work for me, too. I can't think of any changes I made to HASSOS recently, but based on the backup files in Emby, it stopped working on 10/28. This aligns with the usual Friday updates, but I didn't see any relevant changes in the changelog.

alexbelgium commented 1 year ago

Thanks, my last update on the local mount script was on 07 Oct but the emby version prior to 28-Oct was on 20-Oct. So the local mount script was the same