[New Addon] Samba NAS. (Mount external disk and share it )

Lucio,

this is the stamp of log in trace mode:

[services.d] starting services
[services.d] done.
[10:22:53] INFO: Starting the Plex Media Server...
[10:22:53] TRACE: bashio::config.has_value: networkdisks
[10:22:53] TRACE: bashio::config: networkdisks
[10:22:53] TRACE: bashio::jq: /data/options.json if (.networkdisks == null) then
            null
        elif (.networkdisks | type == "string") then
            .networkdisks // empty
        elif (.networkdisks | type == "boolean") then
            .networkdisks // false
        elif (.networkdisks | type == "array") then
            if (.networkdisks == []) then
                empty
            else
                .networkdisks[]
            end
        elif (.networkdisks | type == "object") then
            if (.networkdisks == {}) then
                empty
            else
                .networkdisks
            end
        else
            .networkdisks
        end
[10:22:53] TRACE: bashio::var.has_value: //192.168.178.1/fritz.nas/Elements4TB_ANIMAZIONE
//192.168.178.1/fritz.nas/FILM_Elements2TB
[10:22:53] TRACE: bashio::config: networkdisks
[10:22:53] TRACE: bashio::jq: /data/options.json if (.networkdisks == null) then
            null
        elif (.networkdisks | type == "string") then
            .networkdisks // empty
        elif (.networkdisks | type == "boolean") then
            .networkdisks // false
        elif (.networkdisks | type == "array") then
            if (.networkdisks == []) then
                empty
            else
                .networkdisks[]
            end
        elif (.networkdisks | type == "object") then
            if (.networkdisks == {}) then
                empty
            else
                .networkdisks
            end
        else
            .networkdisks
        end
[10:22:53] TRACE: bashio::config: cifsusername
[10:22:53] TRACE: bashio::jq: /data/options.json if (.cifsusername == null) then
            null
        elif (.cifsusername | type == "string") then
            .cifsusername // empty
        elif (.cifsusername | type == "boolean") then
            .cifsusername // false
        elif (.cifsusername | type == "array") then
            if (.cifsusername == []) then
                empty
            else
                .cifsusername[]
            end
        elif (.cifsusername | type == "object") then
            if (.cifsusername == {}) then
                empty
            else
                .cifsusername
            end
        else
            .cifsusername
        end
[10:22:53] TRACE: bashio::config: cifspassword
[10:22:53] TRACE: bashio::jq: /data/options.json if (.cifspassword == null) then
            null
        elif (.cifspassword | type == "string") then
            .cifspassword // empty
        elif (.cifspassword | type == "boolean") then
            .cifspassword // false
        elif (.cifspassword | type == "array") then
            if (.cifspassword == []) then
                empty
            else
                .cifspassword[]
            end
        elif (.cifspassword | type == "object") then
            if (.cifspassword == {}) then
                empty
            else
                .cifspassword
            end
        else
            .cifspassword
        end
[10:22:53] INFO: Network Disks mounting.. //192.168.178.1/fritz.nas/Elements4TB_ANIMAZIONE
//192.168.178.1/fritz.nas/FILM_Elements2TB
[10:22:53] INFO: Mount //192.168.178.1/fritz.nas/Elements4TB_ANIMAZIONE
[10:22:53] INFO: Success!
[10:22:53] INFO: Mount //192.168.178.1/fritz.nas/FILM_Elements2TB
[10:22:53] INFO: Success!

But , where really those dnetwork share are mounted in hassio file system? My doubt is regarding the ability of plex to read from a ā€œphysicalā€ location where all rights are set. Let me know, and excuse me about ā€œlinux/unixā€ doubt but Iā€™m a novice in this. Thanks.

Hi Lucio, some updates from my sideā€¦ I can tell you that my ā€œpermissionā€ problem is coming from shares made from Fritz!box that seems to not give ā€œread/writeā€ access to the hassio add-on. The same share takes from Mac or Windows can be used without problem, but not with linux: I tested in Ubuntu e mounted with smb protocol, and using a new installation (on Ubuntu) of PLEX, Iā€™ve the same behavior. Now Iā€™m investigating on thisā€¦ however, testing the same USB disk that Iā€™m using on Fritz!box, and sharing this from my Mac, Iā€™m able to read normally trought your add-on in hassio.
Now I need to understand why, because I need to maintain those disks mounted in a fixed position in my house, and the Fritz!box is the most good choice.
Mounting directly thhis USB on the raspberry, you think will be feasible and visible from the plex add-on?

Yes and no. The problem is the ntfs that is not fully supported. In my config I use an usb on raspberry shared with sambanas and remount in plex on the same rpi. The fs is ext4.

L

Is it possible to chose which folders are exposed? I would like to not share /config

The base is the official samba share addon so no.
Open an issue in the GitHub repository I will try to implement in next releases

Ok Lucio, is however a combination between fritzbox ā€œsharesā€ support ad maybe NTFS, I also make a test formatting a new disk in ext4, attach to the fritzbox and try to mount directly with your plex addon. Result the same that Iā€™ve with NTFS drive (permission problem). The usb drive format in EXT managed with sambanas and then mount with your addon (usb disk directly attached to the raspberry) works fine! At this point Iā€™ve to choices, format my drives (3 and 4TB full of movies) in EXT or wait for your future implementations of addons implementing NTFS :grin:! Thanks a lot for your work!

Use the ext4 fs. The linux kernel rw support for NTFS is planned ā€œtill the cows come homeā€.

The only support for NTFS is with fuse drivers and samba has a lot of issue with it.

Ref: https://www.phoronix.com/scan.php?page=news_item&px=Paragon-Read-Write-NTFS-Linux

L.

:rofl: :+1:

I installed this today to use a USB drive Iā€™ve had on the network instead of on my PC. It works except that the NTFS partition shows up as read only. The smaller Linux partition is writeable.

Iā€™ve seen that NTFS will be slow which is OK for now, and I realy donā€™t want to try to move all the files from there to something else to reformat the partition.

Any chance NTFS will be writeable at some point?
Thanks,

I could not quite figure out if with this addon I can map an SMB share in HA?
Can anyone clarify this?

This publishes a share so other devices can access it, not mounting in HA.

1 Like

Thank you. Are you aware of another way to do it?

Just installed this wonderfull addon, all seams to be working.

But how do I fix this error in the log file

create_connection_session_info: guest user (from session setup) not permitted to access this share (DataDisk)
create_connection_session_info failed: NT_STATUS_ACCESS_DENIED

and is there a way to create more users, then the one in the config ?

This ā€œerrorā€ is caused by you trying to log in as a guest.

Use case? Probably there isnā€™t a way right now, this would be a feature request.

I donā€™t think itā€™s possible, however depending on your use there might be a way. What would you want to mount into HA?

Thanks, I only have 1 windows 10 PC, and thatā€™s has logged in to get access to the share.

Multiple users, folder with ā€œprivateā€ data, as only user X is assigned to that folder. We are more then 1 person living in the household. so shared data dirs, and private dirs

If youā€™re the only one who knows the password, and everyone else isnā€™t tech-savvy enough to find another folder, you could just mount the individual folders for each person.

Not a solution here :frowning:

I want to mount a music folder in HA to use as a source in Media Player

Du you know of a fix for the ā€œcreate_connection_session_info failed: NT_STATUS_ACCESS_DENIEDā€

My logs are flodded, when copying files to the shareā€¦