Translation

(itstool) path: sect1/screen
<prompt>#</prompt> <userinput>mksnap_ffs /var /var/snapshot/snap</userinput>
0/760
Context English Turkish (tr_TR) State
Next, attach that file to a memory disk, label the memory disk and format it with the <acronym>UFS</acronym> file system, mount the memory disk, and verify the size of the file-backed disk:
<prompt>#</prompt> <userinput>mdconfig -f <replaceable>newimage</replaceable> -u <replaceable>0</replaceable></userinput>
<prompt>#</prompt> <userinput>bsdlabel -w md<replaceable>0</replaceable> auto</userinput>
<prompt>#</prompt> <userinput>newfs -U md<replaceable>0</replaceable>a</userinput>
/dev/md0a: 5.0MB (10224 sectors) block size 16384, fragment size 2048
using 4 cylinder groups of 1.25MB, 80 blks, 192 inodes.
super-block backups (for fsck -b #) at:
160, 2720, 5280, 7840
<prompt>#</prompt> <userinput>mount /dev/md<replaceable>0</replaceable>a <replaceable>/mnt</replaceable></userinput>
<prompt>#</prompt> <userinput>df <replaceable>/mnt</replaceable></userinput>
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0a 4710 4 4330 0% /mnt
It takes several commands to create a file- or memory-backed file system using <command>mdconfig</command>. FreeBSD also comes with <command>mdmfs</command> which automatically configures a memory disk, formats it with the <acronym>UFS</acronym> file system, and mounts it. For example, after creating <replaceable>newimage</replaceable> with <command>dd</command>, this one command is equivalent to running the <command>bsdlabel</command>, <command>newfs</command>, and <command>mount</command> commands shown above:
<prompt>#</prompt> <userinput>mdmfs -F <replaceable>newimage</replaceable> -s <replaceable>5</replaceable>m md<replaceable>0</replaceable> <replaceable>/mnt</replaceable></userinput>
To instead create a new memory-based memory disk with <command>mdmfs</command>, use this one command:
<prompt>#</prompt> <userinput>mdmfs -s <replaceable>5</replaceable>m md<replaceable>1</replaceable> <replaceable>/mnt</replaceable></userinput>
If the unit number is not specified, <command>mdmfs</command> will automatically select an unused memory device. For more details about <command>mdmfs</command>, refer to <citerefentry><refentrytitle>mdmfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
File System Snapshots
<primary>file systems</primary> <secondary>snapshots</secondary>
FreeBSD offers a feature in conjunction with <link linkend="soft-updates">Soft Updates</link>: file system snapshots.
UFS snapshots allow a user to create images of specified file systems, and treat them as a file. Snapshot files must be created in the file system that the action is performed on, and a user may create no more than 20 snapshots per file system. Active snapshots are recorded in the superblock so they are persistent across unmount and remount operations along with system reboots. When a snapshot is no longer required, it can be removed using <citerefentry><refentrytitle>rm</refentrytitle><manvolnum>1</manvolnum></citerefentry>. While snapshots may be removed in any order, all the used space may not be acquired because another snapshot will possibly claim some of the released blocks.
The un-alterable <option>snapshot</option> file flag is set by <citerefentry><refentrytitle>mksnap_ffs</refentrytitle><manvolnum>8</manvolnum></citerefentry> after initial creation of a snapshot file. <citerefentry><refentrytitle>unlink</refentrytitle><manvolnum>1</manvolnum></citerefentry> makes an exception for snapshot files since it allows them to be removed.
Snapshots are created using <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>. To place a snapshot of <filename>/var</filename> in the file <filename>/var/snapshot/snap</filename>, use the following command:
<prompt>#</prompt> <userinput>mount -u -o snapshot /var/snapshot/snap /var</userinput>
Alternatively, use <citerefentry><refentrytitle>mksnap_ffs</refentrytitle><manvolnum>8</manvolnum></citerefentry> to create the snapshot:
<prompt>#</prompt> <userinput>mksnap_ffs /var /var/snapshot/snap</userinput>
One can find snapshot files on a file system, such as <filename>/var</filename>, using <citerefentry><refentrytitle>find</refentrytitle><manvolnum>1</manvolnum></citerefentry>:
<prompt>#</prompt> <userinput>find /var -flags snapshot</userinput>
Once a snapshot has been created, it has several uses:
Some administrators will use a snapshot file for backup purposes, because the snapshot can be transferred to <acronym>CD</acronym>s or tape.
The file system integrity checker, <citerefentry><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>, may be run on the snapshot. Assuming that the file system was clean when it was mounted, this should always provide a clean and unchanging result.
Running <citerefentry><refentrytitle>dump</refentrytitle><manvolnum>8</manvolnum></citerefentry> on the snapshot will produce a dump file that is consistent with the file system and the timestamp of the snapshot. <citerefentry><refentrytitle>dump</refentrytitle><manvolnum>8</manvolnum></citerefentry> can also take a snapshot, create a dump image, and then remove the snapshot in one command by using <option>-L</option>.
The snapshot can be mounted as a frozen image of the file system. To <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> the snapshot <filename>/var/snapshot/snap</filename> run:
<prompt>#</prompt> <userinput>mdconfig -a -t vnode -o readonly -f /var/snapshot/snap -u 4</userinput>
<prompt>#</prompt> <userinput>mount -r /dev/md4 /mnt</userinput>
The frozen <filename>/var</filename> is now available through <filename>/mnt</filename>. Everything will initially be in the same state it was during the snapshot creation time. The only exception is that any earlier snapshots will appear as zero length files. To unmount the snapshot, use:
<prompt>#</prompt> <userinput>umount /mnt</userinput>
<prompt>#</prompt> <userinput>mdconfig -d -u 4</userinput>
For more information about <option>softupdates</option> and file system snapshots, including technical papers, visit Marshall Kirk McKusick's website at <uri xlink:href="http://www.mckusick.com/">http://www.mckusick.com/</uri>.
Disk Quotas
<primary>accounting</primary> <secondary>disk space</secondary>
Disk quotas can be used to limit the amount of disk space or the number of files a user or members of a group may allocate on a per-file system basis. This prevents one user or group of users from consuming all of the available disk space.
This section describes how to configure disk quotas for the <acronym>UFS</acronym> file system. To configure quotas on the <acronym>ZFS</acronym> file system, refer to <xref linkend="zfs-zfs-quota"/>

Loading…

No matching activity found.

Browse all component changes

Glossary

English Turkish (tr_TR)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect1/screen
Flags
no-wrap
Source string location
book.translate.xml:36133
String age
8 months ago
Source string age
a year ago
Translation file
books/tr_TR/handbook.po, string 6010