Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet412/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   408   409   410   411   412   413   414   415   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 314 
]
Replace 
myserver
 with either your server's hostname or its IP address, 
documents
 
with the name of the actual share on the server, and 
/mnt/documents
 with the path 
on your local server where you want to mount the share. From this point forward, 
you should be able to access the contents of the 
documents
 export on your file server. 
Notice, however, that the exported directory on the server was 
/exports/documents

but we only asked for 
/documents
 instead of the full path with the example 
mount
 
command. The reason this works is because we identified an export 
root
 of  
/exports
. To save you from flipping back, here's the first line from the 
/etc/exports
 
file, where we identified our export 
root
:
/exports *(ro,fsid=0,no_subtree_check) 
With the export 
root
, we basically set the base directory for our NFS exports. We 
set it as read-only (
ro
), because we don't want anyone making any changes to 
the 
/exports
 directory itself. Other directories within 
/exports
 have their own 
permissions and will thus override the 
ro
 setting on a per-export basis, so there's no 
real reason to set our export 
root
 as anything other than read-only. With our export 
root
 set, we don't have to call out the entire path of the export when we mount it; 
we only need the directory name. This is why we can mount an NFS export from 
myserver:/documents
 instead of having to type the entire path. While this does save 
us a bit of typing, it's also useful because from the user's perspective, they aren't 
required to know anything about the underlying filesystem on the server. There's 
simply no value in the user having to memorize the fact that the server is sharing a 
document's directory from 
/exports
; all they're interested in is getting 
to their data. 
Another benefit is if we ever need to move our export 
root
 to a different directory 
(during a maintenance period), our users won't have to change their configuration 
to reference the new place; they'll only need to unmount and remount the exports.
So, at this point, you'll have three directories being exported from your file server, 
and you can always add others as you go. However, whenever you add a new 
export, it won't be automatically added and read by NFS. You can restart NFS to 
activate new exports, but that's not really a good idea while users may be connected 
to them, since that will disrupt their access. Thankfully, the following command will 
cause NFS to reread the 
/etc/exports
 file without disrupting existing connections. 
This will allow you to activate new exports immediately without having to wait for 
users to finish what they're working on:
sudo exportfs -a 
With this section out of the way, you should be able to export a directory from your 
Ubuntu Server, and then mount that export on another Linux machine. Feel free 
to practice creating and mounting exports until you get the hang of it. In addition, 
you should familiarize yourself with a few additional options and settings that are 
allowable in the 
/etc/exports
 file, after consulting the man page on exports. 


Chapter 12

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   408   409   410   411   412   413   414   415   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish