Help - Search - Members - Calendar
Full Version: mount syntax question
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
dalee
Hi,

I've set up a small network using nfs for 2 linux boxes. When I go to mount the shares from the client, I get an error telling me that the ip address is not a supported file system. Duh!

The command I'm using is #mount -t box.name.location.com: /home /mnt/home. The error I get is: mount: fs type xxx:xxx.xxx.xxx not supported by kernel And it just tells me to use switches if I try to use another switch besides -t. From what I've been reading in the mount man pages and other places is that all I need is #mount xxx.xxx.xxx.com: /home /mnt/home.But that just tells me I need to use switches and optilns too.

Some how I'm not issuing the right command. But I can't seem to figure it out.


Thanks Much!
dalee
Technonoid
Do you have static IPs on the server and clients?
If you do, I would use those instead. Like in exports I'd have
/sharedMnt xxx.xxx.xxx.xxx (ro,other,options)

then on a client I'd have to make a directory for the mount
mkdir /mnt/ClisharedMnt

then in fstab I'd have
/mnt/ClisharedMnt nfs xxx.xxx.xxx.xxx:/sharedMnt (noauto,user,exec)


Then all you have to do to mount the share is mount /mnt/ClishareMnt

NOTE: I used a different name for the clients mnt than the servers sharesMnt. Its just a little saftey feature I like.

Don't forget, If you are needing to be secure. You need to edit your hostallow and hostdeny files as well. I don't use them, cause my server is just a file server for me only, and is not connected to the internet in anyway.

I think I have the last part in fstab right. Its mourning... Monday mourning.. :([/b]
dalee
Hi,

Yeah, that's basicly what I've done. Except editing the fstab file yet. I want to be sure it is working first. But now I've been reading and thinking (always sure to get me into trouble! :shock: ).

So I think I'm going to ask some questions in the networking forum before I try to figure this snag out.

Yeah, I love Monday mornings too. That way I know how bad the rest of my week is going to be.

Thanks very much!
dalee
static
not that I know anything about nfs, but from what I do know about mount syntax, wouldn't -t (for filesystem type) be nfs (or maybe the actual fs type on the remote partition?) and some other switch would be used to give the mount command the IP?
dalee
Well, from what I understand from the manpages, -t is supossed to be automatically assumed. So it shouldn't be needed. If I understand what I'm reading. Also, the filesystem type shouldn't be needed either if both boxes are using the same fs. Both my boxes are running ext3. So some how I'm not understanding the manpages and then getting the command right. And I've not been able to find a more newbie friendly tutorial.

dalee
Technonoid
hmmm, I had to specify NFS in fstab to get it working on mine...

I used this http://nfs.sourceforge.net/nfs-howto/ to help me set mine up.

If you have MDK 9.1, its the same howto that came with it.
Gowator
-t specifies type...
it should mount nfs automatically without it :-)

if you don't specify you don't use the -t switch.
QUOTE
#mount -t box.name.location.com: /home /mnt/home

ignoring the errant -t ...
This assumes
1) box.name.location.com is known to box 2. it must be in the /hosts or dns or nis.
if you can 'ping box.name.location.com' its OK, if not post back
2) You delete the space between : and /home
3) /mnt/home already exists
4) Your file system is exported on box 2

On box2 type
exportfs

It should say
/home box.name.location.com

If not post back!

Your file system is immaterial on both systems, whether its the same or not doesn't matter a jot because its exported as -t nfs.

Try and post back !!
p.s. NFS is 1000x better than samba between 2 linux boxes ...
OK exageration but running samba between 2 linux boxes is like running textedit under Wine ... pointless becuase you use more resources and time spent configuring something which is utlimately inferior ....

Theres nothing wrong with samba ... its brilliant if you have to share to windows hosts but pointless between 2 linux or unix machines. NFS is faster/more secure/native/lower resources/doesn't need filename mangling / ......
dalee
Hi Gowator,

