Skip to contentSkip to conversation

using --ghost with 'program' type maps

DISCUSSION Tom Urlings 2 participants 2 messages Apr 6, 2009 – Apr 12, 2009 Kernel automounter

lore
Share & tools
lore
#0 lore raw

hi all,
i have been using autofs for a long time now, using it to dynamically gather multimedia mounts using aufs locally and across local network.. however, ghosting is not supported for 'program' maps.. which makes sharing a autofs mount a bit odd..

example:
server:/srv/multimedia -> automounted locally on server
: uses aufs locally to mount all multimedia type directories on local storage

client:/opt/multimedia -> automounted locally on client
: uses aufs locally to mount all multimedia type directories on local storage and on automounted samba shares (also on server)

when server automount is mounted on client, server:/srv/multimedia is mounted, but (as spec'ed) ghosting is not performed, giving an empty directory..

looks like the lookup_ghost on client does nothing as there are no cached entries from the mapfile (program) available.. same goes on server:/srv/multimedia..

could this be easily integrated into the automount source?

i have been looking into it today, but it looks a bit quirky to just copy/paste the lookup_file.c:lookup_read_map into lookup_program.c:lookup_read_map (with all ancilliaries)..

idea is to have the program maps return a complete 'file' map when given no key on the commandline, and to 're-use' the lookup_file.c:lookup_read_map functionality in the lookup_program.c:lookup_read_map

do any of you have a direction into where i should start looking?

thanks in advance..

best regards,
tom urlings

Signature · 4 lines
Met vriendelijke groeten,
Best regards,

Tom Urlings
maintainer
#1 lore raw
Quoted 14 lines · Tom Urlings

hi all,
i have been using autofs for a long time now, using it to dynamically gather multimedia mounts using aufs locally and across local network.. however, ghosting is not supported for 'program' maps.. which makes sharing a autofs mount a bit odd..

example:
server:/srv/multimedia -> automounted locally on server
: uses aufs locally to mount all multimedia type directories on local storage

client:/opt/multimedia -> automounted locally on client
: uses aufs locally to mount all multimedia type directories on local storage and on automounted samba shares (also on server)

Quoted 8 lines

when server automount is mounted on client, server:/srv/multimedia is mounted, but (as spec'ed) ghosting is not performed, giving an empty directory..

looks like the lookup_ghost on client does nothing as there are no cached entries from the mapfile (program) available.. same goes on server:/srv/multimedia..

could this be easily integrated into the automount source?

Not really.
There would need to be a quite a lot done to re-structure program map lookup module and re-factor the tokenizer from the file file map lookup module. I really don't have time to devote to this atm.

Quoted 4 lines

i have been looking into it today, but it looks a bit quirky to just copy/paste the lookup_file.c:lookup_read_map into lookup_program.c:lookup_read_map (with all ancilliaries)..

There's a lot more to it than that.

Quoted 4 lines

idea is to have the program maps return a complete 'file' map when given no key on the commandline, and to 're-use' the lookup_file.c:lookup_read_map functionality in the lookup_program.c:lookup_read_map

That's been mentioned before and it should work but, by and large, program maps don't usually know their list of keys.

Ian