LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-11-2005, 05:54 AM   #1
pistachio
LQ Newbie
 
Registered: Jul 2005
Location: Barcelona, Spain
Distribution: Slackware 10.1
Posts: 18

Rep: Reputation: 0
Exporting mounted CD-ROM or DVD through NFS


Just I can't do it. The same as if I try to export some mounted filesystem.

If I wish to do a nfs remote installation through a mounted CD or DVD to a different machine, I cannot. I am forced to copy the contents of the CD to a local directory. Then, I can also do a ftp remote installation.

However, through any Windows, I can easily share any CD, DVD or Hard Drive without the need to copy all its contents.

Any suggestion?
 
Old 07-11-2005, 09:17 AM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
why do you want to use NFS?
You better use samba to do that, samba is able to do that. NFS probably need to write some information in the shared directory (like that *%$"/ lock it uses to control access) and so fail because it is read-only.

NFS is old, evil, broken and crappy at my opinion, unless you _really_ need it, you should use newer sharing application.
 
Old 07-11-2005, 12:00 PM   #3
pistachio
LQ Newbie
 
Registered: Jul 2005
Location: Barcelona, Spain
Distribution: Slackware 10.1
Posts: 18

Original Poster
Rep: Reputation: 0
I want to use NFS or FTP because theese are the only ways to make a remote install to a machine that has no CD-ROM reader but has a Network card.

No Linux distribution, as far as I know, can be remotely installed through SMB protocol.

And more: in a Linux - FreeBSD environment, what is the need for SMB protocol?

And if you have a FTP server, why to copy to the Hard Drive the files that you can take and export directly from the DVD?
 
Old 07-11-2005, 12:30 PM   #4
sidmark-2850
Member
 
Registered: Aug 2003
Posts: 133

Rep: Reputation: 15
What does your /etc/export file look like? Can you nfs mount the directory from another machine on your network? Error messages?
 
Old 07-11-2005, 02:15 PM   #5
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
I never tried to install from SMB but it is probably possible. If you can do it from FTP, you won't need to copy the file on your hard drive, I know you can "share" files on a cdrom using FTP without any problem.

About "what's the need of SMB protocol", I would say that NFS is quite old and obselete. It was quite good back in '80 but right now... there is lot of flaws and problems about this protocol ( as example, the network communication of NFS would really need a complete rewrite... it uses random ports, so it is almost impossible to firewall and it has some problems with NATing ). SMB is way better.
 
Old 07-11-2005, 02:30 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by Half_Elf
About "what's the need of SMB protocol", I would say that NFS is quite old and obselete. It was quite good back in '80 but right now... there is lot of flaws and problems about this protocol ( as example, the network communication of NFS would really need a complete rewrite... it uses random ports, so it is almost impossible to firewall and it has some problems with NATing ). SMB is way better.
SMB has a few flaws of its own, most notably the fact that SMB name lookups are done differently from DNS lookups. Also, the fact that Samba still doesn't have PAM support (AFAIK) is a huge bug in the open-source implementation. Also, I can't think of a single case where I would need/want SMB or NFS through NAT. Neither should ever touch the internet: they were both designed for LANs.
 
Old 07-11-2005, 03:09 PM   #7
pistachio
LQ Newbie
 
Registered: Jul 2005
Location: Barcelona, Spain
Distribution: Slackware 10.1
Posts: 18

Original Poster
Rep: Reputation: 0
My etc/exports looks like this:

/ *.MyLocalDomain(rw,sync,no_root_squash)

All the filesystem is visible from any machine in the network, except the contents of /mnt/cdrom and /mnt/floppy who appear empty to the machines of the network, and are only visible from the server machine.

If I symlink /mnt/cdrom or /mnt/floppy to some place into the /pub directory, they appear empty to the rest of machines of the network who access /pub and all its other content through the ftp protocol. However, exist a mounted CD and a mounted floppy in the ftp server in both cases, and their contents is localy visible.

More: if I mount some other partition of the Hard Drive into /mnt/dos or /mnt/Solaris (mount -t vfat or mount -t ufs ufstype=sunx86), they are fully visible locally but not visible through nfs export or ftp (symlinked into /pub).

More: if I specifically state in /etc/exports:

/mnt/cdrom and so with the others, the same thing occurs.
 
Old 07-11-2005, 03:12 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Look into the 'nohide' option to NFS.

Basically, without it, NFS only exports the single filesystem specified in /etc/exports, and not any filesystems mounted within.
 
Old 07-11-2005, 03:33 PM   #9
pistachio
LQ Newbie
 
Registered: Jul 2005
Location: Barcelona, Spain
Distribution: Slackware 10.1
Posts: 18

Original Poster
Rep: Reputation: 0
My /etc/exports is now:

/ *.MyLocalDomain(rw,sync,no_root_squash,nohide) and things stay as before.
 
Old 07-11-2005, 04:03 PM   #10
sidmark-2850
Member
 
Registered: Aug 2003
Posts: 133

Rep: Reputation: 15
/ *.MyLocalDomain(rw,sync,no_root_squash,nohide)

This is VERY insecure. You are basically giving anyone who connects to your box as root root access. You are better off just exporting /mnt/cdrom or whatever your cdrom mount point is. You only need read only instead of read write.

Another thing: The only way that *.mylocaldomain will work is if you have your machines' addresses correctly configured in dns. You need both a forward lookup or reverse lookup. You might be able to do it with the /etc/hosts file too but I am not sure. You could also do something like 10.0.0.0/8 instead or something to that extent.

You did not mention any error messages either on the client or the server that you get when you try to mount the directory from another machine.
 
Old 07-11-2005, 04:10 PM   #11
sidmark-2850
Member
 
Registered: Aug 2003
Posts: 133

Rep: Reputation: 15
Just thought of something: Did you restart nfs after making the nohide change?
 
Old 07-12-2005, 08:01 AM   #12
pistachio
LQ Newbie
 
Registered: Jul 2005
Location: Barcelona, Spain
Distribution: Slackware 10.1
Posts: 18

Original Poster
Rep: Reputation: 0
SOLVED!!!

***Thanks to Matir***

A carefull reading of man (5) exports shows that no wildcards are admited with the option unhide. So, changing my /etc/exports to:

/mnt/cdrom MyDestinationMachine.MyLocalDomain(sync,no_root_squash,nohide)

proved completely satisfactory.

As a minor issue, I have to stop the nfs server before unmounting the cdrom. Otherwise it shows busy.

Thanks to all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error exporting nfs directories wastingtime Linux - Networking 1 06-04-2005 04:22 AM
NFS: a mounted to b, b mounted to c, c can't read a? Steve Cronje Linux - Networking 9 10-25-2004 09:51 AM
exporting one NFS folder to another NFS and exporting it.... stellarmarine1 Linux - Networking 3 09-20-2004 06:54 AM
exporting root filesystem via NFS jakiel Linux - Newbie 1 07-18-2003 03:32 AM
Exporting (via NFS) smbmount'ed shares joeschmoe Linux - Networking 1 11-02-2001 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration