Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Try it out please: download an iso and place it in /data/iso eg:

[root@geppetto ~]# ls -al /data/iso
total 708620
drwxr-xr-x. 2 root root      4096 Oct 17 14:40 .
drwxr-xr-x. 3 root root      4096 Oct 17 14:36 ..
-rw-r--r--. 1 root root 725614592 Jul  7 19:26 CentOS-6.3-x86_64-LiveCD.iso

Then mount it

 [root@geppetto ~]# mkdir -p /media/centos6.3-64-live
 [root@geppetto ~]# 
 [root@geppetto ~]# mount -t iso9660 /data/iso/CentOS-6.3-x86_64-LiveCD.iso /media/centos6.3-64-live

then export it's parentdir via nfs,

[root@geppetto ~]# cat /etc/exports 
/export/iso cal-26.oma.be(ro)
[root@geppetto ~]# 
[root@geppetto ~]# service nfs reload
[root@geppetto ~]# showmount -e 
Export list for geppetto.oma.be:
/export/iso cal-26.oma.be
[root@geppetto ~]# 

Then mount it on the client

[root@cal-26 ~]# mount -v -t nfs puppet-me.oma.be:/export/iso /geppettoiso
mount.nfs: timeout set for Thu Oct 25 13:39:16 2012
mount.nfs: trying text-based options 'vers=4,addr=192.168.16.49,clientaddr=192.168.15.194'
[root@cal-26 ~]# 

On the NFS server it is browsable:

[root@geppetto media]# ls -al
total 10
drwxr-xr-x.  3 root root 4096 Oct 17 15:23 .
dr-xr-xr-x. 26 root root 4096 Oct 25 11:28 ..
dr-xr-xr-x.  5 root root 2048 Jul  7 19:23 centos6.3-64-live
[root@geppetto media]# 
[root@geppetto media]# ls -al /media/centos6.3-64-live/
total 30
dr-xr-xr-x. 5 root root  2048 Jul  7 19:23 .
drwxr-xr-x. 3 root root  4096 Oct 17 15:23 ..
dr-xr-xr-x. 3 root root  2048 Jul  7 19:22 EFI
-r--r--r--. 1 root root 18416 Jul  7 19:23 GPL
dr-xr-xr-x. 2 root root  2048 Jul  7 19:23 isolinux
dr-xr-xr-x. 2 root root  2048 Jul  7 19:24 LiveOS
[root@geppetto media]#

but on the nfs client it looks just like if it is the original iso file:

[root@cal-26 geppettoiso]# ls -al /geppettoiso/CentOS-6.3-x86_64-LiveCD.iso 
-rw-r--r--. 1 root root 725614592 Jul  7 19:26 /geppettoiso/CentOS-6.3-x86_64-LiveCD.iso
[root@cal-26 geppettoiso]# 

original file:

[root@geppetto media]# ls -al /data/iso/CentOS-6.3-x86_64-LiveCD.iso
-rw-r--r--. 1 root root 725614592 Jul  7 19:26 /data/iso/CentOS-6.3-x86_64-LiveCD.iso
[root@geppetto media]# 

just for completeness:

[root@cal-26 geppettoiso]# mount | grep -i iso
puppet-me.oma.be:/export/iso on /geppettoiso type nfs4 (rw,relatime,vers=4.0,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.15.194,local_lock=none,addr=192.168.16.49)
[root@cal-26 geppettoiso]# 


[root@geppetto media]#  mount | grep -i iso
/data/iso/CentOS-6.3-x86_64-LiveCD.iso on /media/centos6.3-64-live type iso9660 (ro,loop=/dev/loop0)
/data/iso on /export/iso type none (rw,bind)
[root@geppetto media]# 
share|improve this question
    
FYI: if you try to export the mounted iso, it gives no error, but if you try to mount that on an nfs client, you get on the client, that the clientdir is not a directory: eg: root@cal-00:~# mount -v -t nfs puppet-me.oma.be:/data/iso/CentOS-6.3-x86_64-LiveCD.iso /mnt/geppettoiso mount.nfs: timeout set for Thu Oct 25 10:31:25 2012 mount.nfs: trying text-based options 'vers=4,addr=192.168.16.49,clientaddr=192.168.15.2' mount.nfs: mount(2): Not a directory mount.nfs: mount point /mnt/geppettoiso is not a directory root@cal-00:~# –  Joost Ringoot Oct 25 '12 at 11:50

1 Answer 1

From what I can gather, once your NFS share is mounted, simply mount the ISO on the client machine. The NFS share is treated as part of the local filesystem.


Source: http://www.linuxquestions.org/questions/linux-newbie-8/browsing-an-iso-file-in-a-nfs-share-547209/

share|improve this answer
    
Sorry for being a pain Kyle, what you say works indeed : "mount -t iso9660 /geppettoiso/CentOS-6.3-x86_64-LiveCD.iso /media/centos-iso" But the reference you give is not explaining my question. The NFS share is treated as part of the filesystem, but not the isomount. Why is the iso-mount lost through the nfs-mount? BTW: I am trying to make the clientside as light as possible, since it is intended to be a pxe-install. –  Joost Ringoot Oct 25 '12 at 12:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.