562 lines
23 KiB
Text
562 lines
23 KiB
Text
<!--
|
|
The FreeBSD Documentation Project
|
|
|
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml,v 1.13 2000/03/20 22:21:32 jim Exp $
|
|
-->
|
|
|
|
<chapter id="disks">
|
|
<title>Disks</title>
|
|
|
|
<sect1 id="disks-synopsis">
|
|
<title>Synopsis</title>
|
|
|
|
<para>This chapter covers how to use disks, whether physical,
|
|
memory, or networked, on FreeBSD.</para>
|
|
</sect1>
|
|
|
|
<sect1 id="disks-naming">
|
|
<title>Disk naming</title>
|
|
|
|
<para>Physical drives come in two main flavours,
|
|
<acronym>IDE</acronym>, or <acronym>SCSI</acronym>; but there
|
|
are also drives backed by RAID controllers, flash memory, and so
|
|
forth. Since these behave quite differently, they have their
|
|
own drivers and devices.</para>
|
|
|
|
<table id="disk-naming-physical-table">
|
|
<title>Physical disk naming conventions</title>
|
|
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Drive type</entry>
|
|
<entry>Drive device name</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>IDE hard drives</entry>
|
|
<entry><literal>ad</literal> in 4.0-RELEASE,
|
|
<literal>wd</literal> before 4.0-RELEASE.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>IDE CDROM drives</entry>
|
|
<entry><literal>acd</literal> in 3.1-RELEASE,
|
|
<literal>wcd</literal> before 4.0-RELEASE.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>SCSI hard drives</entry>
|
|
<entry><literal>da</literal> from 3.0-RELEASE,
|
|
<literal>sd</literal> before 3.0-RELEASE.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>SCSI CDROM drives</entry>
|
|
<entry><literal>cd</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>Assorted non-standard CDROM drives</entry>
|
|
<entry><literal>mcd</literal> for Mitsumi CD-ROM,
|
|
<literal>scd</literal> for Sony CD-ROM,
|
|
<literal>matcd</literal> for Matsushita/Panasonic CD-ROM
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Floppy drives</entry>
|
|
<entry><literal>fd</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>SCSI tape drives</entry>
|
|
<entry><literal>sa</literal> from 3.0-RELEASE,
|
|
<literal>st</literal> before 3.0-RELEASE.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>IDE tape drives</entry>
|
|
<entry><literal>ast</literal> from 4.0-RELEASE,
|
|
<literal>wst</literal> before 4.0-RELEASE.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Flash drives</entry>
|
|
<entry><literal>fla</literal> for DiskOnChip Flash device
|
|
from 3.3-RELEASE.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>RAID drives</entry>
|
|
<entry><literal>myxd</literal> for Mylex, and
|
|
<literal>amrd</literal> for AMI MegaRAID,
|
|
<literal>idad</literal> for Compaq Smart RAID.
|
|
from 4.0-RELEASE. <literal>id</literal> between
|
|
3.2-RELEASE and 4.0-RELEASE.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
</sect1>
|
|
|
|
<sect1 id="disks-adding">
|
|
<title>Adding disks</title>
|
|
|
|
<para><emphasis>Originally contributed by &a.obrien; 26 April
|
|
1998</emphasis></para>
|
|
|
|
<para>Lets say we want to add a new SCSI disk to a machine that currently
|
|
only has a single drive. First turn off the computer and install the
|
|
drive in the computer following the instructions of the computer,
|
|
controller, and drive manufacturer. Due the wide variations of procedures
|
|
to do this, the details are beyond the scope of this document.</para>
|
|
|
|
<para>Login as user <username>root</username>. After you've installed the
|
|
drive, inspect <filename>/var/run/dmesg.boot</filename> to ensure the new
|
|
disk was found. Continuing with our example, the newly added drive will
|
|
be <filename>da1</filename> and we want to mount it on
|
|
<filename>/1</filename>. (if you are adding an IDE drive substitute
|
|
<filename>wd</filename> for <filename>da</filename>)</para>
|
|
|
|
<para>Because FreeBSD runs on IBM-PC compatible computers, it must take into
|
|
account the PC BIOS partitions. These are different from the traditional
|
|
BSD partitions. A PC disk has up to four BIOS partition entries. If the
|
|
disk is going to be truly dedicated to FreeBSD, you can use the
|
|
<emphasis>dedicated</emphasis> mode. Otherwise, FreeBSD will have to live
|
|
with in one of the PC BIOS partitions. FreeBSD calls the PC BIOS
|
|
partitions, <emphasis>slices</emphasis> so as not to confuse them with
|
|
traditional BSD partitions. You may also use slices on a disk that is
|
|
dedicated to FreeBSD, but used in a computer that also has another
|
|
operating system installed. This is to not confuse the
|
|
<command>fdisk</command> utility of the other operating system.</para>
|
|
|
|
<para>In the slice case the drive will be added as
|
|
<filename>/dev/da1s1e</filename>. This is read as: SCSI disk, unit number
|
|
1 (second SCSI disk), slice 1 (PC BIOS partition 1), and
|
|
<filename>e</filename> BSD partition. In the dedicated case, the drive
|
|
will be added simply as <filename>/dev/da1e</filename>.</para>
|
|
|
|
<sect2>
|
|
<title>Using sysinstall</title>
|
|
|
|
<para>You may use <command>/stand/sysinstall</command> to partition and
|
|
label a new disk using its easy to use menus. Either login as user
|
|
<username>root</username> or use the <command>su</command> command. Run
|
|
<command>/stand/sysinstall</command> and enter the
|
|
<literal>Configure</literal> menu. With in the <literal>FreeBSD
|
|
Configuration Menu</literal>, scroll down and select the
|
|
<literal>Partition</literal> item. Next you should be presented with a
|
|
list of hard drives installed in your system. If you do not see
|
|
<literal>da1</literal> listed, you need to recheck your physical
|
|
installation and <command>dmesg</command> output in the file
|
|
<filename>/var/run/dmesg.boot</filename>.</para>
|
|
|
|
<para>Select <literal>da1</literal> to enter the <literal>FDISK Partition
|
|
Editor</literal>. Choose <literal>A</literal> to use the entire disk
|
|
for FreeBSD. When asked if you want to <quote>remain cooperative with
|
|
any future possible operating systems</quote>, answer
|
|
<literal>YES</literal>. Write the changes to the disk using
|
|
<command>W</command>. Now exit the FDISK editor using
|
|
<command>q</command>. Next you will be asked about the Master Boot
|
|
Record. Since you are adding a disk to an already running system,
|
|
choose <literal>None</literal>.</para>
|
|
|
|
<para>Next enter the <literal>Disk Label Editor</literal>. This is where
|
|
you will create the traditional BSD partitions. A disk can have up to
|
|
eight partitions, labeled a-h. A few of the partition labels have
|
|
special uses. The <literal>a</literal> partition is used for the root
|
|
partition (<filename>/</filename>). Thus only your system disk (e.g,
|
|
the disk you boot from) should have an <literal>a</literal> partition.
|
|
The <literal>b</literal> partition is used for swap partitions, and you
|
|
may have many disks with swap partitions. The <literal>c</literal>
|
|
partition addresses the entire disk in dedicated mode, or the entire
|
|
FreeBSD slice in slice mode. The other partitions are for general
|
|
use.</para>
|
|
|
|
<para>Sysinstall's Label editor favors the <literal>e</literal> partition
|
|
for non-root, non-swap partitions. With in the Label editor, create a
|
|
single file system using <command>C</command>. When prompted if this
|
|
will be a FS (file system) or swap, choose <literal>FS</literal> and
|
|
give a mount point (e.g, <filename>/mnt</filename>). When adding a disk
|
|
in post-install mode, Sysinstall will not create entries in
|
|
<filename>/etc/fstab</filename> for you, so the mount point you specify
|
|
isn't important.</para>
|
|
|
|
<para>You are now ready to write the new label to the disk and create a
|
|
file system on it. Do this by hitting <command>W</command>. Ignore any
|
|
errors from Sysinstall that it could not mount the new partition. Exit
|
|
the Label Editor and Sysinstall completely.</para>
|
|
|
|
<para>The last step is to edit <filename>/etc/fstab</filename> to add an
|
|
entry for your new disk.</para>
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Using command line utilities</title>
|
|
|
|
<sect3>
|
|
<title>* Using Slices</title>
|
|
|
|
<para></para>
|
|
</sect3>
|
|
|
|
<sect3>
|
|
<title>Dedicated</title>
|
|
|
|
<para>If you will not be sharing the new drive with another operating
|
|
system, you may use the <literal>dedicated</literal> mode. Remember
|
|
this mode can confuse Microsoft operating systems; however, no damage
|
|
will be done by them. IBM's OS/2 however, will
|
|
“appropriate” any partition it finds which it doesn't
|
|
understand.</para>
|
|
|
|
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda1 bs=1k count=1</userinput>
|
|
&prompt.root; <userinput>disklabel -Brw da1 auto</userinput>
|
|
&prompt.root; <userinput>disklabel -e da1</userinput> # create the `e' partition
|
|
&prompt.root; <userinput>newfs -d0 /dev/rda1e</userinput>
|
|
&prompt.root; <userinput>mkdir -p /1</userinput>
|
|
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/da1e
|
|
&prompt.root; <userinput>mount /1</userinput></screen>
|
|
|
|
<para>An alternate method is:</para>
|
|
|
|
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda1 count=2</userinput>
|
|
&prompt.root; <userinput>disklabel /dev/rda1 | disklabel -BrR da1 /dev/stdin</userinput>
|
|
&prompt.root; <userinput>newfs /dev/rda1e</userinput>
|
|
&prompt.root; <userinput>mkdir -p /1</userinput>
|
|
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/da1e
|
|
&prompt.root; <userinput>mount /1</userinput></screen>
|
|
</sect3>
|
|
</sect2>
|
|
</sect1>
|
|
|
|
<sect1 id="disks-virtual">
|
|
<title>Virtual disks: Network, memory, and file-based filesystems</title>
|
|
|
|
<para>Besides the disks you physically insert into your computer;
|
|
floppies, CDs, hard drives, and so forth, other forms of disks
|
|
are understood by FreeBSD - the <firstterm>virtual
|
|
disks</firstterm>.</para>
|
|
|
|
<para>These include network filesystems such as the <link
|
|
linkend="nfs">Network Filesystem</link> and Coda, memory-based
|
|
filesystems such as <link linkend="disks-md">md</link> and
|
|
file-backed filesystems created by <link
|
|
linkend="disks-vnconfig">vnconfig</link>.</para>
|
|
|
|
<sect2 id="disks-vnconfig">
|
|
<title>vnconfig: file-backed filesystem</title>
|
|
|
|
<para>&man.vnconfig.8; configures and enables vnode pseudo disk
|
|
devices. A <firstterm>vnode</firstterm> is a representation
|
|
of a file, and is the focus of file activity. This means that
|
|
&man.vnconfig.8; uses files to create and operate a
|
|
filesystem. One possible use is the mounting of floppy or CD
|
|
images kept in files.</para>
|
|
|
|
<para>To mount an existing filesystem image:</para>
|
|
|
|
<example>
|
|
<title>Using vnconfig to mount an existing filesystem
|
|
image</title>
|
|
|
|
<screen>&prompt.root; <userinput>vnconfig vn<replaceable>0</replaceable> <replaceable>diskimage</replaceable></userinput>
|
|
<userinput>&prompt.root; mount /dev/vn<replaceable>0</replaceable>c <replaceable>/mnt</replaceable></userinput></screen>
|
|
</example>
|
|
|
|
<para>To create a new filesystem image with vnconfig:</para>
|
|
|
|
<example>
|
|
<title>Creating a new file-backed disk with vnconfig</title>
|
|
|
|
<screen>&prompt.root; <userinput>dd if=/dev/zero of=<replaceable>newimage</replaceable> bs=1k count=<replaceable>5</replaceable>k</userinput>
|
|
5120+0 records in
|
|
5120+0 records out
|
|
&prompt.root; <userinput>vnconfig -s labels -c vn<replaceable>0</replaceable> <replaceable>newimage</replaceable></userinput>
|
|
&prompt.root; <userinput>disklabel -r -w vn<replaceable>0</replaceable></userinput>
|
|
&prompt.root; <userinput>newfs vn<replaceable>0</replaceable>c</userinput>
|
|
Warning: 2048 sector(s) in last cylinder unallocated
|
|
/dev/rvn0c: 10240 sectors in 3 cylinders of 1 tracks, 4096 sectors
|
|
5.0MB in 1 cyl groups (16 c/g, 32.00MB/g, 1280 i/g)
|
|
super-block backups (for fsck -b #) at:
|
|
32
|
|
&prompt.root; <userinput>mount /dev/vn<replaceable>0</replaceable>c <replaceable>/mnt</replaceable></userinput>
|
|
&prompt.root; <userinput>df <replaceable>/mnt</replaceable></userinput>
|
|
Filesystem 1K-blocks Used Avail Capacity Mounted on
|
|
/dev/vn0c 4927 1 4532 0% /mnt</screen>
|
|
</example>
|
|
</sect2>
|
|
|
|
<sect2 id="disks-md">
|
|
<title>md: memory filesystem</title>
|
|
|
|
<para>md is a simple, efficient means to do memory
|
|
filesystems.</para>
|
|
|
|
<para>Simply take a filesystem you've prepared with, for
|
|
example, &man.vnconfig.8;, and:</para>
|
|
|
|
<example>
|
|
<title>md memory disk</title>
|
|
|
|
<screen>&prompt.root; <userinput>dd if=<replaceable>newimage</replaceable> of=/dev/md<replaceable>0</replaceable></userinput>
|
|
5120+0 records in
|
|
5120+0 records out
|
|
&prompt.root; <userinput>mount /dev/md<replaceable>0c</replaceable> <replaceable>/mnt</replaceable></userinput>
|
|
&prompt.root; <userinput>df <replaceable>/mnt</replaceable></userinput>
|
|
Filesystem 1K-blocks Used Avail Capacity Mounted on
|
|
/dev/md0c 4927 1 4532 0% /mnt</screen>
|
|
</example>
|
|
</sect2>
|
|
</sect1>
|
|
|
|
<sect1 id="quotas">
|
|
<title>Disk Quotas</title>
|
|
|
|
<para>Quotas are an optional feature of the operating system that
|
|
allow you to limit the amount of disk space and/or the number of
|
|
files a user, or members of a group, may allocate on a per-file
|
|
system basis. This is used most often on timesharing systems where
|
|
it is desirable to limit the amount of resources any one user or
|
|
group of users may allocate. This will prevent one user from
|
|
consuming all of the available disk space.</para>
|
|
|
|
<sect2>
|
|
<title>Configuring Your System to Enable Disk Quotas</title>
|
|
|
|
<para>Before attempting to use disk quotas it is necessary to make
|
|
sure that quotas are configured in your kernel. This is done by
|
|
adding the following line to your kernel configuration
|
|
file:</para>
|
|
|
|
<programlisting>
|
|
options QUOTA</programlisting>
|
|
|
|
<para>The stock <filename>GENERIC</filename> kernel does not have
|
|
this enabled by default, so you will have to configure, build and
|
|
install a custom kernel in order to use disk quotas. Please refer
|
|
to the <link linkend="kernelconfig">Configuring the FreeBSD
|
|
Kernel</link> section for more information on kernel
|
|
configuration.</para>
|
|
|
|
<para>Next you will need to enable disk quotas in
|
|
<filename>/etc/rc.conf</filename>. This is done by adding the
|
|
line:</para>
|
|
|
|
<programlisting>
|
|
enable_quotas=“YES”</programlisting>
|
|
|
|
<para>For finer control over your quota startup, there is an
|
|
additional configuration variable available. Normally on bootup,
|
|
the quota integrity of each file system is checked by the
|
|
<command>quotacheck</command> program. The
|
|
<command>quotacheck</command> facility insures that the data in
|
|
the quota database properly reflects the data on the file system.
|
|
This is a very time consuming process that will significantly
|
|
affect the time your system takes to boot. If you would like to
|
|
skip this step, a variable is made available for the
|
|
purpose:</para>
|
|
|
|
<programlisting>
|
|
check_quotas=“NO”</programlisting>
|
|
|
|
<para>If you are running FreeBSD prior to 3.2-RELEASE, the
|
|
configuration is simpler, and consists of only one variable. Set
|
|
the following in your <filename>/etc/rc.conf</filename>:</para>
|
|
|
|
<programlisting>
|
|
check_quotas=“YES”</programlisting>
|
|
|
|
<para>Finally you will need to edit <filename>/etc/fstab</filename>
|
|
to enable disk quotas on a per-file system basis. This is where
|
|
you can either enable user or group quotas or both for all of your
|
|
file systems.</para>
|
|
|
|
<para>To enable per-user quotas on a file system, add the
|
|
<literal>userquota</literal> option to the options field in the
|
|
<filename>/etc/fstab</filename> entry for the file system you want
|
|
to to enable quotas on. For example:</para>
|
|
|
|
<programlisting>
|
|
/dev/da1s2g /home ufs rw,userquota 1 2</programlisting>
|
|
|
|
<para>Similarly, to enable group quotas, use the
|
|
<literal>groupquota</literal> option instead of the
|
|
<literal>userquota</literal> keyword. To enable both user and
|
|
group quotas, change the entry as follows:</para>
|
|
|
|
<programlisting>
|
|
/dev/da1s2g /home ufs rw,userquota,groupquota 1 2</programlisting>
|
|
|
|
<para>By default the quota files are stored in the root directory of
|
|
the file system with the names <filename>quota.user</filename> and
|
|
<filename>quota.group</filename> for user and group quotas
|
|
respectively. See <command>man fstab</command> for more
|
|
information. Even though that man page says that you can specify
|
|
an alternate location for the quota files, this is not recommended
|
|
because the various quota utilities do not seem to handle this
|
|
properly.</para>
|
|
|
|
<para>At this point you should reboot your system with your new
|
|
kernel. <filename>/etc/rc</filename> will automatically run the
|
|
appropriate commands to create the initial quota files for all of
|
|
the quotas you enabled in <filename>/etc/fstab</filename>, so
|
|
there is no need to manually create any zero length quota
|
|
files.</para>
|
|
|
|
<para>In the normal course of operations you should not be required
|
|
to run the <command>quotacheck</command>,
|
|
<command>quotaon</command>, or <command>quotaoff</command>
|
|
commands manually. However, you may want to read their man pages
|
|
just to be familiar with their operation.</para>
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Setting Quota Limits</title>
|
|
|
|
<para>Once you have configured your system to enable quotas, verify
|
|
that they really are enabled. An easy way to do this is to
|
|
run:</para>
|
|
|
|
<screen>&prompt.root; <userinput>quota -v</userinput></screen>
|
|
|
|
<para>You should see a one line summary of disk usage and current
|
|
quota limits for each file system that quotas are enabled
|
|
on.</para>
|
|
|
|
<para>You are now ready to start assigning quota limits with the
|
|
<command>edquota</command> command.</para>
|
|
|
|
<para>You have several options on how to enforce limits on the
|
|
amount of disk space a user or group may allocate, and how many
|
|
files they may create. You may limit allocations based on disk
|
|
space (block quotas) or number of files (inode quotas) or a
|
|
combination of both. Each of these limits are further broken down
|
|
into two categories; hard and soft limits.</para>
|
|
|
|
<para>A hard limit may not be exceeded. Once a user reaches their
|
|
hard limit they may not make any further allocations on the file
|
|
system in question. For example, if the user has a hard limit of
|
|
500 blocks on a file system and is currently using 490 blocks, the
|
|
user can only allocate an additional 10 blocks. Attempting to
|
|
allocate an additional 11 blocks will fail.</para>
|
|
|
|
<para>Soft limits on the other hand can be exceeded for a limited
|
|
amount of time. This period of time is known as the grace period,
|
|
which is one week by default. If a user stays over his or her
|
|
soft limit longer than their grace period, the soft limit will
|
|
turn into a hard limit and no further allocations will be allowed.
|
|
When the user drops back below the soft limit, the grace period
|
|
will be reset.</para>
|
|
|
|
<para>The following is an example of what you might see when you run
|
|
the <command>edquota</command> command. When the
|
|
<command>edquota</command> command is invoked, you are placed into
|
|
the editor specified by the <envar>EDITOR</envar> environment
|
|
variable, or in the <command>vi</command> editor if the
|
|
<envar>EDITOR</envar> variable is not set, to allow you to edit
|
|
the quota limits.</para>
|
|
|
|
<screen>&prompt.root; <userinput>edquota -u test</userinput></screen>
|
|
|
|
<programlisting>
|
|
Quotas for user test:
|
|
/usr: blocks in use: 65, limits (soft = 50, hard = 75)
|
|
inodes in use: 7, limits (soft = 50, hard = 60)
|
|
/usr/var: blocks in use: 0, limits (soft = 50, hard = 75)
|
|
inodes in use: 0, limits (soft = 50, hard = 60)</programlisting>
|
|
|
|
<para>You will normally see two lines for each file system that has
|
|
quotas enabled. One line for the block limits, and one line for
|
|
inode limits. Simply change the value you want updated to modify
|
|
the quota limit. For example, to raise this users block limit
|
|
from a soft limit of 50 and a hard limit of 75 to a soft limit of
|
|
500 and a hard limit of 600, change:</para>
|
|
|
|
<programlisting>/usr: blocks in use: 65, limits (soft = 50, hard = 75)</programlisting>
|
|
|
|
<para>to:</para>
|
|
|
|
<programlisting> /usr: blocks in use: 65, limits (soft = 500, hard = 600)</programlisting>
|
|
|
|
<para>The new quota limits will be in place when you exit the
|
|
editor.</para>
|
|
|
|
<para>Sometimes it is desirable to set quota limits on a range of
|
|
uids. This can be done by use of the <option>-p</option> option
|
|
on the <command>edquota</command> command. First, assign the
|
|
desired quota limit to a user, and then run
|
|
<command>edquota -p protouser startuid-enduid</command>. For
|
|
example, if user <username>test</username> has the desired quota
|
|
limits, the following command can be used to duplicate those quota
|
|
limits for uids 10,000 through 19,999:</para>
|
|
|
|
<screen>&prompt.root; <userinput>edquota -p test 10000-19999</userinput></screen>
|
|
|
|
<para>See <command>man edquota</command> for more detailed
|
|
information.</para>
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Checking Quota Limits and Disk Usage</title>
|
|
|
|
<para>You can use either the <command>quota</command> or the
|
|
<command>repquota</command> commands to check quota limits and
|
|
disk usage. The <command>quota</command> command can be used to
|
|
check individual user and group quotas and disk usage. Only the
|
|
super-user may examine quotas and usage for other users, or for
|
|
groups that they are not a member of. The
|
|
<command>repquota</command> command can be used to get a summary
|
|
of all quotas and disk usage for file systems with quotas
|
|
enabled.</para>
|
|
|
|
<para>The following is some sample output from the
|
|
<command>quota -v</command> command for a user that has quota
|
|
limits on two file systems.</para>
|
|
|
|
<programlisting>
|
|
Disk quotas for user test (uid 1002):
|
|
Filesystem blocks quota limit grace files quota limit grace
|
|
/usr 65* 50 75 5days 7 50 60
|
|
/usr/var 0 50 75 0 50 60</programlisting>
|
|
|
|
<para>On the <filename>/usr</filename> file system in the above
|
|
example this user is currently 15 blocks over their soft limit of
|
|
50 blocks and has 5 days of their grace period left. Note the
|
|
asterisk <literal>*</literal> which indicates that the user is
|
|
currently over their quota limit.</para>
|
|
|
|
<para>Normally file systems that the user is not using any disk
|
|
space on will not show up in the output from the
|
|
<command>quota</command> command, even if they have a quota limit
|
|
assigned for that file system. The <option>-v</option> option
|
|
will display those file systems, such as the
|
|
<filename>/usr/var</filename> file system in the above
|
|
example.</para>
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Quotas over NFS</title>
|
|
|
|
<para>Quotas are enforced by the quota subsystem on the NFS server.
|
|
The &man.rpc.rquotad.8; daemon makes quota information available
|
|
to the &man.quota.1; command on NFS clients, allowing users on
|
|
those machines to see their quota statistics.</para>
|
|
|
|
<para>Enable <command>rpc.rquotad</command> in
|
|
<filename>/etc/inetd.conf</filename> like so:</para>
|
|
|
|
<programlisting>
|
|
rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad</programlisting>
|
|
|
|
<para>Now restart <command>inetd</command>:</para>
|
|
|
|
<screen>&prompt.root; <userinput>kill -HUP `cat /var/run/inetd.pid`</userinput></screen>
|
|
</sect2>
|
|
</sect1>
|
|
</chapter>
|
|
|
|
<!--
|
|
Local Variables:
|
|
mode: sgml
|
|
sgml-declaration: "../chapter.decl"
|
|
sgml-indent-data: t
|
|
sgml-omittag: nil
|
|
sgml-always-quote-attributes: t
|
|
sgml-parent-document: ("../book.sgml" "part" "chapter")
|
|
End:
|
|
-->
|