Skip to main content

As many have discovered many legacy NAS devices do not support anything other than SMB1 out of the box, and are no longer supported by their manufacturers, meaning there are no firmware of software updates. With a little digging (and some Linux knowledge), I was able to upgrade my Netgear Stora (about 12 years old) from SMB1 to SMB2 and thus get it working with the new Sonos environment. I find it surprising that I had to do this, given the large number of legacy NAS devices out there used for years by many happy Sonos customers (until now), even my shiny new Macbook Air, can use SMB1 to connect to such devices. Anyway that’s another issue.

You need to have some technical Linux knowledge to do the following, it’s all done via a ssh session to the NAS.

Here’s what I did. (Big thanks to the guys at OpenStora for documenting most of this.)

  1. Get root access, and enable SSH, as most of these domestic NAS units do not provide a command line interface. Details here https://sigri44.github.io/OpenStora/wiki/index_Easy_Root_Access.html
  2. Install a package manager - ipkg  here https://sigri44.github.io/OpenStora/wiki/index_Installing_a_package_manager.html

  3. Using the newly installed package manager you can install a version of Samba that includes SMB2 support. That package is located at at the ipkg repository and you install with /opt/bin/ipkg install http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/samba36_3.6.23-1_arm.ipk
  4. You’ll get a message something like this upon successful install “

    The original samba version 2 config (/etc/samba/smb.conf) is no longer

    working with this version of samba.

    Please create a new samba version 3 config (/opt/etc/samba/smb.conf).

    After verify your smb.conf file, modify and execute /opt/etc/init.d/S08samba

    to activate the samba version 3.”

  5. Copy the original smb.conf to the new location above, and edit the file with vi or nano and add the line “max protocol = SMB2” in the Global section (without the quotes) to force use of SMB2. Your shares should carry over from the original conf file.

  6. Edit the /opt/etc/init.d/S08samba file and replace pidof with pgrep (as pidof command does not seem to exist in the Stora

  7. Next you need to make a Stora user an SMB user too, so do this with your default user (whoever logged in to the SMB1 share from Sonos), by adding them as users and then giving them a password. They SMB username/password should be the same as for logging in to Stora as normal (you are just letting them use SMB too). Do this with /opt/bin/smbpasswd -a <username>

  8. Next stop the existing SMB1 with killall smb, and start SMB2 with /opt/etc/init.d/S08samba

  9. Now try connecting from a PC/Mac to your NAS, on a Mac use the Finder and Connect to Server option. Make sure to prefix the NAS name with smb:// to force an SMB2 connection. And hopefully you will connect successfully.

  10. If you can’t connect as the specified user you may need to edit smb.conf further (beyond this article scope!)

  11. If you do connect then now try adding your library to Sonos. For me this connected and started to index, but stopped after about 20 minutes. I did it 10 or more times and eventually all of my music collection magically appeared in the Sonos app.

I know this is pretty techie, but I wanted to show that it can be done, without the need to jettison either your Sonos kit or you NAS.

Ian

A couple of more points to add, this fix applies to a broad family of NAS devices based around HipServ OS, and includes the following:

  • Seagate GoFlex Home 
  • LaCie Ethernet Disk mini – Home Edition
  • Verbatim MediaShare
  • Raidsonic IcyBox IB-NAS6210 
  • Medion Lifecloud 2-bay NAS

On point 11, in the post above, the failure to finish indexing (which other users have reported), seems to be caused by the SMB client (i.e. Sonos) running out of SMB ‘credits’. Once the credits reach zero, the connection is closed and hence why indexing stops - this is most likely a bug. However, if you re-add the SMB share, indexing picks up where it left off. So if you rinse and repeat a few times, eventually it works and you will have your music library back.

Ian 


On point 11, in the post above, the failure to finish indexing (which other users have reported), seems to be caused by the SMB client (i.e. Sonos) running out of SMB ‘credits’. Once the credits reach zero, the connection is closed and hence why indexing stops - this is most likely a bug. However, if you re-add the SMB share, indexing picks up where it left off. So if you rinse and repeat a few times, eventually it works and you will have your music library back.

Ian 

I suffer from the indexing issue with my SMBv2 NAS drive. Many times it fails quite quickly, claiming the drive is no longer available, and then randomly deciding to work. Recently I have been able to index all my music after multiple attempts. It would be great if this defect with SMB credits could be resolved.


On point 11, in the post above, the failure to finish indexing (which other users have reported), seems to be caused by the SMB client (i.e. Sonos) running out of SMB ‘credits’. Once the credits reach zero, the connection is closed and hence why indexing stops - this is most likely a bug. However, if you re-add the SMB share, indexing picks up where it left off. So if you rinse and repeat a few times, eventually it works and you will have your music library back.

Ian 

I suffer from the indexing issue with my SMBv2 NAS drive. Many times it fails quite quickly, claiming the drive is no longer available, and then randomly deciding to work. Recently I have been able to index all my music after multiple attempts. It would be great if this defect with SMB credits could be resolved.

 

Exactly, this is the message in the smb.log file that led me to that conclusion:

smb2_validate_message_id: client used more credits than granted, mid 132097, credits_granted 0, seqnum low/range: 132097/0

According to the Samba documentation this should never happen, but lo and behold there it is. I did try to increase (x 2) the credits in the smb.conf file, but it had no effect, indicating a subtle bug somewhere.

And this is only an issue with indexing, it doesn’t affect playback. FYI


Agreed. Once the index is done, all is well. Problem is that I keep picking up cheap CDs on eBay and having to add them 😀


This is a lie. It has nothing to do with SMB.  

 


This is a lie. It has nothing to do with SMB.  

 

It has everything to do with SMB, as SMB is the connection protocol between Sonos and the NAS (or music library) for both indexing and playback. Clearly in some cases, when indexing,  there is a bug (evidenced in the smb.log file), about the SMB client (which is of course Sonos) running out of SMB credits. As I said elsewhere according to the SAMBA documentation, this should never happen, but clearly it does for some users.


I’ve also noticed that SMB credits error in the Samba log. I have quite an old WD My Book Live NAS server, but it does support SMBv2.

What I’ve noticed though is that whenever the index fails with the ‘NAS drive no longer available’ popup, it’s always accompanied by the SMB credits error, but conversely on some occasions, when the SMB credits error appears, it doesn’t always seem to result in the index process terminating.

I wonder if this error is occurring at some transient point in the process, which more often than not results in failure, but on some occasions it somehow recovers without proving fatal.

I often find if I switch network ports on my Windows PC that initiates the index (eg switch from the hardwire ethernet to WiFi), and rerun, then the index will complete. After a few more re-runs though the same error occurs, I switch ports again, back to ethernet, and lo and behold it works, for a while etc etc,

It all seems very hit and miss and I wonder if variables like which Sonos speaker is selected for the index rebuild have a bearing on whether it’s more likely to succeed before the index is replicated around other speakers/amps.

For info, this is the SMB credits error in the Samba log:

a2024/10/03 10:55:22.442893,  0] smbd/smb2_server.c:328(smb2_validate_message_id)
  smb2_validate_message_id: client used more credits than granted message_id (66562)

