Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet155/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   151   152   153   154   155   156   157   158   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

type
as in 
–t nfs
. To specify options, use 
–o 
options
. We might use 
–o noauto,ro
to indicate that this partition will not be 
automatically mounted and the file system will be read-only. We would also most likely 
want to mount a remote file system as asynchronous (async) because we do not want local 
processes to block while waiting for confirmation from the remote file server. However, 
async is part of the defaults so we do not have to explicitly list it.
Once mounted, users can cd into and access files in this remote computer’s /home/stuff 
directory by specifying /home/coolstuff on the local machine. In this case, users will only 
be able to read from this file system.
Ordinarily, you are not able to mount remote file systems just by using a mount com-
mand. Instead, the administrator of the remote machine must set this up. The steps are 
listed here. We will assume that we are the system administrators for www.someserver.
com and want to let others mount /home/stuff.
First, we have to specify that we want to export this file system. This is done using the 
/
etc/exports
file. We would add the following line to this file:
/home/stuff *(rw,noexec)
If we had other file systems to export, we would have an entry (line) for each one (or we 
could combine file systems on single lines if they share the same export options).
The first entry in the line is the file system’s mount point. The second item, *, indi-
cates the remote machine(s) that we want to permit access to. The * is used to mean any 
remote computer. We might wish to restrict this, for instance, to some IP address(es) as in 
10.2.0.0/16, which means any computer whose IP address starts with 10.2, or 10.2.56.30 to 
indicate that only the machine 10.2.56.30 can access it.
The items in parentheses are the options that we are placing on this file system. These 
options then apply to how the remote computer(s) interact with this file system. For 
instance, we might specify ro which would mean that any machine that mounted the file 
system would only be able to read from it (not write to it) even though locally, the file system 
might be accessible as rw. In the example above, we are assigning rw and noexec options. 
Recall noexec means that users are not allowed to execute software from this directory.
Next, we need to restart the 
nfs
service. This can be done graphically through the ser-
vices tool or from the command line using either /
sbin/service nfs restart
or 
/
etc/init.d/nfs restart
. We will explore services in Chapter 11. Finally, we have to 
issue the 
exportfs
command. Generally, the command is 
exportfs 
filesystem

but we can use 
exportfs –a
to export all of the file systems in the /etc/exports file. Now, 
the file system should be mountable from remote locations.
The umount command unmounts a partition. It is far simpler than mount. The com-
mon application is to state 
umount 
mount-point
as in 
umount /home/coolstuff

The umount command comes with options including –n to prevent the unmounting from 
being written to mtab (which would make mtab out of date), -r so that if the unmounting 
fails, the partition is moved from its current status to read-only, -l to unmount the file 


The Linux File System

417
system now but to actually clean up the records of its mounting/unmounting later, -a to 
unmount all file systems currently mounted (the root file system is an exception) and 
–O 
options
to specify that the unmounting should take place on all file systems that match 
the specified options, such as ro or noexec.
When unmounting a file system, you might receive the following error message:
umount: /

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   151   152   153   154   155   156   157   158   ...   254




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