I use autofs to mount some iso files in folder /mnt/iso:
Fedora-13-x86_64-DVD.iso
Fedora-14-x86_64-DVD.iso
Fedora-15-x86_64-DVD.iso
The autofs is working fine and I can see the contents of iso files:
# ls /mnt/iso/fedora.13/
# ls /mnt/iso/fedora.14/
# ls /mnt/iso/fedora.15/
After finish the autofs testing. I force unmount all iso folders:
# umount -l /mnt/iso/*
I then export the /mnt/iso in /etc/exports:
/mnt/iso 192.168.0.0/24(ro,insecure,crossmnt,all_squash)
The NFS service is working fine too. I may mount the /mnt/iso from another machine via nfs client:
# mount -t nfs4 <nfs-server>:/mnt/iso /mnt
I can see all iso mount in /mnt/ folder:
# ls /mnt
dr-xr-xr-x 15 nobody nobody 4096 2011-06-11 10:23 .
drwxr-xr-x 24 root root 4096 2011-02-08 08:45 ..
drwxr-sr-x 7 nobody nobody 4096 2010-05-13 09:06 fedora.13
drwxr-sr-x 7 nobody nobody 4096 2010-10-22 02:32 fedora.14
drwxrwsr-x 7 nobody nobody 4096 2011-05-14 03:50 fedora.15
However, when I try to list the contents for each folder:
# ls /mnt/fedora.13
Nothing shown on screen. Using command like this
# ls /mnt/fedora.13/*
prompt
ls: cannot access /mnt/fedora.13/*: No such file or directory
The only case I success to list out the content of the iso folders in nfs client machine is using this steps:
Unmount nfs share from client machine:
# umount /mnt
using ls to show all sub-trees of /mnt/iso in nfs server:
# ls /mnt/iso/*
The autofs will mount all iso files automatically.
Mount the nfs folder in client machine:
# mount -t nfs4 <nfs-server>:/mnt/iso /mnt
List the sub-trees of /mnt:
# ls /mnt/*
You may then see all the contents in nfs client machine.
However, this defeat the purpose of autofs, as I need to show the contents once in the autofs machine first.
Does anyone has any ideas? I am using the following:
- Fedora 13 x86_64
- autofs-5.0.5-28
- nfs-utils-1.2.2.2-2