I can ping back and forth until I edit the hosts files. Then I can no longer ping. It just hangs or tells me the network is unreachable. I'm also doing internet connection shareing with the server. If I use that address 192.168.1.1, then I can ping from the client again. But that address is would be for dhcp right? The name of the server is 192.168.0.1/ box.name.location.com. The client is 192.168.0.2/box.name.location.com That is the address that should be in the host file right? If I remove the entries in both host files, I can ping back and forth again.

Of course exportfs returns nothing on the client. The server reports the directories I've chosen to export.

When I run rpcinfo -p, it shows portmap, nfs rquotad, nlockmgr are running on both machines.

Technonoid, That's the same tutorial I've been using. biggrin.gif

dalee

P.S. If a mod wants to move this to networking that's fine. We might be getting a little off-topic now biggrin.gif
Technonoid
QUOTE
I can ping back and forth until I edit the hosts files. Then I can no longer ping. It just hangs or tells me the network is unreachable.


uuhh ? I wouldn't think changing config files realted to nfs would have anything to do with who or what you could ping. :?

What files are you editing ?
dalee
Hi,

I'm editing the the /etc/hosts. Should I be editing the /etc/hosts.config instead? The hosts.config has: order hosts,bind
multi on for entries.

I sometimes wonder if my firewall (Shorewall) is causing me fits.

If you can't tell, this is my first expirence at networking:shock:

Thanks,
dalee
Technonoid
Sorry for the delay... Just got back from vacation... Now I need to take another vacation day to rest. biggrin.gif

host ??

I think one of us is off track. From your first post, I understand that you want to share files or mounts between two linux boxes.

