Disconnection from NAS causes Roon to think albums have been deleted

A lot of work was done in this area for 1.2. We think things are a lot more robust now. Please give it another shot and let us know how it goes.

@brian,

Since upgrading to 1.2 I’ve had two instances where Roon has “lost” some albums and started a rebuild.

All my music is stored on a QNAP NAS as a watched folder, and RoonServer is running on a MacMini mid 2012 i7 machine with SSD and 16GB (at least) of RAM. The watched folder path is “smb://nase55xxx/Roon”. I do not auto mount the drive on the Mac.

I have approx 12,000 albums. Running a rescan the number of albums drops to about 8,000 and Roon then starts finding the remaining tracks and slowly adding them back to the database. Clean up library currently shows 45,000 “deleted” tracks.

@vova, @mike, I might need some help getting this reproducible.

Just to be clear, it’s not every time.

I’ve also had some odd scans where track 11 of an album has suddenly been read as track 11 of disc 11, even though the metadata and file names have not changed.

Any idea what events might precede this happening?

Think about networking stuff, disconnects/connects, switching network interfaces, wake/sleep, stuff like that.

We used to have a reliable way to reproduce stuff like this by rebooting the NAS while Roon was running. We did a lot of NAS reboots a few weeks ago and got to where we couldn’t make it happen anymore.

The root cause of all of this is that OSX don’t give us a good way to distinguish “unmounted share, but mountpoint not deleted yet” from “mounted share that is empty”.

Sometimes the OS leaves things in a state where it still reports the share as mounted, but the mount-point has no files in it. Usually that state is pretty short, but if it sits that way for a long time (meaning, more than a couple of seconds), Roon could end up listing the directory and concluding that you’ve deleted all of your files because that’s kind of what the OS is portraying to us.

This is an annoying problem, that’s been affecting us to some extent since launch. We are handling cases one at a time. In some cases (like AFP mounts) this happens in ways that are too dangerous for us to support. With SMB it’s less common, but I bet there’s still a way to break it, and that’s what you’re seeing.

Let me play with my system over the weekend and try and replicate it. Weird thing to me is that the album count doesn’t drop to just Tidal, it usually drops about 1/3rd with the rest OK.

Roon’s currently stuck with 20 tracks not identified even after running overnight.

Thank you.