Indexing shadow volumes with Spotlight

Discussion in 'Apple' started by Alan Munn, Oct 7, 2007.

  1. Alan Munn

    Alan Munn Guest

    I found this tip http://www.dreness.com/blog/archives/16 on how to index
    read-only volumes with Spotlight. The tip seems reasonable, (and very
    useful) and correctly mounts the shadow volume, but for some reason I
    get an error when the script tries to turn on the indexing for the
    shadowed volume.

    Does anybody have any ideas?

    Thanks,

    Alan

    The script is below:

    #!/bin/sh
    # pass in the name of the r/o volume, e.g. DiskWarriorCD
    # this is proof of concept only. seriously :)
    if [ ! $1 ] ; then echo "supply a volume name" ; exit 1 ; fi
    vol=$1
    rodevpath=`df | grep "$vol" | awk '{print $1}'`
    fspath=`df | grep "$vol" | awk '{print $6}'`
    sudo hdiutil unmount $rodevpath
    sudo hdiutil mount $rodevpath -shadow "/tmp/$vol.shadow"
    sudo mdutil -i on $fspath
    sudo mdutil -s $fspath
     
    Alan Munn, Oct 7, 2007
    #1
    1. Advertisements

  2. Alan Munn

    Alan Munn Guest

    Yes, I don't see any reason why it shouldn't have worked for me either.
    Is there any way to figure out why it didn't?

    Alan
     
    Alan Munn, Oct 7, 2007
    #2
    1. Advertisements

  3. Alan Munn

    Alan Munn Guest

    Well, actually you trimmed it out of the original message :). When I
    run the script, it unmounts the CD, (in my test case called PDF) mounts
    the shadow volume (which shows up in the Finder like a mounted disk
    image), but when it executes the "mdutil -i on" command it returns:

    /Volumes/PDF: Cannot set indexing status for volume.

    and then the "mdutil -s" returns

    /Volumes/PDF: Indexing Disabled.

    Does this help?

    Alan
     
    Alan Munn, Oct 8, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.