| Author |
Intro to File Systems
|
|
| alany 2002-09-08, 10:32 am |
| I'm just starting to play with FS and i'm finding it slightly difficult to grasp. Since i'm new to Linux system administration, I have a longer learning curve... please help me.
Ok. I am creating a new FS to do NFS (Network File Sharing) between two linux machines. Here's what I have done so far.
I have inserted the files in /etc/exports, which reads like this:
/mnt/datashare *.mydomain.dom(rw)
I have created a new "dev" called "/dev/hda2p1" using fdisk command. Although i'm not sure if I did right or not, my goal is to mount /dev/hda2p1 to /mnt/datasare and allow /mnt/datashare to be available for access from any machines on the network.
I've tried mounting the FS using command "mount /dev/hda2p1 /mnt/datashare" but i'm getting an error message that reads "mount: special device /dev/hda2p1 does not exist". So I tried inserting /dev/hda2p1 in my /etc/fstab file, with a line that reads "/dev/hda2p1 /mnt/datashare ext3 defaults 1 1".
it's not still working... and that's it i'm lost. Please share your insights and let me know what I should do. After I've mastered NFS and I'm going to start playing with Samba.
FYI. my subnetting/networking is configured properly. All computer hosts have been identified in /etc/hosts. No problem with networking. | |
| linkfam 2002-09-08, 10:48 am |
| got samba? | |
| alany 2002-09-08, 10:55 am |
| I really need to know NFS. REQUIRED for my job, unfortunately. | |
| linkfam 2002-09-08, 10:56 am |
| oops i missed a line on your post there
"After I've mastered NFS and I'm going to start playing with Samba"
why wait???
I assume we are just talking about being able to access shares on a windows box from linux or vice versa!
Samba is fairly easy using the command line except that they change the syntax constantly! UNC paths work beautifully now!
But anymore there are gui frontends for samba which makes it almost tooo easy.
SAMBA ROCKS!(ok i sound silly but it is true) | |
|
| have you formated the device with mkfs.ext3 /dev/hda2 ?
and have you created the dir /mnt/datashare mkdir /mnt/datashare ?
you know that hda is the first ide hard drive in your sistem and hda2 is the second primary partition on that drive
 | |
| ZFletche 2002-09-14, 10:56 am |
| First off why are you in /dev.... This is where you put devices. Unless your creating a new partition for these files then you don't need to be there and even then Linux should of already created your partitions for you. Secondly the command to mount a NFS partition is mount {ip_address or dns_name}:/remote/files /local/files -t NFS and example on my network would be Computer A is hosting the shares and Computer B wants to mount them: Coumputer A has in it's /etc/export mnt/datashare *.mydomain.dom (rw) to verify that the compter is sharing this paricular share I would use the command showmount -e if you do this on computer A it should return a list of the dir you specified in /etc/export if not make sure NFS is running. Once you get this far then type on Computer B showmount -e Computer A this will again show you the shares availble. On computer B make a dir where you want to mount the remote file system mkdir /mnt/share then mount the nfs share by typing mount computerA:/mnt/datashare /mnt/share -t nfsthe cd into /mnt/share and you should see this files. this is a basic share there is more at this link http://www.tldp.org/HOWTO/NFS-HOWTO/index.html Hope this helps. | |
|
| Thank you all for your insightful feedbacks. Here's what i've done with the two computers:
I've deleted the partition (/dev/...) that I created as the new partition has nothing to do with what i'm trying to accomplish I understand correctly (thanks zfletche!).
I am able to see the directory in /etc/exports (computerA) when I issued a command "#showmount -e". Also, the result for command "#rpcinfo -p" (computerA) is as follows:
[root@computerA root]# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 1024 status
100024 1 tcp 1024 status
100011 1 udp 762 rquotad
100011 2 udp 762 rquotad
100011 1 tcp 765 rquotad
100011 2 tcp 765 rquotad
100005 1 udp 1029 mountd
100005 1 tcp 1033 mountd
100005 2 udp 1029 mountd
100005 2 tcp 1033 mountd
100005 3 udp 1029 mountd
100005 3 tcp 1033 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100021 1 udp 1030 nlockmgr
100021 3 udp 1030 nlockmgr
100021 4 udp 1030 nlockmgr
(I've started NFS by issuing a command "#/etc/rc.d/init.d/nfs start")
I also opened the ports in /etc/hosts.allow file of computerA (i.e. portmap: computerA rquotad: computerA, mountd: computerA, etc.)
As you can see portmap is not blocked... however, the problem appears to be related to portmap as it cannot receive and here's why...
In computerB I typed "#showmount -e computerA" and here's the output:
[root@computerB root]# showmount -e computerA
mount clntudp_create: RPC: Port mapper failure - RPC: Unable to receive
..obviously this means that I wouldn't be able to mount an NFS partition, but I did it anyway and here's the output:
[root@computerB root]# mount computerA:/mnt/datashare /mnt/copyshare
mount: RPC: Port mapper failure - RPC: Unable to receive
(note: i'm able to ping computerA from puterB:
[root@computerB root]# ping computerA
PING computerA.mydomain.dom (192.168.10.13) from 192.168.10.16 : 56(84) bytes of data.
64 bytes from computerA.mydomain.dom (192.168.10.13): icmp_seq=1 ttl=255 time=0.248 ms )END
Thanks again for your insights. | |
| ZFletche 2002-09-14, 6:13 pm |
| Just because you can try the rpcinfo command on ComputerB and also see if NFS is started on it as well not sure if it needs to be running on both computers. Also are both these computers on the same LAN segment. This is not a requirment but might help the troubleshooting procedure. If you want you can IM me and I can work with you on this |
|
|
|