I have incidentally tried increasing the max credits parameter in the Samba config, but it doesn’t seem to have affected the success rate and as I said, even when the credit error occurs, the indexing doesn’t necessarily always seem to terminate. It’s just the opposite is true, when it does terminate, the credit error is always thrown.


@SteveWelham Your experience chimes almost precisely with mine. In actual fact, I only recently decommissioned an old MYBOOKLIVE where I had kept my MP3s. And when I say decommissioned I mean largely smash apart to get to the hard drive which I’ve kept for no particular reason.

Unfortunately this has been a problem for years. For a good while I fixed my router’s SAMBA server to SMBv1 and used a USB drive plugged into one of my mesh nodes. Never any issues. Then Sonos ended SMBv1 support for S2 systems. Now I see intermittent issues because I have to set SAMBA to SMBv1+SMBv2.

Sometimes the index completes. Then I can use my system fine.  But then if I want to add an album, the index might fail. I never have problems playing anything that has successfully indexed.

i fear there will never be a permanent fix because it only affects some configurations (certain router brands and/or NAS drives). I am still mulling a Pi5 solution using OpenMediaVault but have not got round to it yet. And Sonos’ focus is on streaming, not local libraries. 
 

 


 

Unfortunately this has been a problem for years. For a good while I fixed my router’s SAMBA server to SMBv1 and used a USB drive plugged into one of my mesh nodes. Never any issues. Then Sonos ended SMBv1 support for S2 systems. Now I see intermittent issues because I have to set SAMBA to SMBv1+SMBv2.

