Results 1 to 8 of 8

Thread: Synapse and NAS mount

  1. #1
    Join Date
    Nov 2013
    Beans
    17

    Synapse and NAS mount

    Hi everyone.
    I've installed Synapse for the first time, and I think I can't live without it nomore
    The only problem I'm facing so far is that my mounted partitions in network NAS aren't indexed, so I can't use Synapse to search documents there.
    THe partitions are mounted on startup via fstab using cifs.
    Any hint?

    Thanks
    MIX

  2. #2
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    813
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Synapse and NAS mount

    Hi there,
    Synapse is awesome indeed. It uses the locate command to find files, which in turn depends on updatedb to index and update the database. What you need is to edit /etc/updatedb.conf (as root) to make changes to the indexing process in order to include you NAS.
    First, make sure your NAS mount point does not fall under one of the PRUNEPATHS, and if so remove the directory entry.
    Then, do the same for the PRUNEFS. For instance, if your NAS uses CIFS, you want to remove cifs from the PRUNEFS list.
    Save the file and run
    Code:
    sudo updatedb
    (Note: updatedb is scheduled daily in Ubuntu)

    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  3. #3
    Join Date
    Nov 2013
    Beans
    17

    Re: Synapse and NAS mount

    Hi LewisTM,
    thanks for the infos. I will try your suggestion.
    Side question. I get some errors/warnings during boot about the cifs mount, due to the fact the networking isn't alreay up and the NAS can't be reached so the OS can't mount the folders. By the way, after login the folders are there. Is it possible that updatedb tries to update the db during boot, so the folders aren't reachable? Or does it start working after login? Or maybe I can set a sort of delay?
    Note that I haven't made any tests yet. Just asking.

    Thanks
    MIX

  4. #4
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    813
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Synapse and NAS mount

    Don't worry about the networking error. It happens all the time since Network Manager is run after login. The successful connection triggers autmounting for all network drives in fstab.
    As for the run time, it defaults to once per day, allowing a 5-minute delay (for booting).
    The settings are in /etc/anacrontab, the commands in /etc/cron.daily
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  5. #5
    Join Date
    Nov 2013
    Beans
    17

    Re: Synapse and NAS mount

    Tested it. It works. Actualy, the access of documents on NAS is slower, not immediate like document on PC. Is it right? I thought that, since everything is indexed on the PC, retrieving data locally and remotely will take the same amount of time.

    The PRUNEPATH includes /media, that is where Imount my NAS folders. By the way, is quite right to prune that path, since it's where USB pens, cd and so on will be mounted, and these are things that I don't want to track. I tried to change the mount point to /mnt, but than the folders aren't shown in nautilus under "Network".
    Any hint about where to mount the NAs folders? A folder in my home could be a solution, but I find more "elegant" to have something like a /media path, that I don't really see in my personal folders.

    Thanks again!
    MIX

  6. #6
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    813
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Synapse and NAS mount

    Indexing the filename won't cache the file contents on your hard drive, so it won't make access faster.
    Starting from Ubuntu 12.10, hot-plugged media are mounted in /media/<yourname> instead of just /media
    So a trick would be to list /media/<yourname> (and any other user) in PRUNEPATHS, but leave out /media per se. If your NAS is mounted under /media/<cifs-nas>, you should be home free.

    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  7. #7
    Join Date
    Nov 2013
    Beans
    17

    Re: Synapse and NAS mount

    Good to know.
    So, issue resolved! Thanks LewisTM.

    Just another "the more you know" question.
    I have a single user system, so it's no big deal to add to PRUNE list "/media/my-name". In a multi user environment, how to set to prune all users media folders? Do I need to set all names ("/media/joe /media/jenny /media/so-and-so") or is there a more clever way?

  8. #8
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    813
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Synapse and NAS mount

    I don't know of any clever way. I think it stems from the fact that we're just not supposed to mount anything in /media from fstab, it's reserved for hot-plugged devices. Although I will agree that being able to see the drive in the file manager is a plus for many users.

    In theory, you're supposed to mount network drives somewhere out of the way (which CAN be indexed, provided its fs is not in PRUNEFS). If there are parts of the drive you want to use often, you create symlinks in your home directory, pointing to those directories. Another approach is to use Gigolo to autoconnect network locations at login, they will appear as shares on your desktop and file manager. No need for fstab then.

    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •