Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.