Before you read further... Be sure the linux boxes are talking to each other. ( ping 'em ).

All you need to edit are these four files on both boxes.

Note: files are in /etc
exports - This is the main file you need to edit. This file is what tells linux what mount to share or export.
example:
/sharedMnt xxx.xxx.xxx.xxx (rw) << you can use other options here after rw. But this is the way mine is. The xxx.xxx.xxx.xxx is the IP of the box or client you want to be able access the share/mount.

The other files host.allow for now, JUST to get it working. I'd put # in front of every line.

Now do exportfs -ra This restarts exports with the new settings.

Ok, on your other box. You can do the same thing above if you have a mount you want to share.

Otherwise, to be able to access the mount you need to add a directory in /mnt. This directory can be most anything you want. Do mkdir /mnt/clishareMnt. The clishareMnt is the part you can name what you want. But, you need to use that name in the fstab below...

Now you need to edit fstab.
add
/mnt/clishareMnt nfs xxx.xxx.xxx.xxx:/sharedMnt (noauto,user,exec).

Now you should be able to do a
mount /mnt/clishareMnt
replacing clishareMnt with whatever you used above.

If it works then on the box with the export edit only host.allow and host.deny note the dot. My lin boxes are safe from the world. Therefore I don't use host.deny and host.allow. Mine are blank or have #.
In host.deny I think I would have:
CODE
all:all

This denies everything to everyone. Except what you have or will have in host.allow .
In host.allow I think I'd have:
CODE
portmap: xxx.xxx.xxx.xxx

lockd: xxx.xxx.xxx.xxx

rquotad: xxx.xxx.xxx.xxx

statd: xxx.xxx.xxx.xxx

mountd: xxx.xxx.xxx.xxx
Note: If your boxes are as follows, BOX1=192.168.0.5 BOX2=192.168.0.7 and BOX2 has the export. Put BOX1's IP in place of above xxx.xxx.xxx.xxx

This should work. If I'm wrong.. I'll fix it or be corrected. I know the first part works up until host.allow and host.deny. I might play with the host.deny and host.allow tonight just to see if works ok.
dalee
Hi,

Hey I'm sorry to hear you had to come back to the real world biggrin.gif . Most of the time I need a vaction to recover from my vaction too! This stuff here isn't life or death. Time off is!

You are correct, I'd like to share my /home(rw), an empty partion(rw), and maybe /usr (ro) later. As far as my exports file, fstab, hostsallow and deny, that is what I've done. I followed the most excellent howto mentioned earlier in the thread. So I think they are correct. They match your examples to the tee. But still no joy.

After editing the fstab when I try to issue the mount command I get 2 errors, [mnt]: warning no final newline at the end of /etc/fstab. Followed immeadiatly by: mount: mount point nfs does not exist rpcinfo shows all needed services are up and running, nfs, mountd, lockd, and such. On both boxes.

The thing I've been pondering now is, when I issue the ping command, I can ping using the DNS names, i.e. dads.box.desk.com for example, but not with the ip address, 192.168.0.x ( I hope my terminology is right ). Why not, I can't seem to figure out. I've not purposely enabled DNS myself. Perhaps the internet connection sharing wizard did something with it? The one ip address I can ping, is the one I think is for dhcp. My limited understanding from the howto is that either DNS names or ip addresses should work anyway.

Hopefully, I've done better at giving clearer info for you.

Thanks!!!
dalee
Technonoid
Think you could post your fstab? You can replace your IPs with x's if you like.

Hmm, what other files did you edit before editing the right ones?

If you can ping using names, by all means use them instead of ip's. Just replace ip's in exports, host.allow, host.deny and fstab with your box names. my.linux.box


Next vacation, I will plan a day at home to rest. biggrin.gif


Tech
dalee
Hi,

I didn't edit any other files. This is being done on 2 clean fresh full installs.

My fstab on the client box is this,

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda7 /home ext3 defaults 1 2
none /mnt/cdrom supermount
dev=/dev/hdb,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask= 0 0 0
none /mnt/floppy supermount
dev=/dev/fd0,fs=auto,--iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
none /mnt/zip supermount
dev=devsda4,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda6 /usr ext3 defaults 1 2
/dev/hda5 swap swap defaults 0 0
/mnt/boxhome nfs xxx.xxx.xxx.xxx:/home (noauto,user,exec)

And if you need it the fstab on the server box is

/dev/hda8 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda11 /home ext3 defaults 1 2
none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hda5 /mnt/win_d vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hda6 /mnt/win_e vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda7 /tmp ext2 defaults 1 2
/dev/hda10 /usr ext3 defaults 1 2
/dev/hda9 swap swap defaults 0 0

I've only tried to add the one shared directory to the client fstab to test it. When I can get it to work I will add the rest. The other lines are added to my exports file though. I did run the exportfs -ra command several times to see if that was hanging things up. Didn't help though. I did comment out the lines I added to hosts.deny and hosts.allow as you suggested.


dalee
Technonoid
Hmm, what does it say when you try to mount it now?

Sorry for long delay..

Tech
dalee
Hi,

I'm sorry for my slow reply also, Things are sooo busy this month!!

The error message I get now is mount: RPC: Port mapper failure - RPC unable to recieve

rpcinfo -p shows that portmapper is up and running. Both boxes are running the same 9.0 version so there should be no compatability issues,

But at least I feel like there is some progress! smile.gif The errors are getting fewer and more to a point!

dalee

PS. Technonoid, Thanks for your incredible patience with this newbie!! You've been teaching me a lot!!
Technonoid
QUOTE
The error message I get now is mount: RPC: Port mapper failure - RPC unable to recieve

rpcinfo -p shows that portmapper is up and running. 



Hmm, Are you running a firewall ?

Tech
dalee
Hi,

Yep, I'm using Iptables and the standard Shorewall that comes with 9.0. I will admit that I don't really like Shorewall, but it seems to be the only firewall I can get to work. I 've tried Firestarter and Guarddog, both work well for single boxes, but when I setup my internet connection sharing, Mandrake insists on Shorewall and balks at anything else. :roll:


dalee
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.