LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-11-2007, 11:27 AM   #1
SlacUser
Member
 
Registered: Apr 2007
Location: México
Distribution: Slackware, Fedora
Posts: 61

Rep: Reputation: 15
Post NFS server


Hi I'm trying to implement a NFS server, to share some files with certain clients.

Everything works fine, I made a test and I can mount my /home directory, but what I want to do, is to share a primary partition of 20 gb. What do I need to do for that?

I already did a test, setting the /dev/sda4 in my exports file, but the client doesn't recognize it as a directory. I think I have to do an special step to share it.

This is my partition table:
Disk /dev/sda: 72.7 GB, 72729231360 bytes
255 heads, 63 sectors/track, 8842 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 124 995998+ 82 Linux swap
/dev/sda2 * 125 248 996030 83 Linux
/dev/sda3 249 5477 42001942+ 5 Extended
/dev/sda4 5478 8031 20515005 83 Linux
/dev/sda5 249 497 2000061 83 Linux
/dev/sda6 498 746 2000061 83 Linux
/dev/sda7 747 4481 30001356 83 Linux
/dev/sda8 4482 5477 8000338+ 83 Linux
 
Old 05-11-2007, 11:36 AM   #2
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
If you want to share a partition, just mount that partition as a directory, then just share that directory. So you would have in your /etc/fstab something like
Code:
/dev/sda1        /mnt/fat         vfat         noauto,user,rw   0   0
then in /etc/exports you would have something like
Code:
/mnt/fat/ *(async,all_squash)
Then you could mount from client machines with
Code:
#mount 192.168.1.*:/mnt/fat /mnt/dir
Of course you would be using your relevant information.
 
Old 05-11-2007, 11:59 AM   #3
SlacUser
Member
 
Registered: Apr 2007
Location: México
Distribution: Slackware, Fedora
Posts: 61

Original Poster
Rep: Reputation: 15
Cannot mount device

I can't mount the device, Am i doing something wrong??

Code:
root@iet:~# mount /dev/sda4
mount: can't find /dev/sda4 in /etc/fstab or /etc/mtab
Could be that is a primary partition??
and it is totally clean, I've just create it in order to share it.

Last edited by SlacUser; 05-11-2007 at 12:13 PM.
 
Old 05-11-2007, 04:07 PM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
You need to mount it somewhere to share it. You should NOT share /dev/sda4, or /dev/anything else. That refers to the device itself, rather than the files on its filesystem.

Instead, you'll mount the filesystem somewhere like /shares/sda4, and THAT is the directory you'll share. The steps are:

1) Create an empty directory somewhere for the mounting point (e.g. mkdir /shares/sda4)

2) Add an entry for the partition in /etc/fstab (e.g. vi /etc/fstab)

The details of this fstab entry depend on what file system it is and exactly what you want to do with it.

3) Mount the partition with mount /shares/sda4

Then, after it's mounted you can export it.
 
  


Reply



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
how to mount a nfs mount from linux client to AIX nfs server dennyqian AIX 13 04-11-2016 11:30 PM
SUSE NFS client can't detect an NFS server RedBoot SUSE / openSUSE 4 01-19-2009 11:56 PM
NFS Error during PXE Boot from NFS server JatMan Linux - Enterprise 0 10-16-2006 05:48 PM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM
SuSE 9.0 NFS client with RHL 7.3 NFS server ocjacob Linux - Networking 0 02-01-2005 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:28 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