Sometimes the index completes. Then I can use my system fine.  But then if I want to add an album, the index might fail. I never have problems playing anything that has successfully indexed.

i fear there will never be a permanent fix because it only affects some configurations (certain router brands and/or NAS drives). I am still mulling a Pi5 solution using OpenMediaVault but have not got round to it yet. And Sonos’ focus is on streaming, not local libraries. 
 

 

I don’t understand why the dropped support for SMB1, it should be SMB2/3 by default, sure, but give the user (paying customer) the choice, of SMB1 if that’s all their NAS supports.

As an FYI, I upgraded my NAS to SMB2 (as described above), and disabled SMB1, as it is no longer needed. So the error happens when only SMB2 is running too. Checking the SAMBA documentation states that the ‘credits’ issue should not happen. So it’s clearly a bug in the Sonos SMB2 client.


I’ve also noticed that SMB credits error in the Samba log. I have quite an old WD My Book Live NAS server, but it does support SMBv2.

What I’ve noticed though is that whenever the index fails with the ‘NAS drive no longer available’ popup, it’s always accompanied by the SMB credits error, but conversely on some occasions, when the SMB credits error appears, it doesn’t always seem to result in the index process terminating.

For info, this is the SMB credits error in the Samba log:

<2024/10/03 10:55:22.442893,  0] smbd/smb2_server.c:328(smb2_validate_message_id)
  smb2_validate_message_id: client used more credits than granted message_id (66562)

I have incidentally tried increasing the max credits parameter in the Samba config, but it doesn’t seem to have affected the success rate and as I said, even when the credit error occurs, the indexing doesn’t necessarily always seem to terminate. It’s just the opposite is true, when it does terminate, the credit error is always thrown.

 

Same issue as I reported above.

 

@Keith N @Corry P  Can this be reported as a bug on the Trello board?

 


Hi @Ianp 

You’ve tagged the wrong Keith. It’s @Keith N 


I’m hesitant to say this, but since the 80.09.09 update on 16th Oct, my Music Library re-index seems to work ok when I initiate it from the PC Controller App.

The release notes for the 80.10.06 (Android) software mention Music library indexing and reliability improvements, but no mention under IOS or PC. It seems though improvements have also been made for the PC platform, or perhaps changes to the speaker firmware itself has resolved the issue.


I’m hesitant to say this, but since the 80.09.09 update on 16th Oct, my Music Library re-index seems to work ok when I initiate it from the PC Controller App.

The release notes for the 80.10.06 (Android) software mention Music library indexing and reliability improvements, but no mention under IOS or PC. It seems though improvements have also been made for the PC platform, or perhaps changes to the speaker firmware itself has resolved the issue.

Yes, same for me.

It would be great if someone from Sonos could advise whether the new firmware made changes to indexing of Samba shares and fixed any issues with limits or special characters or anything else.

Would be much appreciated 😀


Hi @DGR1 

A few different issues were addressed. Among them were:

  • Paths to Music Library being removed if SMBv1 is detected
  • Buffalo Linkstation NAS indexing fixed
  • Music Library stops indexing suddenly (I’m not sure what changes were made for this - it may have addressed special characters)
  • Unable to add share on router-connected USB drives

More fixes for Music Library are still to come.

I hope this helps.


Hi @DGR1 

A few different issues were addressed. Among them were:

  • Paths to Music Library being removed if SMBv1 is detected
  • Buffalo Linkstation NAS indexing fixed
  • Music Library stops indexing suddenly (I’m not sure what changes were made for this - it may have addressed special characters)
  • Unable to add share on router-connected USB drives

More fixes for Music Library are still to come.

I hope this helps.

Wow. That’s fantastic news @Corry P. I have reindexed a few times since the new firmware was released and seen no errors; part of my push to clean up my music library tagging, reduce the number of genres I use, standardise album art etc etc. My share is currently on a router-connected USB drive as it means I don’t have to run another device 24x7.

Thanks again for the feedback, and I will of course report any errors I do experience.