I have MiniDLNA installed and it's working perfectly. However what I want is MiniDLNA to be able to index files stored on USB Devices as soon as the USB device is plugged in and remove those files from the index as soon as the USB device is removed. I am using usbmount to mount USB devices automatically.

1 Answer 1


Just create media_dir for each /media/usb1 /media/usb2 etc inotify should be able to discover new files in those directories and remove them if the directory content disappears.

  • 1
    But the directory doesn't disappear right? The contents inside of it disappears. Moreover I don't know why but inotify doesn't seem to be working. Commented Oct 19, 2017 at 17:50
  • You might need to enable it depending on distribution
    – jdwolf
    Commented Oct 20, 2017 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.