Complete the Greek translation of Handbook's 'dtrace' and 'filesystems' chapters.

Obtained from:	FreeBSD Greek Documentation Project
This commit is contained in:
Manolis Kiagias 2008-10-15 14:36:45 +00:00
parent 19886d4dd3
commit bcdafddd16
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=33054
2 changed files with 398 additions and 353 deletions

View file

@ -7,7 +7,7 @@
$FreeBSD$ $FreeBSD$
%SOURCE% en_US.ISO8859-1/books/handbook/dtrace/chapter.sgml %SOURCE% en_US.ISO8859-1/books/handbook/dtrace/chapter.sgml
%SRCID% 1.2 %SRCID% 1.3
--> -->
@ -108,78 +108,87 @@
</sect1> </sect1>
<sect1 id="dtrace-implementation"> <sect1 id="dtrace-implementation">
<title>Implementation Differences</title> <title>Διαφορές στην Υλοποίηση</title>
<para>While the DTrace in &os; is very similar to that found <para>Αν και το DTrace στο &os; είναι αρκετά όμοιο με αυτό του &solaris;,
in &solaris;, differences exist that should be explained before υπάρχουν κάποιες διαφορές που θα πρέπει να τις εξηγήσουμε πριν
continuing. The primary difference users will notice is that συνεχίσουμε. Η μεγαλύτερη διαφορά που θα παρατηρήσουν οι χρήστες,
on &os;, DTrace needs to be specifically enabled. There are είναι ότι στο &os; το DTrace πρέπει να ενεργοποιηθεί χειροκίνητα.
kernel options and modules which must be enabled for DTrace to Υπάρχουν διάφορες επιλογές και αρθρώματα για τον πυρήνα που πρέπει να
work properly. These will be explained later.</para> ενεργοποιηθούν ώστε το DTrace να λειτουργεί σωστά. Θα εξηγήσουμε
αργότερα αυτές τις ρυθμίσεις.</para>
<para>There is a <literal>DDB_CTF</literal> kernel option which <para>Η επιλογή <literal>DDB_CTF</literal> του πυρήνα χρησιμοποιείται για
is used to enable support for loading the <acronym>CTF</acronym> να ενεργοποιήσει την υποστήριξη φορτώματος των δεδομένων
data from kernel modules and the kernel itself. <acronym>CTF</acronym> από τον πυρήνα και τα αρθρώματα του. Το
<acronym>CTF</acronym> is the &solaris; Compressed C Type format <acronym>CTF</acronym> είναι το Compact C Type format του &solaris;,
which encapsulates a reduced form of debugging information το οποίο ενθυλακώνει μια ελαττωμένη μορφή πληροφοριών αποσφαλμάτωσης
similar to <acronym>DWARF</acronym> and the venerable stabs. (debugging), όμοια με το <acronym>DWARF</acronym> και τα
This <acronym>CTF</acronym> data is added to the binaries by the stabs. Αυτά τα δεδομένα <acronym>CTF</acronym> προστίθενται στα
<command>ctfconvert</command> and <command>ctfmerge</command> εκτελέσιμα μέσω των εργαλείων <command>ctfconvert</command> και
build tools. The <command>ctfconvert</command> utility parses <command>ctfmerge</command>. Το βοηθητικό πρόγραμμα
<acronym>DWARF</acronym> debug <acronym>ELF</acronym> sections <command>ctfconvert</command> ερμηνεύει τα τμήματα debug
created by the compiler and <command>ctfmerge</command> merges <acronym>DWARF</acronym> τύπου <acronym>ELF</acronym> που δημιουργούνται
<acronym>CTF</acronym> <acronym>ELF</acronym> sections from από το μεταγλωττιστή, και το <command>ctfmerge</command> συγχωνεύει τα
objects into either executables or shared libraries. More on τμήματα <acronym>CTF</acronym> και <acronym>ELF</acronym> από τα
how to enable this for the kernel and &os; build is αντικείμενα σε άλλα εκτελέσιμα ή κοινόχρηστες βιβλιοθήκες.
forthcoming.</para> Περισσότερες πληροφορίες για την ενεργοποίηση των παραπάνω στη
μεταγλώττιση του πυρήνα και του συστήματος του &os;, θα δούμε
παρακάτω.</para>
<para>Some different providers exist for &os; than for &solaris;. <para>Στο &os; κάποιοι παροχείς είναι διαφορετικοί σε σχέση με το
Most notable is the <literal>dtmalloc</literal> provider, which &solaris;. Ο πιο αξιοσημείωτος είναι ο παροχέας
allows tracing <function>malloc()</function> by type in the <literal>dtmalloc</literal> ο οποίος επιτρέπει το tracing του
&os; kernel.</para> <function>malloc()</function> ανάλογα με τον τύπο του, στον πυρήνα του
&os;.</para>
<para>Only <username>root</username> may use DTrace on &os;. <para>Μόνο ο <username>root</username> μπορεί να χρησιμοποιήσει το
This is related to security differences, &solaris; has a few DTrace στο &os;. Αυτό σχετίζεται με διαφορές στην ασφάλεια, καθώς το
low level security checks which do not yet exist in &os;. As &solaris; διαθέτει κάποιους ελέγχους ασφάλειας χαμηλού επιπέδου, οι
such, the <devicename>/dev/dtrace/dtrace</devicename> is strictly οποίοι δεν υπάρχουν ακόμα στο &os;. Για το λόγο αυτό, η χρήση της
limited to <username>root</username> users only.</para> συσκευής <devicename>/dev/dtrace/dtrace</devicename> απαγορεύεται
αυστηρά για όλους τους χρήστες εκτός από τον
<username>root</username>.</para>
<para>Finally, the DTrace software falls under &sun;'s <para>Τέλος, το λογισμικό DTrace βρίσκεται υπό την άδεια
<acronym>CDDL</acronym> license. The <literal>Common Development <acronym>CDDL</acronym> της &sun;. Μπορείτε να διαβάσετε το κείμενο
and Distribution License</literal> comes with &os;, see the της άδειας <literal>Common Development and Distribution
License</literal> στο &os;, στο αρχείο
<filename>/usr/src/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE</filename> <filename>/usr/src/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE</filename>
or view it online at ή να το διαβάσετε online στη διεύθυνση
<ulink url="http://www.opensolaris.org/os/licensing"> <ulink url="http://www.opensolaris.org/os/licensing">http://www.opensolaris.org/os/licensing</ulink>.</para>
http://www.opensolaris.org/os/licensing</ulink>.</para>
<para>This license means that a &os; kernel with the DTrace options <para>Η άδεια ουσιαστικά σημαίνει ότι ένας πυρήνας &os; με τις επιλογές
is still <acronym>BSD</acronym> licensed; however the του DTrace, εξακολουθεί να βρίσκεται υπό την άδεια
<acronym>CDDL</acronym> kicks in when the modules are distributed <acronym>BSD</acronym>. Ωστόσο το <acronym>CDDL</acronym> εμπλέκεται
in binary form, or the binaries are loaded.</para> τη στιγμή που γίνεται διανομή των αρθρωμάτων σε δυαδική μορφή, ή τη
στιγμή που φορτώνονται.</para>
</sect1> </sect1>
<sect1 id="dtrace-enable"> <sect1 id="dtrace-enable">
<title>Enabling DTrace Support</title> <title>Ενεργοποίηση της Υποστήριξης DTrace</title>
<para>To enable support for DTrace, add the following lines to <para>Για να ενεργοποιήσετε την υποστήριξη για το DTrace, προσθέστε τις
the kernel configuration file:</para> ακόλουθες γραμμές στο αρχείο ρυθμίσεων του πυρήνα:</para>
<programlisting>options KDTRACE_HOOKS <programlisting>options KDTRACE_HOOKS
options DDB_CTF</programlisting> options DDB_CTF</programlisting>
<note> <note>
<para>Users of the AMD64 architecture will want to add the <para>Οι χρήστες της αρχιτεκτονικής AMD64 θα θέλουν να προσθέσουν την
following line to their kernel configuration file:</para> ακόλουθη γραμμή στο αρχείο ρυθμίσεων του πυρήνα τους:</para>
<programlisting>options KDTRACE_FRAME</programlisting> <programlisting>options KDTRACE_FRAME</programlisting>
<para>This option provides support for the <acronym>FBT</acronym> <para>Η επιλογή αυτή παρέχει υποστήριξη για τη λειτουργία
feature. DTrace will work without this option; however, there <acronym>FBT</acronym>. Το DTrace μπορεί να λειτουργήσει και χωρίς
will be limited support for function boundary tracing.</para> αυτήν. Ωστόσο, θα παρέχει περιορισμένη υποστήριξη για
function boundary tracing.</para>
</note> </note>
<para>All sources must be rebuilt and installed with CTF options. <para>Όλος ο πηγαίος κώδικας θα πρέπει να μεταγλωττιστεί ξανά με τις
To accomplish this task, rebuild the &os; sources using:</para> επιλογές <acronym>CTF</acronym>. Για να γίνει αυτό, μεταγλωττίστε
ξανά το &os; χρησιμοποιώντας:</para>
<screen>&prompt.root; <userinput>cd /usr/src</userinput> <screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make WITH_CTF=1 buildworld</userinput> &prompt.root; <userinput>make WITH_CTF=1 buildworld</userinput>
@ -187,94 +196,98 @@ options DDB_CTF</programlisting>
&prompt.root; <userinput>make WITH_CFT=1 installworld</userinput> &prompt.root; <userinput>make WITH_CFT=1 installworld</userinput>
&prompt.root; <userinput>mergemaster -Ui</userinput></screen> &prompt.root; <userinput>mergemaster -Ui</userinput></screen>
<para>The system will need to be restarted.</para> <para>Θα χρειαστεί να επανεκκινήσετε το σύστημα.</para>
<para>After rebooting and allowing the new kernel to be loaded <para>Μετά την επανεκκίνηση, και με τον νέο πυρήνα φορτωμένο πλέον στη
into memory, support for the Korn shell should be added. This μνήμη, θα πρέπει να προσθέσετε υποστήριξη για το κέλυφος Korn. Αυτό
is needed as the DTrace toolkit has several utilities written απαιτείται, καθώς τα εργαλεία DTrace περιλαμβάνουν διάφορα βοηθητικά
in <command>ksh</command>. Install the προγράμματα τα οποία είναι γραμμένα σε
<filename role="package">shells/ksh93</filename>. It is also <command>ksh</command>. Εγκαταστήστε το port
possible to run these tools under <filename role="package">shells/ksh93</filename>. Μπορείτε επίσης να
<filename role="package">shells/pdksh</filename> or εκτελέσετε αυτά τα εργαλεία και μέσω του
<filename role="package">shells/pdksh</filename> ή του
<filename role="package">shells/mksh</filename>.</para> <filename role="package">shells/mksh</filename>.</para>
<para>Finally, obtain the current DTrace toolkit. The current <para>Τέλος, ανακτήστε την τρέχουσα σειρά εργαλείων DTrace. Η τελευταία
version is available at έκδοση διατίθεται στην τοποθεσία
<ulink url="http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/"> <ulink url="http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/"></ulink>.
http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/</ulink>. Διατίθεται και πρόγραμμα εγκατάστασης, το οποίο δεν είναι ωστόσο
There is an install mechanism included; however, installation απαραίτητο να εκτελέσετε προκειμένου να χρησιμοποιήσετε τα
is not required to make use of the bundled utilities.</para> εργαλεία.</para>
</sect1> </sect1>
<sect1 id="dtrace-using"> <sect1 id="dtrace-using">
<title>Using DTrace</title> <title>Χρησιμοποιώντας το DTrace</title>
<para>Before making use of DTrace functionality, the DTrace device <para>Πριν χρησιμοποιήσετε τις λειτουργίες του DTrace, θα πρέπει να
must exist. To load the device, issue the following υπάρχει η αντίστοιχη συσκευή. Για να φορτώσετε τη συσκευή, θα πρέπει
command:</para> να δώσετε την παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>kldload dtraceall</userinput></screen> <screen>&prompt.root; <userinput>kldload dtraceall</userinput></screen>
<para>DTrace support should now be available. To view all probes <para>Θα πρέπει να έχετε πλέον υποστήριξη DTrace. Για να δείτε όλα τα
the administrator may now execute the following command:</para> probes, θα πρέπει να εκτελέσετε ως διαχειριστής την παρακάτω
εντολή:</para>
<screen>&prompt.root; <userinput>dtrace -l | more</userinput></screen> <screen>&prompt.root; <userinput>dtrace -l | more</userinput></screen>
<para>All output is passed to the <command>more</command> <para>Όλη η έξοδος περνάει μέσω του βοηθητικού προγράμματος
utility as it will quickly overflow the screen buffer. At <command>more</command>, διαφορετικά γρήγορα θα υπερχείλιζε την
this point, DTrace should be considered working. It is now προσωρινή μνήμη της οθόνης. Στο σημείο αυτό, θα πρέπει να θεωρηθεί ότι
time to review the toolkit.</para> το DTrace λειτουργεί. Είναι πλέον ώρα να εξετάσουμε αυτή τη σειρά
εργαλείων.</para>
<para>The toolkit is a collection of ready-made scripts to run <para>Η σειρά των εργαλείων είναι μια συλλογή από έτοιμα scripts που
with DTrace to collect system information. There are scripts εκτελούνται με το DTrace ώστε να συλλέξουν πληροφορίες σχετικά με το
to check open files, memory, <acronym>CPU</acronym> usage and σύστημα. Υπάρχουν scripts που ελέγχουν για ανοικτά αρχεία, τη μνήμη,
a lot more. Extract the scripts with the following τη χρήση της <acronym>CPU</acronym> και πολλά ακόμα. Κάντε εξαγωγή των
command:</para> scripts με την ακόλουθη εντολή:</para>
<screen>&prompt.root; <userinput>gunzip -c DTraceToolkit* | tar xvf -</userinput></screen> <screen>&prompt.root; <userinput>gunzip -c DTraceToolkit* | tar xvf -</userinput></screen>
<para>Change into that directory with the <command>cd</command> <para>Μετακινηθείτε στον κατάλογο που τα αποσυμπιέσατε με την εντολή
and change the execution permissions on all files, designated <command>cd</command> και αλλάξτε τα δικαιώματα εκτέλεσης σε όλα τα
as those files with lower case names, to αρχεία, όπως στα αρχεία με τα μικρά γράμματα, σε
<literal>755</literal>.</para> <literal>755</literal>.</para>
<para>All of these scripts will need modifications to their <para>Θα χρειαστεί να γίνουν αλλαγές στο περιεχόμενο σε όλα τα scripts.
contents. The ones which refer to Όσα περιέχουν το
<filename>/usr/bin/ksh</filename> need that changed to <filename>/usr/bin/ksh</filename> θα πρέπει να αλλαχθούν σε
<filename>/usr/local/bin/ksh</filename>, the others which <filename>/usr/local/bin/ksh</filename>, τα άλλα που περιέχουν το
use <filename>/usr/bin/sh</filename> need to be altered to use <filename>/usr/bin/sh</filename> θα πρέπει να αλλαχθούν σε
<filename>/bin/sh</filename>, and finally the ones which <filename>/bin/sh</filename>, και τέλος αυτά που περιέχουν το
use <filename>/usr/bin/perl</filename> will need altered to <filename>/usr/bin/perl</filename> θα πρέπει να αλλαχθούν σε
use <filename>/usr/local/bin/perl</filename>.</para> <filename>/usr/local/bin/perl</filename>.</para>
<important> <important>
<para>At this point it is prudent to remind the reader that <para>Στο σημείο αυτό είναι σημαντικό να υπενθυμίσουμε στον αναγνώστη
DTrace support in &os; is <emphasis>incomplete</emphasis> ότι η υποστήριξη DTrace στο &os; είναι <emphasis>ατελής</emphasis>
and <emphasis>experimental</emphasis>. Many of these scripts και πειραματική. Πολλά από αυτά τα scripts δεν θα λειτουργήσουν,
will not work as they are either too &solaris;-specific or καθώς είναι είτε πολύ προσανατολισμένα στο &solaris;, ή χρησιμοποιούν
use probes which are unsupported at this time.</para> probes τα οποία δεν υποστηρίζονται τη δεδομένη στιγμή.</para>
</important> </important>
<para>At the time of this writing only two of the scripts of the <para>Τη στιγμή που γράφονται αυτές οι γραμμές, μόνο δύο scripts από τη
DTrace Toolkit are fully supported in &os;: σειρά εργαλείων του DTrace υποστηρίζονται πλήρως στο &os;: το
the <filename>hotkernel</filename> <filename>hotkernel</filename> και το <filename>procsystime</filename>.
and <filename>procsystime</filename> scripts. These are the two Αυτά τα δύο θα εξερευνήσουμε στα επόμενα τμήματα αυτής της
we will explore in the following parts of this section.</para> ενότητας.</para>
<para>The <filename>hotkernel</filename> is designed to identify <para>Το <filename>hotkernel</filename> έχει σχεδιαστεί να αναγνωρίζει
which function is using the most kernel time. Run normally, it ποια συνάρτηση καταναλώνει το μεγαλύτερο χρόνο στον πυρήνα. Εκτελώντας
will produce output similar to the following:</para> το υπό κανονικές συνθήκες, θα δείτε έξοδο παρόμοια με την
παρακάτω:</para>
<screen>&prompt.root; <userinput>./hotkernel</userinput> <screen>&prompt.root; <userinput>./hotkernel</userinput>
localhost# ./hotkernel
Sampling... Hit Ctrl-C to end.</screen> Sampling... Hit Ctrl-C to end.</screen>
<para>The system administrator must use the <para>Ο διαχειριστής του συστήματος θα πρέπει να χρησιμοποιήσει το
<keycombo action="simul"><keycap>Ctrl</keycap><keycap>C</keycap> συνδυασμό πλήκτρων <keycombo
</keycombo> key combination to stop the process. Upon action="simul"><keycap>Ctrl</keycap><keycap>C</keycap></keycombo> για
termination, the script will display a list of kernel functions and να σταματήσει τη διεργασία. Με τον τερματισμό του, το script θα
timing information, sorting the output in increasing order of απεικονίσει μια σειρά από συναρτήσεις του πυρήνα και πληροφορίες σχετικά
time:</para> με το χρόνο τους, ταξινομώντας τις σε αύξουσα σειρά ανάλογα με το
χρόνο:</para>
<screen>kernel`_thread_lock_flags 2 0.0% <screen>kernel`_thread_lock_flags 2 0.0%
0xc1097063 2 0.0% 0xc1097063 2 0.0%
@ -307,12 +320,11 @@ kernel`sched_idletd 137 0.3%
to find 0xc10981a5, but to no avail. It would be nice to know to find 0xc10981a5, but to no avail. It would be nice to know
how we should look that up. --> how we should look that up. -->
<para>This script will also work with kernel modules. To use this <para>Το script αυτό λειτουργεί επίσης με αρθρώματα του πυρήνα. Για να
feature, run the script with the <option>-m</option> flag:</para> χρησιμοποιήσετε αυτό το χαρακτηριστικό, εκτελέστε το με την επιλογή
<option>-m</option>:</para>
<screen>&prompt.root; <userinput>./hotkernel -m</userinput></screen> <screen>&prompt.root; <userinput>./hotkernel -m</userinput>
<screen>localhost# <userinput>./hotkernel -m</userinput>
Sampling... Hit Ctrl-C to end. Sampling... Hit Ctrl-C to end.
^C ^C
MODULE COUNT PCNT MODULE COUNT PCNT
@ -333,14 +345,13 @@ kernel 874 0.4%
kldstat and kldstat -v and grep. Maybe I'm missing something kldstat and kldstat -v and grep. Maybe I'm missing something
seriously obvious. It is 5AM btw. --> seriously obvious. It is 5AM btw. -->
<para>The <filename>procsystime</filename> script captures and <para>Το <filename>procsystime</filename> script συλλαμβάνει και τυπώνει
prints the system call time usage for a given τον χρόνο των κλήσεων συστήματος για μια συγκεκριμένη διεργασία μέσω
<acronym>PID</acronym> or process name. In the following του <acronym>PID</acronym> ή του ονόματος της. Στο παρακάτω παράδειγμα
example, a new instance of <filename>/bin/csh</filename> έχουμε ξεκινήσει μια νέα διεργασία του <filename>/bin/csh</filename>.
was spawned. The <filename>procsystime</filename> was executed Εκτελέσαμε το <filename>procsystime</filename> και το αφήσαμε στην
and remained waiting while a few commands were typed on the αναμονή καθώς γράφαμε μερικές εντολές στο <command>csh</command> που
other incarnation of <command>csh</command>. These are the είχαμε ανοίξει. Αυτά είναι τα αποτελέσματα της δοκιμής μας:</para>
results of this test:</para>
<screen>&prompt.root; <userinput>./procsystime -n csh</userinput> <screen>&prompt.root; <userinput>./procsystime -n csh</userinput>
Tracing... Hit Ctrl-C to end... Tracing... Hit Ctrl-C to end...
@ -368,20 +379,22 @@ Elapsed Times for processes csh,
sigsuspend 6985124 sigsuspend 6985124
read 3988049784</screen> read 3988049784</screen>
<para>As shown, the read system call seems to use the <para>Όπως φαίνεται, η κλήση του συστήματος για ανάγνωση
most time in nanoseconds with the <function>getpid()</function> (<function>read()</function>) είναι αυτή που καταναλώνει τον
system call used the least amount of time.</para> περισσότερο χρόνο σε νανοδευτερόλεπτα, ενώ το λιγότερο τον καταναλώνει
η κλήση συστήματος <function>getpid()</function>.</para>
</sect1> </sect1>
<sect1 id="dtrace-language"> <sect1 id="dtrace-language">
<title>The D Language</title> <title>Η Γλώσσα D</title>
<para>The DTrace Toolkit includes many scripts in the special language of <para>Η σειρά εργαλείων DTrace, περιλαμβάνει αρκετά scripts γραμμένα στην
DTrace. This language is called <quote>the D language</quote> by &sun; ειδική γλώσσα του DTrace. Η γλώσσα αυτή ονομάζεται
documentation, and it is very similar to C++. An in depth <quote>η γλώσσα D</quote> στην τεκμηρίωση της &sun;, και είναι αρκετά
discussion of the language is beyond the scope of this document. It is όμοια με τη C++. Αναλυτική περιγραφή αυτής της γλώσσας είναι πέρα από
extensively discussed τους σκοπούς αυτού του κειμένου. Υπάρχει ενεργή συζήτηση σχετικά με
at <ulink url="http://wikis.sun.com/display/DTrace/Documentation"></ulink>.</para> αυτή, στη διεύθυνση <ulink
url="http://wikis.sun.com/display/DTrace/Documentation"></ulink>.</para>
</sect1> </sect1>
</chapter> </chapter>

View file

@ -49,7 +49,7 @@
Üëëá ëåéôïõñãéêÜ óõóôÞìáôá, ð.÷.&nbsp;äåäïìÝíá ðïõ âñßóêïíôáé óå ôïðéêÜ Üëëá ëåéôïõñãéêÜ óõóôÞìáôá, ð.÷.&nbsp;äåäïìÝíá ðïõ âñßóêïíôáé óå ôïðéêÜ
<acronym>USB</acronym> áðïèçêåõôéêÜ ìÝóá, ïäçãïýò flash, êáé óêëçñïýò <acronym>USB</acronym> áðïèçêåõôéêÜ ìÝóá, ïäçãïýò flash, êáé óêëçñïýò
äßóêïõò. ÕðÜñ÷åé åðßóçò õðïóôÞñéîç ãéá Üëëá, ìç-åããåíÞ óõóôÞìáôá äßóêïõò. ÕðÜñ÷åé åðßóçò õðïóôÞñéîç ãéá Üëëá, ìç-åããåíÞ óõóôÞìáôá
áñ÷åßùí, üðùò ôï ôï Extended File System (<acronym>EXT</acronym>) ôïõ αρχείων, όπως το Extended File System (<acronym>EXT</acronym>) του
&linux; êáèþò êáé ôï óýóôçìá Z File System (<acronym>ZFS</acronym>) ôçò &linux; êáèþò êáé ôï óýóôçìá Z File System (<acronym>ZFS</acronym>) ôçò
&sun;.</para> &sun;.</para>
@ -119,113 +119,122 @@
</sect1> </sect1>
<sect1 id="filesystems-zfs"> <sect1 id="filesystems-zfs">
<title>The Z File System</title> <title>Το Σύστημα Αρχείων Z</title>
<para>The Z&nbsp;file system, developed by &sun;, is a new <para>Το σύστημα αρχείων Z, αναπτύχθηκε από την &sun;, και είναι μια νέα
technology designed to use a pooled storage method. This means τεχνολογία που σχεδιάστηκε για να παρέχει αποθήκευση μέσω της μεθόδου
that space is only used as it is needed for data storage. It pool. Αυτό σημαίνει ότι όλος ο ελεύθερος χώρος διατίθεται ως
has also been designed for maximum data integrity, supporting απόθεμα, και διανέμεται δυναμικά σε κάθε σύστημα αρχείων ανάλογα με τις
data snapshots, multiple copies, and data checksums. A new ανάγκες αποθήκευσης δεδομένων. Έχει επίσης σχεδιαστεί για τη μέγιστη
data replication model, known as <acronym>RAID</acronym>-Z has ακεραιότητα δεδομένων και υποστηρίζει στιγμιότυπα (snapshots) δεδομένων,
been added. The <acronym>RAID</acronym>-Z model is similar πολλαπλά αντίγραφα και αθροίσματα ελέγχου δεδομένων (checksums). Έχει
to <acronym>RAID</acronym>5 but is designed to prevent data ακόμα προστεθεί ένα νέο μοντέλο για τη διατήρηση αντιγράφων των
write corruption.</para> δεδομένων, γνωστό ως <acronym>RAID</acronym>-Z. Το μοντέλο
<acronym>RAID</acronym>-Z είναι παρόμοιο με το
<acronym>RAID</acronym>5 αλλά είναι σχεδιασμένο να παρέχει προστασία
των δεδομένων κατά την εγγραφή τους.</para>
<sect2> <sect2>
<title>ZFS Tuning</title> <title>Βελτιστοποίηση του ZFS</title>
<para>The <acronym>ZFS</acronym> subsystem utilizes much of <para>Το υποσύστημα <acronym>ZFS</acronym> χρησιμοποιεί αρκετούς πόρους
the system resources, so some tuning may be required to provide του συστήματος. Βελτιστοποιώντας τις ρυθμίσεις του συστήματος σας, θα
maximum efficiency during every-day use. As an experimental επιτύχετε τη μέγιστη απόδοση στην καθημερινή χρήση. Καθώς το
feature in &os; this may change in the near future; however, <acronym>ZFS</acronym> είναι ακόμα σε πειραματικό στάδιο στο &os;,
at this time, the following steps are recommended.</para> αυτό ίσως αλλάξει μελλοντικά. Ωστόσο, για την ώρα, συνίσταται να
ακολουθήσετε τα παρακάτω βήματα:</para>
<sect3> <sect3>
<title>Memory</title> <title>Μνήμη</title>
<para>The total system memory should be at least one gigabyte, <para>Το συνολικό μέγεθος μνήμης του συστήματος πρέπει να είναι
with two gigabytes or more recommended. In all of the τουλάχιστον ένα gigabyte, ενώ το συνιστώμενο μέγεθος είναι δύο
examples here, the system has one gigabyte of memory with gigabytes ή και περισσότερο. Σε όλα τα παραδείγματα που φαίνονται
several other tuning mechanisms in place.</para> εδώ, το σύστημα έχει ένα gigabyte μνήμης και έχουμε επίσης
βελτιστοποιήσει τις ρυθμίσεις του.</para>
<para>Some people have had luck using fewer than one gigabyte <para>Ορισμένοι χρήστες φαίνεται να τα καταφέρνουν και με λιγότερο
of memory, but with such a limited amount of physical memory, από ένα gigabyte μνήμης, αλλά με τέτοιους περιορισμούς φυσικής
when the system is under heavy load, it is very plausible μνήμης, είναι αρκετά πιθανό να δημιουργηθεί panic κάτω από βαρύ
that &os; will panic due to memory exhaustion.</para> φορτίο εργασίας, εξαιτίας εξάντλησης της.</para>
</sect3> </sect3>
<sect3> <sect3>
<title>Kernel Configuration</title> <title>Ρύθμιση του Πυρήνα</title>
<para>It is recommended that unused drivers and options <para>Συνίσταται να αφαιρέσετε τα προγράμματα οδήγησης και τις
be removed from the kernel configuration file. Since most επιλογές που δεν χρησιμοποιείτε από το αρχείο ρυθμίσεων του
devices are available as modules, they may simply be loaded πυρήνα. Καθώς οι περισσότεροι οδηγοί συσκευών διατίθενται επίσης
using the <filename>/boot/loader.conf</filename> file.</para> και σε μορφή αρθρωμάτων, μπορείτε απλά να τους φορτώσετε
χρησιμοποιώντας το αρχείο
<filename>/boot/loader.conf</filename>.</para>
<para>Users of the i386 architecture should add the following <para>Οι χρήστες της αρχιτεκτονικής i386 θα πρέπει να προσθέσουν την
option to their kernel configuration file, rebuild their παρακάτω επιλογή στο αρχείο ρυθμίσεων του πυρήνα τους, να τον
kernel, and reboot:</para> επαναμεταγλωττίσουν και να επανεκκινήσουν το σύστημα τους:</para>
<programlisting>options KVA_PAGES=512</programlisting> <programlisting>options KVA_PAGES=512</programlisting>
<para>This option will expand the kernel address space, thus <para>Η επιλογή αυτή θα διευρύνει την περιοχή διευθύνσεων του πυρήνα,
allowing the <varname>vm.kvm_size</varname> tunable to be επιτρέποντας έτσι την αύξηση τιμής της ρυθμιστικής μεταβλητής
pushed beyond the currently imposed limit of 1&nbsp;GB <varname>vm.kvm_size</varname> πέρα από το τρέχον όριο του
(2&nbsp;GB for <acronym>PAE</acronym>). To find the most 1&nbsp;GB (2&nbsp;GB για πυρήνες <acronym>PAE</acronym>). Για να
suitable value for this option, divide the desired address βρείτε την καταλληλότερη τιμή για αυτή την επιλογή, διαιρέστε το
space in megabytes by four (4). In this case, it is επιθυμητό μέγεθος της περιοχής διευθύνσεων με το τέσσερα (4). Στην
<literal>512</literal> for 2&nbsp;GB.</para> περίπτωση αυτή, έχουμε <literal>512</literal> για μέγεθος
2&nbsp;GB.</para>
</sect3> </sect3>
<sect3> <sect3>
<title>Loader Tunables</title> <title>Ρυθμίσεις στις Μεταβλητές του Loader</title>
<para>The <devicename>kmem</devicename> address space should be <para>Θα πρέπει να αυξηθεί η περιοχή διευθύνσεων
increased on all &os; architectures. On the test system with <devicename>kmem</devicename> σε όλες τις αρχιτεκτονικές του &os;.
one gigabyte of physical memory, success was achieved with the Στο δοκιμαστικό μας σύστημα, με ένα gigabyte φυσικής μνήμης,
following options which should be placed in είχαμε επιτυχημένο αποτέλεσμα χρησιμοποιώντας τις ακόλουθες
the <filename>/boot/loader.conf</filename> file and the system επιλογές στο αρχείο <filename>/boot/loader.conf</filename> και
restarted:</para> επανεκκινώντας το σύστημα μας:</para>
<programlisting>vm.kmem_slze="330M" <programlisting>vm.kmem_slze="330M"
vm.kmem_size_max="330M" vm.kmem_size_max="330M"
vfs.zfs.arc_max="40M" vfs.zfs.arc_max="40M"
vfs.zfs.vdev.cache.size="5M"</programlisting> vfs.zfs.vdev.cache.size="5M"</programlisting>
<para>For a more detailed list of recommendations for ZFS-related <para>Για αναλυτικότερες ρυθμίσεις σχετικά με την βελτιστοποίηση του
tuning, see ZFS, δείτε το <ulink
<ulink url="http://wiki.freebsd.org/ZFSTuningGuide"></ulink>.</para> url="http://wiki.freebsd.org/ZFSTuningGuide"></ulink>.</para>
</sect3> </sect3>
</sect2> </sect2>
<sect2> <sect2>
<title>Using <acronym>ZFS</acronym></title> <title>Χρησιμοποιώντας το <acronym>ZFS</acronym></title>
<para>There is a start up mechanism that allows &os; to <para>Υπάρχει ένας μηχανισμός εκκίνησης που επιτρέπει στο &os; να
mount <acronym>ZFS</acronym> pools during system προσαρτήσει <acronym>ZFS</acronym> pools κατά τη διάρκεια της
initialization. To set it, issue the following εκκίνησης του συστήματος. Για να τον ρυθμίσετε, εκτελέστε τις
commands:</para> ακόλουθες εντολές:</para>
<screen>&prompt.root; <userinput>echo 'zfs_enable="YES"' &gt;&gt; /etc/rc.conf</userinput> <screen>&prompt.root; <userinput>echo 'zfs_enable="YES"' &gt;&gt; /etc/rc.conf</userinput>
&prompt.root; <userinput>/etc/rc.d/zfs start</userinput></screen> &prompt.root; <userinput>/etc/rc.d/zfs start</userinput></screen>
<para>The remainder of this document assumes two <para>Το υπόλοιπο αυτού του κειμένου υποθέτει ότι έχετε διαθέσιμους
<acronym>SCSI</acronym> disks are available, and their device names δύο <acronym>SCSI</acronym> δίσκους, και ότι τα ονόματα συσκευών
are <devicename><replaceable>da0</replaceable></devicename> τους είναι <devicename><replaceable>da0</replaceable></devicename>
and <devicename><replaceable>da1</replaceable></devicename> και <devicename><replaceable>da1</replaceable></devicename>
respectively. Users of <acronym>IDE</acronym> hardware may αντίστοιχα. Όσοι χρησιμοποιούν δίσκους <acronym>IDE</acronym> θα
use the <devicename><replaceable>ad</replaceable></devicename> πρέπει να χρησιμοποιήσουν συσκευές του τύπου
devices in place of <acronym>SCSI</acronym> hardware.</para> <devicename><replaceable>ad</replaceable></devicename>
αντί για τις αντίστοιχες <acronym>SCSI</acronym>.</para>
<sect3> <sect3>
<title>Single Disk Pool</title> <title>Pool με Ένα Μόνο Δίσκο</title>
<para>To create a <acronym>ZFS</acronym> over a single disk <para>Για την δημιουργία <acronym>ZFS</acronym> σε ένα μόνο δίσκο,
device, use the <command>zpool</command> command:</para> χρησιμοποιήστε την εντολή <command>zpool</command>:</para>
<screen>&prompt.root; <userinput>zpool create example /dev/da0</userinput></screen> <screen>&prompt.root; <userinput>zpool create example /dev/da0</userinput></screen>
<para>To view the new pool, review the output of the <para>Για να δείτε το νέο pool, εξετάστε την έξοδο της εντολής
<command>df</command>:</para> <command>df</command>:</para>
<screen>&prompt.root; <userinput>df</userinput> <screen>&prompt.root; <userinput>df</userinput>
@ -235,12 +244,12 @@ devfs 1 1 0 100% /dev
/dev/ad0s1d 54098308 1032846 48737598 2% /usr /dev/ad0s1d 54098308 1032846 48737598 2% /usr
example 17547136 0 17547136 0% /example</screen> example 17547136 0 17547136 0% /example</screen>
<para>This output clearly shows the <literal>example</literal> <para>Η έξοδος αυτή δείχνει καθαρά ότι το <literal>example</literal>
pool has not only been created but pool όχι μόνο έχει δημιουργηθεί, αλλά έχει επίσης
<emphasis>mounted</emphasis> as well. It is also accessible <emphasis>προσαρτηθεί</emphasis> κιόλας. Είναι επίσης διαθέσιμο ως
just like a normal file system, files may be created on it κανονικό σύστημα αρχείων, μπορείτε να δημιουργήσετε αρχεία σε αυτό,
and users are able to browse it as in the και άλλοι χρήστες μπορούν επίσης να το δουν, όπως φαίνεται στο
following example:</para> παρακάτω παράδειγμα:</para>
<screen>&prompt.root <userinput>cd /example</userinput> <screen>&prompt.root <userinput>cd /example</userinput>
&prompt.root; <userinput>ls</userinput> &prompt.root; <userinput>ls</userinput>
@ -251,25 +260,27 @@ drwxr-xr-x 2 root wheel 3 Aug 29 23:15 .
drwxr-xr-x 21 root wheel 512 Aug 29 23:12 .. drwxr-xr-x 21 root wheel 512 Aug 29 23:12 ..
-rw-r--r-- 1 root wheel 0 Aug 29 23:15 testfile</screen> -rw-r--r-- 1 root wheel 0 Aug 29 23:15 testfile</screen>
<para>Unfortunately this pool is not taking advantage of <para>Δυστυχώς αυτό το pool δεν χρησιμοποιεί κάποιο από τα
any <acronym>ZFS</acronym> features. Create a file system πλεονεκτήματα του <acronym>ZFS</acronym>. Δημιουργήστε ένα σύστημα
on this pool, and enable compression on it:</para> αρχείων σε αυτό το pool και ενεργοποιήστε σε αυτό τη
συμπίεση:</para>
<screen>&prompt.root; <userinput>zfs create example/compressed</userinput> <screen>&prompt.root; <userinput>zfs create example/compressed</userinput>
&prompt.root; <userinput>zfs set compression=gzip example/compressed</userinput></screen> &prompt.root; <userinput>zfs set compression=gzip example/compressed</userinput></screen>
<para>The <literal>example/compressed</literal> is now a <para>Το σύστημα αρχείων <literal>example/compressed</literal>
<acronym>ZFS</acronym> compressed file system. Try copying είναι πλέον ένα συμπιεσμένο <acronym>ZFS</acronym> σύστημα.
some large files to it by copying them to Δοκιμάστε να αντιγράψετε μερικά μεγάλα αρχεία σε αυτό, απευθείας
στον κατάλογο
<filename class="directory">/example/compressed</filename>.</para> <filename class="directory">/example/compressed</filename>.</para>
<para>The compression may now be disabled with:</para> <para>Μπορείτε τώρα να απενεργοποιήσετε τη συμπίεση γράφοντας:</para>
<screen>&prompt.root; <userinput>zfs set compression=off example/compressed</userinput></screen> <screen>&prompt.root; <userinput>zfs set compression=off example/compressed</userinput></screen>
<para>To unmount the file system, issue the following command <para>Για να αποπροσαρτήσετε το σύστημα αρχείων, εκτελέστε την
and then verify by using the <command>df</command> ακόλουθη εντολή και επαληθεύστε το αποτέλεσμα μέσω του βοηθητικού
utility:</para> προγράμματος <command>df</command>:</para>
<screen>&prompt.root; <userinput>zfs umount example/compressed</userinput> <screen>&prompt.root; <userinput>zfs umount example/compressed</userinput>
&prompt.root; <userinput>df</userinput> &prompt.root; <userinput>df</userinput>
@ -279,8 +290,9 @@ devfs 1 1 0 100% /dev
/dev/ad0s1d 54098308 1032864 48737580 2% /usr /dev/ad0s1d 54098308 1032864 48737580 2% /usr
example 17547008 0 17547008 0% /example</screen> example 17547008 0 17547008 0% /example</screen>
<para>Re-mount the file system to make it accessible <para>Προσαρτήστε ξανά το σύστημα αρχείων, ώστε να είναι και πάλι
again, and verify with <command>df</command>:</para> προσβάσιμο, και επαληθεύστε το χρησιμοποιώντας όπως και πριν, την
εντολή <command>df</command>:</para>
<screen>&prompt.root; <userinput>zfs mount example/compressed</userinput> <screen>&prompt.root; <userinput>zfs mount example/compressed</userinput>
&prompt.root; <userinput>df</userinput> &prompt.root; <userinput>df</userinput>
@ -291,8 +303,8 @@ devfs 1 1 0 100% /dev
example 17547008 0 17547008 0% /example example 17547008 0 17547008 0% /example
example/compressed 17547008 0 17547008 0% /example/compressed</screen> example/compressed 17547008 0 17547008 0% /example/compressed</screen>
<para>The pool and file system may also be observed by viewing <para>Μπορείτε επίσης να δείτε το pool και το σύστημα αρχείων
the output from <command>mount</command>:</para> εξετάζοντας την έξοδο της εντολής <command>mount</command>:</para>
<screen>&prompt.root; <userinput>mount</userinput> <screen>&prompt.root; <userinput>mount</userinput>
/dev/ad0s1a on / (ufs, local) /dev/ad0s1a on / (ufs, local)
@ -302,18 +314,19 @@ example on /example (zfs, local)
example/data on /example/data (zfs, local) example/data on /example/data (zfs, local)
example/compressed on /example/compressed (zfs, local)</screen> example/compressed on /example/compressed (zfs, local)</screen>
<para>As observed, <acronym>ZFS</acronym> file systems, after <para>Όπως παρατηρούμε, το σύστημα αρχείων <acronym>ZFS</acronym>
creation, may be used like ordinary file systems; however, μπορεί να χρησιμοποιηθεί ως κοινό σύστημα αρχείων μετά τη
many other features are also available. In the following δημιουργία του. Ωστόσο, διαθέτει πολλές ακόμα λειτουργίες. Στο
example, a new file system, <literal>data</literal> is παρακάτω παράδειγμα δημιουργούμε ένα νέο σύστημα αρχείων, το
created. Important files will be stored here, so the file <literal>data</literal>. θα αποθηκεύσουμε σημαντικά δεδομένα σε
system is set to keep two copies of each data block:</para> αυτό, και έτσι το ρυθμίζουμε ώστε να κρατάει δύο αντίγραφα από
κάθε μπλοκ δεδομένων:</para>
<screen>&prompt.root; <userinput>zfs create example/data</userinput> <screen>&prompt.root; <userinput>zfs create example/data</userinput>
&prompt.root; <userinput>zfs set copies=2 example/data</userinput></screen> &prompt.root; <userinput>zfs set copies=2 example/data</userinput></screen>
<para>It is now possible to see the data and space utilization <para>Μπορούμε τώρα να δούμε τα δεδομένα και την κατανάλωση χώρου
by issuing the <command>df</command> again:</para> δίνοντας ξανά την εντολή <command>df</command>:</para>
<screen>&prompt.root; <userinput>df</userinput> <screen>&prompt.root; <userinput>df</userinput>
Filesystem 1K-blocks Used Avail Capacity Mounted on Filesystem 1K-blocks Used Avail Capacity Mounted on
@ -324,112 +337,116 @@ example 17547008 0 17547008 0% /example
example/compressed 17547008 0 17547008 0% /example/compressed example/compressed 17547008 0 17547008 0% /example/compressed
example/data 17547008 0 17547008 0% /example/data</screen> example/data 17547008 0 17547008 0% /example/data</screen>
<para>Notice that each file system on the pool has the same <para>Παρατηρήστε ότι κάθε σύστημα αρχείων στο pool δείχνει το ίδιο
amount of available space. This is the reason for using μέγεθος διαθέσιμου χώρου. Αυτός είναι και ο λόγος που
the <command>df</command> through these examples, to show χρησιμοποιούμε την εντολή <command>df</command> σε όλα τα
that the file systems are using only the amount of space παραδείγματα, για να δείξουμε ότι τα συστήματα αρχείων
they need and will all draw from the same pool. χρησιμοποιούν μόνο το χώρο που χρειάζονται και ότι όλα μοιράζονται
The <acronym>ZFS</acronym> file system does away with concepts τον ίδιο χώρο (το κοινόχρηστο απόθεμα &mdash; pool). Στο σύστημα
such as volumes and partitions, and allows for several file αρχείων <acronym>ZFS</acronym> έννοιες όπως οι τόμοι (volumes) και
systems to occupy the same pool. Destroy the file systems, οι κατατμήσεις (partitions) δεν έχουν νόημα. Αντίθετα, πολλά
and then destroy the pool as they are no longer συστήματα αρχείων μοιράζονται τον ίδιο χώρο, το pool. Μπορείτε να
needed:</para> καταργήσετε το σύστημα αρχείων και κατόπιν το ίδιο το pool όταν
δεν τα χρειάζεστε πλέον:</para>
<screen>&prompt.root; <userinput>zfs destroy example/compressed</userinput> <screen>&prompt.root; <userinput>zfs destroy example/compressed</userinput>
&prompt.root; <userinput>zfs destroy example/data</userinput> &prompt.root; <userinput>zfs destroy example/data</userinput>
&prompt.root; <userinput>zpool destroy example</userinput></screen> &prompt.root; <userinput>zpool destroy example</userinput></screen>
<para>Disks go bad and fail, an unavoidable trait. When <para>Οι σκληροί δίσκοι με τον καιρό χαλάνε, είναι αναπόφευκτο.
this disk goes bad, the data will be lost. One method of Όταν ένας δίσκος χαλάσει, τα δεδομένα του χάνονται. Μια μέθοδος
avoiding data loss due to a failed hard disk is to implement για να αποφύγουμε την απώλεια δεδομένων εξαιτίας ενός χαλασμένου
a <acronym>RAID</acronym>. <acronym>ZFS</acronym> supports δίσκου είναι να δημιουργήσουμε μια συστοιχία
this feature in its pool design which is covered in <acronym>RAID</acronym>. Τα pools του <acronym>ZFS</acronym> έχουν
the next section.</para> σχεδιασθεί ώστε να υποστηρίζουν αυτό το χαρακτηριστικό.
Η λειτουργία αυτή αναλύεται στην επόμενη ενότητα.</para>
</sect3> </sect3>
<sect3> <sect3>
<title><acronym>ZFS</acronym> RAID-Z</title> <title><acronym>ZFS</acronym> RAID-Z</title>
<para>As previously noted, this section will assume that <para>Όπως αναφέραμε προηγουμένως, η ενότητα αυτή προϋποθέτει ότι
two <acronym>SCSI</acronym> exists as devices χρησιμοποιούμε δύο συσκευές
<devicename>da0</devicename> and <acronym>SCSI</acronym> με ονόματα συσκευών
<devicename>da1</devicename>. To create a <devicename>da0</devicename> και
<acronym>RAID</acronym>-Z pool, issue the following <devicename>da1</devicename>. Για να δημιουργήσουμε ένα pool τύπου
command:</para> <acronym>RAID</acronym>-Z, εκτελούμε την ακόλουθη εντολή:</para>
<screen>&prompt.root; <userinput>zpool create storage raidz da0 da1</userinput></screen> <screen>&prompt.root; <userinput>zpool create storage raidz da0 da1</userinput></screen>
<para>The <literal>storage</literal> zpool should have been <para>Θα δημιουργηθεί το <literal>storage</literal> zpool. Μπορείτε
created. This may be verified by using the &man.mount.8; and να επαληθεύσετε το αποτέλεσμα χρησιμοποιώντας, όπως και
&man.df.1; commands as before. More disk devices may have προηγουμένως, τις εντολές &man.mount.8; και &man.df.1;. Θα
been allocated by adding them to the end of the list above. μπορούσαμε να χρησιμοποιήσουμε περισσότερους δίσκους, προσθέτοντας
Make a new file system in the pool, called τα ονόματα συσκευών τους στο τέλος της παραπάνω λίστας.
<literal>home</literal> where user files will eventually be Δημιουργήστε ένα νέο σύστημα αρχείων στο pool, το οποίο θα
placed:</para> ονομάζεται <literal>home</literal> και όπου θα αποθηκεύονται τελικά
τα αρχεία των χρηστών:</para>
<screen>&prompt.root; <userinput>zfs create storage/home</userinput></screen> <screen>&prompt.root; <userinput>zfs create storage/home</userinput></screen>
<para>It is now possible to enable compression and keep extra <para>Μπορούμε τώρα να ενεργοποιήσουμε την συμπίεση και να κρατάμε
copies of the user's home directories and files. This may επιπλέον αντίγραφα των καταλόγων και των δεδομένων των χρηστών.
be accomplished just as before using the following Όπως και προηγουμένως, μπορούμε να το επιτύχουμε χρησιμοποιώντας
commands:</para> τις παρακάτω εντολές:</para>
<screen>&prompt.root; <userinput>zfs set copies=2 storage/home</userinput> <screen>&prompt.root; <userinput>zfs set copies=2 storage/home</userinput>
&prompt.root; <userinput>zfs set compression=gzip storage/home</userinput></screen> &prompt.root; <userinput>zfs set compression=gzip storage/home</userinput></screen>
<para>To make this the new home directory for users, copy the <para>Για να γίνει αυτός ο νέος κατάλογος των χρηστών, αντιγράψτε τα
user data to this directory, and create the appropriate δεδομένα τους σε αυτόν και δημιουργήστε τους κατάλληλους
symbolic links:</para> συμβολικούς δεσμούς:</para>
<screen>&prompt.root; <userinput>cp -rp /home/* /storage/home</userinput> <screen>&prompt.root; <userinput>cp -rp /home/* /storage/home</userinput>
&prompt.root; <userinput>rm -rf /home /usr/home</userinput> &prompt.root; <userinput>rm -rf /home /usr/home</userinput>
&prompt.root; <userinput>ln -s /storage/home /home</userinput> &prompt.root; <userinput>ln -s /storage/home /home</userinput>
&prompt.root; <userinput>ln -s /storage/home /usr/home</userinput></screen> &prompt.root; <userinput>ln -s /storage/home /usr/home</userinput></screen>
<para>Users should now have their data stored on the freshly <para>Τα δεδομένα των χρηστών θα αποθηκεύονται τώρα στο νέο σύστημα
created <filename class="directory">/storage/home</filename> αρχείων <filename class="directory">/storage/home</filename>.
file system. Test by adding a new user and logging in as Για να το επαληθεύσετε, δημιουργήστε ένα νέο χρήστη και εισέλθετε
that user.</para> στο σύστημα με το νέο λογαριασμό.</para>
<para>Try creating a snapshot which may be rolled back <para>Δοκιμάστε να δημιουργήσετε ένα στιγμιότυπο (snapshot) στο
later:</para> οποίο θα μπορείτε να επανέλθετε αργότερα:</para>
<screen>&prompt.root; <userinput>zfs snapshot storage/home@08-30-08</userinput></screen> <screen>&prompt.root; <userinput>zfs snapshot storage/home@08-30-08</userinput></screen>
<para>Note that the snapshot option will only capture a real <para>Σημειώστε ότι η επιλογή δημιουργίας στιγμιότυπου λειτουργεί
file system, not a home directory or a file. The μόνο σε πραγματικό σύστημα αρχείων, και όχι σε κάποιο μεμονωμένο
<literal>@</literal> character is a delimiter used between κατάλογο ή αρχείο. Ο χαρακτήρας <literal>@</literal>
the file system name or the volume name. When a user's χρησιμοποιείται ως διαχωριστικό μεταξύ του συστήματος αρχείων και
home directory gets trashed, restore it with:</para> του ονόματος τόμου. Αν καταστραφεί ο κατάλογος δεδομένων κάποιου
χρήστη αποκαταστήστε τον με την εντολή:</para>
<screen>&prompt.root; <userinput>zfs rollback storage/home@08-30-08</userinput></screen> <screen>&prompt.root; <userinput>zfs rollback storage/home@08-30-08</userinput></screen>
<para>To get a list of all available snapshots, run the <para>Για να δείτε μια λίστα των διαθέσιμων στιγμιότυπων, εκτελέστε
<command>ls</command> in the file system's την εντολή <command>ls</command> στον κατάλογο
<filename class="directory">.zfs/snapshot</filename> <filename class="directory">.zfs/snapshot</filename> του συστήματος
directory. For example, to see the previously taken αρχείων. Για παράδειγμα, για να δείτε το στιγμιότυπο που
snapshot, perform the following command:</para> δημιουργήσαμε προηγουμένως, εκτελέστε την παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>ls /storage/home/.zfs/snapshot</userinput></screen> <screen>&prompt.root; <userinput>ls /storage/home/.zfs/snapshot</userinput></screen>
<para>It is possible to write a script to perform monthly <para>Είναι δυνατόν να γράψετε κάποιο script που να δημιουργεί
snapshots on user data; however, over time, snapshots μηνιαία στιγμιότυπα των δεδομένων των χρηστών. Ωστόσο, με την
may consume a great deal of disk space. The previous πάροδο του χρόνου, τα στιγμιότυπα θα καταναλώσουν μεγάλο ποσοστό
snapshot may be removed using the following command:</para> του χώρου στο δίσκο. Μπορείτε να διαγράψετε το προηγούμενο
στιγμιότυπο χρησιμοποιώντας την παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>zfs destroy storage/home@08-30-08</userinput></screen> <screen>&prompt.root; <userinput>zfs destroy storage/home@08-30-08</userinput></screen>
<para>There is no reason, after all of this testing, we should <para>Δεν υπάρχει λόγος, μετά από όλες αυτές τις δοκιμές, να
keep <filename class="directory">/storage/home</filename> κρατήσουμε το <filename class="directory">/storage/home</filename>
around in its present state. Make it the real στην παρούσα κατάσταση του. Μετατρέψτε το στο πραγματικό σύστημα
<filename class="directory">/home</filename> file αρχείων <filename class="directory">/home</filename>:</para>
system:</para>
<screen>&prompt.root; <userinput>zfs set mountpoint=/home storage/home</userinput></screen> <screen>&prompt.root; <userinput>zfs set mountpoint=/home storage/home</userinput></screen>
<para>Issuing the <command>df</command> and <para>Χρησιμοποιώντας τις εντολές <command>df</command> και
<command>mount</command> commands will show that the system <command>mount</command> θα δούμε ότι το σύστημα χειρίζεται πλέον
now treats our file system as the real αυτό το σύστημα αρχείων ως το πραγματικό
<filename class="directory">/home</filename>:</para> <filename class="directory">/home</filename>:</para>
<screen>&prompt.root; <userinput>mount</userinput> <screen>&prompt.root; <userinput>mount</userinput>
@ -446,32 +463,33 @@ devfs 1 1 0 100% /dev
storage 17547008 0 17547008 0% /storage storage 17547008 0 17547008 0% /storage
storage/home 17547008 0 17547008 0% /home</screen> storage/home 17547008 0 17547008 0% /home</screen>
<para>This completes the <acronym>RAID</acronym>-Z <para>Εδώ ολοκληρώνεται η ρύθμιση του <acronym>RAID</acronym>-Z.
configuration. To get status updates about the file systems Για να δέχεστε αναφορές κατάστασης σχετικά με τα συστήματα
created during the nightly &man.periodic.8; runs, issue the αρχείων κατά τη νυκτερινή εκτέλεση του &man.periodic.8;, δώστε την
following command:</para> παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>echo 'daily_status_zfs_enable="YES"' &gt;&gt; /etc/periodic.conf</userinput></screen> <screen>&prompt.root; <userinput>echo 'daily_status_zfs_enable="YES"' &gt;&gt; /etc/periodic.conf</userinput></screen>
</sect3> </sect3>
<sect3> <sect3>
<title>Recovering <acronym>RAID</acronym>-Z</title> <title>Ανάκτηση του <acronym>RAID</acronym>-Z</title>
<para>Every software <acronym>RAID</acronym> has a method of <para>Κάθε λογισμικό <acronym>RAID</acronym> έχει μια μέθοδο για
monitoring their <literal>state</literal>. επίβλεψη της κατάστασής του, και το <acronym>ZFS</acronym> δεν
<acronym>ZFS</acronym> is no exception. The status of αποτελεί εξαίρεση. Μπορείτε να δείτε την κατάσταση των συσκευών
<acronym>RAID</acronym>-Z devices may be viewed with the του <acronym>RAID</acronym>-Z χρησιμοποιώντας την ακόλουθη
following command:</para> εντολή:</para>
<screen>&prompt.root; <userinput>zpool status -x</userinput></screen> <screen>&prompt.root; <userinput>zpool status -x</userinput></screen>
<para>If all pools are healthy and everything is normal, the <para>Αν όλα τα pools είναι σε υγιή κατάσταση, θα πάρετε το ακόλουθο
following message will be returned:</para> μήνυμα:</para>
<screen>all pools are healthy</screen> <screen>all pools are healthy</screen>
<para>If there is an issue, perhaps a disk has gone offline, <para>Αν υπάρχει κάποιο πρόβλημα, π.χ. κάποιος δίσκος έχει βγει
the pool state will be returned and look similar to:</para> εκτός λειτουργίας, θα δείτε την περιγραφή της κατάστασης σε
ένα μήνυμα όπως το παρακάτω:</para>
<screen> pool: storage <screen> pool: storage
state: DEGRADED state: DEGRADED
@ -491,23 +509,23 @@ config:
errors: No known data errors</screen> errors: No known data errors</screen>
<para>This states that the device was taken offline by the <para>Το παραπάνω δείχνει ότι η συσκευή τέθηκε εκτός λειτουργίας
administrator. This is true for this particular example. από τον διαχειριστή. Αυτό είναι αλήθεια για το συγκεκριμένο
To take the disk offline, the following command was παράδειγμα. Για να τεθεί ο δίσκος εκτός, χρησιμοποιήθηκε η
used:</para> παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>zpool offline storage da1</userinput></screen> <screen>&prompt.root; <userinput>zpool offline storage da1</userinput></screen>
<para>It is now possible to replace the <para>Μπορούμε τώρα να αντικαταστήσουμε το δίσκο
<devicename>da1</devicename> after the system has been <devicename>da1</devicename> μετά την απενεργοποίηση του
powered down. When the system is back online, the following συστήματος. Όταν το σύστημα επανέλθει σε λειτουργία, μπορούμε να
command may issued to replace the disk:</para> χρησιμοποιήσουμε την ακόλουθη εντολή για να ενημερώσουμε το
σύστημα για την αντικατάσταση του δίσκου:</para>
<screen>&prompt.root; <userinput>zpool replace storage da1</userinput></screen> <screen>&prompt.root; <userinput>zpool replace storage da1</userinput></screen>
<para>From here, the status may be checked again, this time <para>Από εδώ, μπορούμε να ελέγξουμε ξανά την κατάσταση, αυτή τη
without the <option>-x</option> flag to get state φορά χωρίς την επιλογή <option>-x</option>:</para>
information:</para>
<screen>&prompt.root; <userinput>zpool status storage</userinput> <screen>&prompt.root; <userinput>zpool status storage</userinput>
pool: storage pool: storage
@ -523,38 +541,42 @@ config:
errors: No known data errors</screen> errors: No known data errors</screen>
<para>As shown from this example, everything appears to be <para>Όπως φαίνεται στο παράδειγμα, τα πάντα φαίνεται να λειτουργούν
normal.</para> φυσιολογικά.</para>
</sect3> </sect3>
<sect3> <sect3>
<title>Data Verification</title> <title>Επαλήθευση Δεδομένων</title>
<para>As previously mentioned, <acronym>ZFS</acronym> uses <para>Όπως αναφέραμε προηγουμένως, το <acronym>ZFS</acronym>
<literal>checksums</literal> to verify the integrity of χρησιμοποιεί <literal>checksums</literal> (αθροίσματα ελέγχου) για
stored data. They are enabled automatically upon creation να επαληθεύσει την ακεραιότητα των αποθηκευμένων δεδομένων.
of file systems and may be disabled using the following Τα αθροίσματα ελέγχου ενεργοποιούνται αυτόματα κατά την δημιουργία
command:</para> των συστημάτων αρχείων, και μπορούν να απενεργοποιηθούν μέσω της
επόμενης εντολής:</para>
<screen>&prompt.root; <userinput>zfs set checksum=off storage/home</userinput></screen> <screen>&prompt.root; <userinput>zfs set checksum=off storage/home</userinput></screen>
<para>This is not a wise idea; however, as checksums take <para>Αυτό δεν είναι γενικά καλή ιδέα, καθώς τα checksums
very little storage space and are more useful enabled. There καταλαμβάνουν ελάχιστο αποθηκευτικό χώρο, και είναι πολύ πιο
also appear to be no noticeable costs having them enabled. χρήσιμο να τα έχουμε ενεργοποιημένα. Επίσης δεν φαίνεται να
While enabled, it is possible to have <acronym>ZFS</acronym> προκαλούν κάποια σημαντική καθυστέρηση ή επιβάρυνση. Με τα
check data integrity using checksum verification. This checksums ενεργοποιημένα, μπορούμε να ζητήσουμε από το
process is known as <quote>scrubing.</quote> To verify the <acronym>ZFS</acronym> να ελέγξει την ακεραιότητα των δεδομένων
data integrity of the <literal>storage</literal> pool, issue χρησιμοποιώντας τα για επαλήθευση. Η διαδικασία αυτή είναι
the following command:</para> γνωστή ως <quote>scrubing.</quote> Για να ελέγξετε την
ακεραιότητα δεδομένων του pool <literal>storage</literal>,
χρησιμοποιήστε την παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>zpool scrub storage</userinput></screen> <screen>&prompt.root; <userinput>zpool scrub storage</userinput></screen>
<para>This process may take considerable time depending on <para>Η διαδικασία αυτή μπορεί να πάρει αρκετή ώρα, ανάλογα με την
the amount of data stored. It is also very ποσότητα των αποθηκευμένων δεδομένων. Επίσης χρησιμοποιεί πάρα
<acronym>I/O</acronym> intensive, so much that only one πολύ το δίσκο (<acronym>I/O</acronym>), τόσο ώστε σε κάθε
of these operations may be run at any given time. After δεδομένη στιγμή μπορεί να εκτελείται μόνο μια τέτοια διαδικασία.
the scrub has completed, the status is updated and may be Μετά την ολοκλήρωση του scrub, θα ανανεωθεί και η αναφορά
viewed by issuing a status request:</para> κατάστασης, την οποία μπορείτε να δείτε ζητώντας την με την
παρακάτω εντολή:</para>
<screen>&prompt.root; <userinput>zpool status storage</userinput> <screen>&prompt.root; <userinput>zpool status storage</userinput>
pool: storage pool: storage
@ -570,13 +592,12 @@ config:
errors: No known data errors</screen> errors: No known data errors</screen>
<para>The completion time is in plain view in this example. <para>Στο παράδειγμα μας εμφανίζεται και η χρονική στιγμή που
This feature helps to ensure data integrity over a long ολοκληρώθηκε η εντολή scrub. Η δυνατότητα αυτή μας εξασφαλίζει
period of time.</para> ακεραιότητα δεδομένων σε μεγάλο βάθος χρόνου.</para>
<para>There are many more options for the Z&nbsp;file system, <para>Υπάρχουν πολλές ακόμα επιλογές για το σύστημα αρχείων Ζ. Δείτε
see the &man.zfs.8; and &man.zpool.8; manual τις σελίδες manual &man.zfs.8; και &man.zpool.8;.</para>
pages.</para>
</sect3> </sect3>
</sect2> </sect2>
</sect1> </sect1>
@ -628,3 +649,14 @@ http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html
--> -->
</chapter> </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:
-->