Changeset View
Standalone View
en_US.ISO8859-1/books/handbook/zfs/chapter.xml
Show First 20 Lines • Show All 2,259 Lines • ▼ Show 20 Lines | <para>When <command>ls .zfs/snapshot</command> was issued, the | ||||
others. Copying files or directories from this hidden | others. Copying files or directories from this hidden | ||||
<filename>.zfs/snapshot</filename> is simple enough. Trying | <filename>.zfs/snapshot</filename> is simple enough. Trying | ||||
it the other way around results in this error:</para> | it the other way around results in this error:</para> | ||||
<screen>&prompt.root; <userinput>cp <replaceable>/etc/rc.conf</replaceable> /var/tmp/.zfs/snapshot/<replaceable>after_cp/</replaceable></userinput> | <screen>&prompt.root; <userinput>cp <replaceable>/etc/rc.conf</replaceable> /var/tmp/.zfs/snapshot/<replaceable>after_cp/</replaceable></userinput> | ||||
cp: /var/tmp/.zfs/snapshot/after_cp/rc.conf: Read-only file system</screen> | cp: /var/tmp/.zfs/snapshot/after_cp/rc.conf: Read-only file system</screen> | ||||
<para>The error reminds the user that snapshots are read-only | <para>The error reminds the user that snapshots are read-only | ||||
and can not be changed after creation. No files can be | and cannot be changed after creation. No files can be | ||||
wblock: Not your fault, but the "no files can be" is just unpleasant. Better:
```Files cannot be``` | |||||
copied into or removed from snapshot directories because | copied into or removed from snapshot directories because | ||||
that would change the state of the dataset they | that would change the state of the dataset they | ||||
represent.</para> | represent.</para> | ||||
<para>Snapshots consume space based on how much the parent | <para>Snapshots consume space based on how much the parent | ||||
file system has changed since the time of the snapshot. The | file system has changed since the time of the snapshot. The | ||||
<literal>written</literal> property of a snapshot tracks how | <literal>written</literal> property of a snapshot tracks how | ||||
much space is being used by the snapshot.</para> | much space is being used by the snapshot.</para> | ||||
Show All 33 Lines | used:</para> | ||||
<screen>&prompt.root; <userinput>zfs list -rt all <replaceable>camino/home/joe</replaceable></userinput> | <screen>&prompt.root; <userinput>zfs list -rt all <replaceable>camino/home/joe</replaceable></userinput> | ||||
NAME USED AVAIL REFER MOUNTPOINT | NAME USED AVAIL REFER MOUNTPOINT | ||||
camino/home/joe 108K 1.3G 87K /usr/home/joe | camino/home/joe 108K 1.3G 87K /usr/home/joe | ||||
camino/home/joe@plans 21K - 85.5K - | camino/home/joe@plans 21K - 85.5K - | ||||
camino/home/joe@backup 0K - 87K -</screen> | camino/home/joe@backup 0K - 87K -</screen> | ||||
<para>A typical use for clones is to experiment with a specific | <para>A typical use for clones is to experiment with a specific | ||||
dataset while keeping the snapshot around to fall back to in | dataset while keeping the snapshot around to fall back to in | ||||
case something goes wrong. Since snapshots can not be | case something goes wrong. Since snapshots cannot be | ||||
changed, a read/write clone of a snapshot is created. After | changed, a read/write clone of a snapshot is created. After | ||||
the desired result is achieved in the clone, the clone can be | the desired result is achieved in the clone, the clone can be | ||||
promoted to a dataset and the old file system removed. This | promoted to a dataset and the old file system removed. This | ||||
is not strictly necessary, as the clone and dataset can | is not strictly necessary, as the clone and dataset can | ||||
coexist without problems.</para> | coexist without problems.</para> | ||||
<screen>&prompt.root; <userinput>zfs clone <replaceable>camino/home/joe</replaceable>@<replaceable>backup</replaceable> <replaceable>camino/home/joenew</replaceable></userinput> | <screen>&prompt.root; <userinput>zfs clone <replaceable>camino/home/joe</replaceable>@<replaceable>backup</replaceable> <replaceable>camino/home/joenew</replaceable></userinput> | ||||
&prompt.root; <userinput>ls /usr/home/joe*</userinput> | &prompt.root; <userinput>ls /usr/home/joe*</userinput> | ||||
▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | mypool@backup1 0 - 43.6M -</screen> | ||||
<para>Now that a snapshot exists, <command>zfs send</command> | <para>Now that a snapshot exists, <command>zfs send</command> | ||||
can be used to create a stream representing the contents of | can be used to create a stream representing the contents of | ||||
the snapshot. This stream can be stored as a file or received | the snapshot. This stream can be stored as a file or received | ||||
by another pool. The stream is written to standard output, | by another pool. The stream is written to standard output, | ||||
but must be redirected to a file or pipe or an error is | but must be redirected to a file or pipe or an error is | ||||
produced:</para> | produced:</para> | ||||
<screen>&prompt.root; <userinput>zfs send <replaceable>mypool</replaceable>@<replaceable>backup1</replaceable></userinput> | <screen>&prompt.root; <userinput>zfs send <replaceable>mypool</replaceable>@<replaceable>backup1</replaceable></userinput> | ||||
Error: Stream can not be written to a terminal. | Error: Stream cannot be written to a terminal. | ||||
wblockUnsubmitted Done Inline ActionsThis is output from a command and should not be changed. Or rather, changed in the source, but not here. wblock: This is output from a command and should not be changed. Or rather, changed in the source, but… | |||||
You must redirect standard output.</screen> | You must redirect standard output.</screen> | ||||
<para>To back up a dataset with <command>zfs send</command>, | <para>To back up a dataset with <command>zfs send</command>, | ||||
redirect to a file located on the mounted backup pool. Ensure | redirect to a file located on the mounted backup pool. Ensure | ||||
that the pool has enough free space to accommodate the size of | that the pool has enough free space to accommodate the size of | ||||
the snapshot being sent, which means all of the data contained | the snapshot being sent, which means all of the data contained | ||||
in the snapshot, not just the changes from the previous | in the snapshot, not just the changes from the previous | ||||
snapshot.</para> | snapshot.</para> | ||||
▲ Show 20 Lines • Show All 1,007 Lines • ▼ Show 20 Lines | <para><acronym>ZFS</acronym> is a fundamentally different file | ||||
system because it is more than just a file system. | system because it is more than just a file system. | ||||
<acronym>ZFS</acronym> combines the roles of file system and | <acronym>ZFS</acronym> combines the roles of file system and | ||||
volume manager, enabling additional storage devices to be added | volume manager, enabling additional storage devices to be added | ||||
to a live system and having the new space available on all of | to a live system and having the new space available on all of | ||||
the existing file systems in that pool immediately. By | the existing file systems in that pool immediately. By | ||||
combining the traditionally separate roles, | combining the traditionally separate roles, | ||||
<acronym>ZFS</acronym> is able to overcome previous limitations | <acronym>ZFS</acronym> is able to overcome previous limitations | ||||
that prevented <acronym>RAID</acronym> groups being able to | that prevented <acronym>RAID</acronym> groups being able to | ||||
grow. Each top level device in a zpool is called a | grow. Each top level device in a pool is called a | ||||
<emphasis>vdev</emphasis>, which can be a simple disk or a | <emphasis>vdev</emphasis>, which can be a simple disk or a | ||||
<acronym>RAID</acronym> transformation such as a mirror or | <acronym>RAID</acronym> transformation such as a mirror or | ||||
<acronym>RAID-Z</acronym> array. <acronym>ZFS</acronym> file | <acronym>RAID-Z</acronym> array. <acronym>ZFS</acronym> file | ||||
systems (called <emphasis>datasets</emphasis>) each have access | systems (called <emphasis>datasets</emphasis>) each have access | ||||
to the combined free space of the entire pool. As blocks are | to the combined free space of the entire pool. As blocks are | ||||
allocated from the pool, the space available to each file system | allocated from the pool, the space available to each file system | ||||
decreases. This approach avoids the common pitfall with | decreases. This approach avoids the common pitfall with | ||||
extensive partitioning where free space becomes fragmented | extensive partitioning where free space becomes fragmented | ||||
across the partitions.</para> | across the partitions.</para> | ||||
<informaltable pgwide="1"> | <informaltable pgwide="1"> | ||||
<tgroup cols="2"> | <tgroup cols="2"> | ||||
<tbody valign="top"> | <tbody valign="top"> | ||||
<row> | <row> | ||||
<entry xml:id="zfs-term-zpool">zpool</entry> | <entry xml:id="zfs-term-pool">pool</entry> | ||||
wblockUnsubmitted Done Inline ActionsThe ID change is okay, but it is important to build the document to make sure that xrefs to the previous name aren't broken. wblock: The ID change is okay, but it is important to build the document to make sure that xrefs to the… | |||||
sd_beastie.ioAuthorUnsubmitted Not Done Inline Actionsxref checked by full build. sd_beastie.io: xref checked by full build. | |||||
<entry>A storage <emphasis>pool</emphasis> is the most | <entry>A storage <emphasis>pool</emphasis> is the most | ||||
basic building block of <acronym>ZFS</acronym>. A pool | basic building block of <acronym>ZFS</acronym>. A pool | ||||
is made up of one or more vdevs, the underlying devices | is made up of one or more vdevs, the underlying devices | ||||
that store the data. A pool is then used to create one | that store the data. A pool is then used to create one | ||||
or more file systems (datasets) or block devices | or more file systems (datasets) or block devices | ||||
(volumes). These datasets and volumes share the pool of | (volumes). These datasets and volumes share the pool of | ||||
remaining free space. Each pool is uniquely identified | remaining free space. Each pool is uniquely identified | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | <tbody valign="top"> | ||||
<listitem> | <listitem> | ||||
<para | <para | ||||
xml:id="zfs-term-vdev-file"><emphasis>File</emphasis> | xml:id="zfs-term-vdev-file"><emphasis>File</emphasis> | ||||
- In addition to disks, <acronym>ZFS</acronym> | - In addition to disks, <acronym>ZFS</acronym> | ||||
pools can be backed by regular files, this is | pools can be backed by regular files, this is | ||||
especially useful for testing and experimentation. | especially useful for testing and experimentation. | ||||
Use the full path to the file as the device path | Use the full path to the file as the device path | ||||
in the zpool create command. All vdevs must be | in the &man.zpool.8; create command. All vdevs | ||||
wblockUnsubmitted Done Inline ActionsBetter to use <command> here rather than the man reference: in <command>zpool create</command>. All vdevs wblock: Better to use <command> here rather than the man reference:
```in <command>zpool… | |||||
at least 128 MB in size.</para> | must be at least 128 MB in size.</para> | ||||
wblockUnsubmitted Done Inline ActionsMoving the "must be" to this line is a whitespace-only change, and should not be mixed with a content change. But the suggestion for the previous line makes that unnecessary anyway. wblock: Moving the "must be" to this line is a whitespace-only change, and should not be mixed with a… | |||||
sd_beastie.ioAuthorUnsubmitted Done Inline ActionsThis still ends up being on the next line b/c of the command start and end tags. sd_beastie.io: This still ends up being on the next line b/c of the command start and end tags. | |||||
wblockUnsubmitted Done Inline ActionsNo, wrapping that line is a whitespace-only change. So you have to break the formatting rules while making the content change: in <command>zpool create</command>. All vdevs must be at least 128 MB in size.</para> That too-long line will be fixed in the followup whitespace-only commit. wblock: No, wrapping that line is a whitespace-only change. So you have to break the formatting rules… | |||||
sd_beastie.ioAuthorUnsubmitted Not Done Inline ActionsGot it. sd_beastie.io: Got it. | |||||
</listitem> | </listitem> | ||||
<listitem> | <listitem> | ||||
<para | <para | ||||
xml:id="zfs-term-vdev-mirror"><emphasis>Mirror</emphasis> | xml:id="zfs-term-vdev-mirror"><emphasis>Mirror</emphasis> | ||||
- When creating a mirror, specify the | - When creating a mirror, specify the | ||||
<literal>mirror</literal> keyword followed by the | <literal>mirror</literal> keyword followed by the | ||||
list of member devices for the mirror. A mirror | list of member devices for the mirror. A mirror | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | <listitem> | ||||
mirrored, but <acronym>RAID-Z</acronym> is not | mirrored, but <acronym>RAID-Z</acronym> is not | ||||
supported. If multiple log devices are used, | supported. If multiple log devices are used, | ||||
writes will be load balanced across them.</para> | writes will be load balanced across them.</para> | ||||
</listitem> | </listitem> | ||||
<listitem> | <listitem> | ||||
<para | <para | ||||
xml:id="zfs-term-vdev-cache"><emphasis>Cache</emphasis> | xml:id="zfs-term-vdev-cache"><emphasis>Cache</emphasis> | ||||
- Adding a cache vdev to a zpool will add the | - Adding a cache vdev to a pool will add the | ||||
storage of the cache to the <link | storage of the cache to the <link | ||||
linkend="zfs-term-l2arc"><acronym>L2ARC</acronym></link>. | linkend="zfs-term-l2arc"><acronym>L2ARC</acronym></link>. | ||||
Cache devices cannot be mirrored. Since a cache | Cache devices cannot be mirrored. Since a cache | ||||
device only stores additional copies of existing | device only stores additional copies of existing | ||||
data, there is no risk of data loss.</para> | data, there is no risk of data loss.</para> | ||||
</listitem> | </listitem> | ||||
</itemizedlist></entry> | </itemizedlist></entry> | ||||
</row> | </row> | ||||
▲ Show 20 Lines • Show All 666 Lines • Show Last 20 Lines |
Not your fault, but the "no files can be" is just unpleasant. Better: