Jump to content

mount syntax question


Recommended Posts

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

-t specifies type...

it should mount nfs automatically without it :-)

 

if you don't specify you don't use the -t switch.

#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 / ......

Link to comment
Share on other sites

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. :D

 

dalee

 

P.S. If a mod wants to move this to networking that's fine. We might be getting a little off-topic now :D

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Sorry for the delay... Just got back from vacation... Now I need to take another vacation day to rest. :D

 

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:

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:

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.

Link to comment
Share on other sites

Hi,

 

Hey I'm sorry to hear you had to come back to the real world :D . 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

Link to comment
Share on other sites

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. :D

 

 

Tech

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...