0

I have a NTFS drive binded into a directory inside my home (binding is specified in fstab), like this:

UUID=1A782A664EB8 /mnt/windows ntfs permissions,locale=en_US.utf8 0 2
/mnt/windows/Users/me/Documents /home/me/Documents none bind 0 0

The permissions are set 666 for files and 777 for directories.

This is my /etc/updatedb.conf:

PRUNE_BIND_MOUNTS="yes"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"

NOTE: home directory is not encrypted.

It seems that synapse fails to index those files. Is there a way to force synapse to index that directory?

lepe
  • 1,406

1 Answers1

2

It is possibile, but disabled by default. I am not sure what will happen to the NTFS file system if you index it with updatedb.

The thing is, Synapse uses Zeitgeist, that uses locate to find things.

Following this answer my /etc/updatedb.conf reads

cat /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"

Where these variables are documented in

man updatedb.conf

[...]
PRUNE_BIND_MOUNTS
              One of the strings 0, no, 1 or yes.  If PRUNE_BIND_MOUNTS  is  1
              or  yes,  bind  mounts are not scanned by updatedb(8).  All file
              systems mounted in the subtree of a bind mount  are  skipped  as
              well,  even  if they are not bind mounts.  As an exception, bind
              mounts of a directory on itself are not skipped.

So I would have to modify the first variale to "no" through

sudo nano /etc/updatedb.conf

Then modify it, then Ctrl+O to save, and Ctrl+X to exit.

Then

sudo updatedb

and try to locate something on that mount point to see if it works.

I repeat it here at the very end of the post: I do not know what would happen to a NTFS file system when scanned by updatedb (will it take forever? will it crash? will it corrupt the FS? I really have no idea).

dadexix86
  • 6,616
  • Thanks, I will try with setting: PRUNE_BIND_MOUNTS="no". But as far as I understand, that will scan everything, right? – lepe May 12 '16 at 09:34
  • All the binded mountpoints, yes. Then you can remove some of them by modifying the variable PRUNEPATHS, and writing there what you want to remove. – dadexix86 May 12 '16 at 09:35
  • dadexix86: I updated the question while you were writing your answer. – lepe May 12 '16 at 09:36
  • @lepe ok, but I do not see how that update would modify my answer ;) Try with the "no" and let me know :) – dadexix86 May 12 '16 at 09:38
  • ok I see. I think I misunderstood what "PRUNE_BIND_MOUNTS" means. I think you are right. I will wait until "updatedb" finishes and let you know. – lepe May 12 '16 at 09:38
  • PRUNE_SOMETHING means "remove" that "something :) "to prune" is to cut some branches of trees, in order to making them growing better. – dadexix86 May 12 '16 at 09:40
  • Great! that did the trick :) Thanks for your explanation... now its clear to me. (I had to logout so synapse also updated the search results) – lepe May 12 '16 at 09:49
  • Good to know! Till next time! – dadexix86 May 12 '16 at 09:50