From be00b9d3728ff759aa463292f5673e96fadbeb47 Mon Sep 17 00:00:00 2001 From: Manolis Kiagias Date: Thu, 9 Oct 2008 16:00:06 +0000 Subject: [PATCH] Integrate new chapters of the Handbook into the Greek build. This is still work in progress (as not everything is translated yet) but it makes life easier for us if the 'official' and our test builds are in sync. New files: el_GR.ISO8859-7/books/handbook/dtrace Makefile & chapter.sgml (Synopsis translated) el_GR.ISO8859-7/books/handbook/updating Makefile & chapter.sgml (Completely translated) el_GR.ISO8859-7/books/handbook/filesystems Makefile & chapter.sgml (Synopsis translated) Modified files: MFen: 1.109 -> 1.110 en_US.ISO8859-1/books/handbook/Makefile MFen: 1.172 -> 1.173 en_US.ISO8859-1/books/handbook/book.sgml MFen: 1.37 -> 1.38 en_US.ISO8859-1/books/handbook/chapters.ent Obtained from: FreeBSD Greek Documentation Project --- el_GR.ISO8859-7/books/handbook/Makefile | 5 +- el_GR.ISO8859-7/books/handbook/book.sgml | 5 +- el_GR.ISO8859-7/books/handbook/chapters.ent | 5 +- .../books/handbook/dtrace/Makefile | 18 + .../books/handbook/dtrace/chapter.sgml | 397 +++++++++++ .../books/handbook/filesystems/Makefile | 18 + .../books/handbook/filesystems/chapter.sgml | 630 ++++++++++++++++++ .../books/handbook/updating/Makefile | 18 + .../books/handbook/updating/chapter.sgml | 581 ++++++++++++++++ 9 files changed, 1674 insertions(+), 3 deletions(-) create mode 100644 el_GR.ISO8859-7/books/handbook/dtrace/Makefile create mode 100644 el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml create mode 100644 el_GR.ISO8859-7/books/handbook/filesystems/Makefile create mode 100644 el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml create mode 100644 el_GR.ISO8859-7/books/handbook/updating/Makefile create mode 100644 el_GR.ISO8859-7/books/handbook/updating/chapter.sgml diff --git a/el_GR.ISO8859-7/books/handbook/Makefile b/el_GR.ISO8859-7/books/handbook/Makefile index ce6888706c..3a513ce89d 100644 --- a/el_GR.ISO8859-7/books/handbook/Makefile +++ b/el_GR.ISO8859-7/books/handbook/Makefile @@ -4,7 +4,7 @@ # Μορφοποίηση του Εγχειριδίου του FreeBSD # # %SOURCE% en_US.ISO8859-1/books/handbook/Makefile -# %SRCID% 1.109 +# %SRCID% 1.110 # # ------------------------------------------------------------------------ @@ -202,6 +202,7 @@ IMAGES_LIB+= callouts/15.png SRCS+= audit/chapter.sgml SRCS+= book.sgml SRCS+= colophon.sgml +SRCS+= dtrace/chapter.sgml SRCS+= freebsd-glossary.sgml SRCS+= advanced-networking/chapter.sgml SRCS+= basics/chapter.sgml @@ -213,6 +214,7 @@ SRCS+= desktop/chapter.sgml SRCS+= disks/chapter.sgml SRCS+= eresources/chapter.sgml SRCS+= firewalls/chapter.sgml +SRCS+= filesystems/chapter.sgml SRCS+= geom/chapter.sgml SRCS+= install/chapter.sgml SRCS+= introduction/chapter.sgml @@ -232,6 +234,7 @@ SRCS+= preface/preface.sgml SRCS+= printing/chapter.sgml SRCS+= security/chapter.sgml SRCS+= serialcomms/chapter.sgml +SRCS+= updating/chapter.sgml SRCS+= users/chapter.sgml SRCS+= vinum/chapter.sgml SRCS+= virtualization/chapter.sgml diff --git a/el_GR.ISO8859-7/books/handbook/book.sgml b/el_GR.ISO8859-7/books/handbook/book.sgml index 3695800bf7..4b7a003e03 100644 --- a/el_GR.ISO8859-7/books/handbook/book.sgml +++ b/el_GR.ISO8859-7/books/handbook/book.sgml @@ -7,7 +7,7 @@ $FreeBSD$ %SOURCE% en_US.ISO8859-1/books/handbook/book.sgml - %SRCID% 1.172 + %SRCID% 1.173 --> @@ -291,10 +291,12 @@ + + @@ -339,6 +341,7 @@ το &os;. + diff --git a/el_GR.ISO8859-7/books/handbook/chapters.ent b/el_GR.ISO8859-7/books/handbook/chapters.ent index b4f41edc99..2550145b4b 100644 --- a/el_GR.ISO8859-7/books/handbook/chapters.ent +++ b/el_GR.ISO8859-7/books/handbook/chapters.ent @@ -12,7 +12,7 @@ $FreeBSD$ %SOURCE% en_US.ISO8859-1/books/handbook/chapters.ent - %SRCID% 1.37 + %SRCID% 1.38 --> @@ -42,12 +42,15 @@ + + + diff --git a/el_GR.ISO8859-7/books/handbook/dtrace/Makefile b/el_GR.ISO8859-7/books/handbook/dtrace/Makefile new file mode 100644 index 0000000000..be94ef2c90 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/dtrace/Makefile @@ -0,0 +1,18 @@ +# +# Build the Handbook with just the content from this chapter. +# +# $FreeBSD$ +# +# %SOURCE% en_US.ISO8859-1/books/handbook/dtrace/Makefile +# %SRCID% 1.1 +# + +CHAPTERS= dtrace/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml b/el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml new file mode 100644 index 0000000000..a522c91010 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml @@ -0,0 +1,397 @@ + + + + + + + Tom + Rhodes + Γράφηκε από τον + + + + + DTrace + + + Σύνοψη + + DTrace + + DTrace support + DTrace + + + Το DTrace, γνωστό επίσης ως Dynamic Tracing, είναι ένα εργαλείο το + οποίο αναπτύχθηκε από την &sun; για τον εντοπισμό προβλημάτων απόδοσης + σε συστήματα που πρόκειται να χρησιμοποιηθούν ή χρησιμοποιούνται ήδη + στην παραγωγή. Δεν πρόκειται για εργαλείο αποσφαλμάτωσης, αλλά για + εργαλείο ανάλυσης πραγματικού χρόνου, με το οποίο μπορούν να + εντοπιστούν προβλήματα απόδοσης και άλλες καταστάσεις. + + Το DTrace είναι ένα θαυμάσιο εργαλείο profiling και διαθέτει + εντυπωσιακό πλήθος χαρακτηριστικών για την διάγνωση προβλημάτων του + συστήματος. Μπορεί επίσης να χρησιμοποιηθεί για να εκτελέσει από πριν + έτοιμα scripts, με τα οποία μπορείτε να εκμεταλλευθείτε καλύτερα τις + δυνατότητες του. Οι χρήστες μπορούν ακόμα να γράψουν και τα δικά τους + βοηθητικά προγράμματα, χρησιμοποιώντας την Γλώσσα D που παρέχει το + DTrace, και να προσαρμόσουν με αυτό τον τρόπο το profiling στις δικές + τους ανάγκες. + + Αφού διαβάσετε αυτό το κεφάλαιο, θα γνωρίζετε: + + + + Τι είναι το DTrace και τι δυνατότητες παρέχει. + + + + Τις διαφορές υλοποίησης μεταξύ του DTrace του &solaris; και + του &os;. + + + + Πως να ενεργοποιήσετε και να χρησιμοποιήσετε το DTrace + στο &os;. + + + + Πριν διαβάσετε αυτό το κεφάλαιο, θα πρέπει: + + + + Να κατανοείτε βασικές έννοιες του &unix; και του &os; + (). + + + + Να είστε εξοικειωμένος με τις βασικές διαδικασίες ρύθμισης και + μεταγλώττισης προσαρμοσμένου πυρήνα + (). + + + + Να είστε εξοικειωμένος με την ασφάλεια και τον τρόπο που αυτή + σχετίζεται με το &os; (). + + + + Να κατανοείτε πως μπορείτε να ανακτήσετε τον πηγαίο κώδικα του + &os; και να τον χρησιμοποιήσετε ώστε να επαναμεταγλωττίσετε το + σύστημα σας (). + + + + + + Τη δεδομένη στιγμή, το DTrace θεωρείται ότι είναι σε πειραματικό + στάδιο. Ορισμένες επιλογές μπορεί να υπολείπονται σε λειτουργικότητα, + και κάποια τμήματα ίσως να μη λειτουργούν καθόλου. Με την πάροδο του + χρόνου, οι παραπάνω δυνατότητες θα θεωρηθούν έτοιμες για χρήση σε + μηχανήματα παραγωγής, και η παρούσα τεκμηρίωση θα ανανεωθεί ώστε να + αντιπροσωπεύει αυτή την κατάσταση. + + + + + Implementation Differences + + While the DTrace in &os; is very similar to that found + 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 + kernel options and modules which must be enabled for DTrace to + work properly. These will be explained later. + + There is a DDB_CTF kernel option which + is used to enable support for loading the CTF + data from kernel modules and the kernel itself. + CTF is the &solaris; Compressed C Type format + which encapsulates a reduced form of debugging information + similar to DWARF and the venerable stabs. + This CTF data is added to the binaries by the + ctfconvert and ctfmerge + build tools. The ctfconvert utility parses + DWARF debug ELF sections + created by the compiler and ctfmerge merges + CTF ELF sections from + objects into either executables or shared libraries. More on + how to enable this for the kernel and &os; build is + forthcoming. + + Some different providers exist for &os; than for &solaris;. + Most notable is the dtmalloc provider, which + allows tracing malloc() by type in the + &os; kernel. + + Only root may use DTrace on &os;. + This is related to security differences, &solaris; has a few + low level security checks which do not yet exist in &os;. As + such, the /dev/dtrace/dtrace is strictly + limited to root users only. + + Finally, the DTrace software falls under &sun;'s + CDDL license. The Common Development + and Distribution License comes with &os;, see the + /usr/src/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE + or view it online at + + http://www.opensolaris.org/os/licensing. + + This license means that a &os; kernel with the DTrace options + is still BSD licensed; however the + CDDL kicks in when the modules are distributed + in binary form, or the binaries are loaded. + + + + Enabling DTrace Support + + To enable support for DTrace, add the following lines to + the kernel configuration file: + + options KDTRACE_HOOKS +options DDB_CTF + + + Users of the AMD64 architecture will want to add the + following line to their kernel configuration file: + + options KDTRACE_FRAME + + This option provides support for the FBT + feature. DTrace will work without this option; however, there + will be limited support for function boundary tracing. + + + All sources must be rebuilt and installed with CTF options. + To accomplish this task, rebuild the &os; sources using: + + &prompt.root; cd /usr/src + &prompt.root; make WITH_CTF=1 buildworld + &prompt.root; make WITH_CFT=1 kernel + &prompt.root; make WITH_CFT=1 installworld + &prompt.root; mergemaster -Ui + + The system will need to be restarted. + + After rebooting and allowing the new kernel to be loaded + into memory, support for the Korn shell should be added. This + is needed as the DTrace toolkit has several utilities written + in ksh. Install the + shells/ksh93. It is also + possible to run these tools under + shells/pdksh or + shells/mksh. + + Finally, obtain the current DTrace toolkit. The current + version is available at + + http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/. + There is an install mechanism included; however, installation + is not required to make use of the bundled utilities. + + + + Using DTrace + + Before making use of DTrace functionality, the DTrace device + must exist. To load the device, issue the following + command: + + &prompt.root; kldload dtraceall + + DTrace support should now be available. To view all probes + the administrator may now execute the following command: + + &prompt.root; dtrace -l | more + + All output is passed to the more + utility as it will quickly overflow the screen buffer. At + this point, DTrace should be considered working. It is now + time to review the toolkit. + + The toolkit is a collection of ready-made scripts to run + with DTrace to collect system information. There are scripts + to check open files, memory, CPU usage and + a lot more. Extract the scripts with the following + command: + + &prompt.root; gunzip -c DTraceToolkit* | tar xvf - + + Change into that directory with the cd + and change the execution permissions on all files, designated + as those files with lower case names, to + 755. + + All of these scripts will need modifications to their + contents. The ones which refer to + /usr/bin/ksh need that changed to + /usr/local/bin/ksh, the others which + use /usr/bin/sh need to be altered to use + /bin/sh, and finally the ones which + use /usr/bin/perl will need altered to + use /usr/local/bin/perl. + + + At this point it is prudent to remind the reader that + DTrace support in &os; is incomplete + and experimental. Many of these scripts + will not work as they are either too &solaris;-specific or + use probes which are unsupported at this time. + + + At the time of this writing only two of the scripts of the + DTrace Toolkit are fully supported in &os;: + the hotkernel + and procsystime scripts. These are the two + we will explore in the following parts of this section. + + The hotkernel is designed to identify + which function is using the most kernel time. Run normally, it + will produce output similar to the following: + + &prompt.root; ./hotkernel +localhost# ./hotkernel +Sampling... Hit Ctrl-C to end. + + The system administrator must use the + CtrlC + key combination to stop the process. Upon + termination, the script will display a list of kernel functions and + timing information, sorting the output in increasing order of + time: + + kernel`_thread_lock_flags 2 0.0% +0xc1097063 2 0.0% +kernel`sched_userret 2 0.0% +kernel`kern_select 2 0.0% +kernel`generic_copyin 3 0.0% +kernel`_mtx_assert 3 0.0% +kernel`vm_fault 3 0.0% +kernel`sopoll_generic 3 0.0% +kernel`fixup_filename 4 0.0% +kernel`_isitmyx 4 0.0% +kernel`find_instance 4 0.0% +kernel`_mtx_unlock_flags 5 0.0% +kernel`syscall 5 0.0% +kernel`DELAY 5 0.0% +0xc108a253 6 0.0% +kernel`witness_lock 7 0.0% +kernel`read_aux_data_no_wait 7 0.0% +kernel`Xint0x80_syscall 7 0.0% +kernel`witness_checkorder 7 0.0% +kernel`sse2_pagezero 8 0.0% +kernel`strncmp 9 0.0% +kernel`spinlock_exit 10 0.0% +kernel`_mtx_lock_flags 11 0.0% +kernel`witness_unlock 15 0.0% +kernel`sched_idletd 137 0.3% +0xc10981a5 42139 99.3% + + + + This script will also work with kernel modules. To use this + feature, run the script with the flag: + + &prompt.root; ./hotkernel -m + + localhost# ./hotkernel -m +Sampling... Hit Ctrl-C to end. +^C +MODULE COUNT PCNT +0xc107882e 1 0.0% +0xc10e6aa4 1 0.0% +0xc1076983 1 0.0% +0xc109708a 1 0.0% +0xc1075a5d 1 0.0% +0xc1077325 1 0.0% +0xc108a245 1 0.0% +0xc107730d 1 0.0% +0xc1097063 2 0.0% +0xc108a253 73 0.0% +kernel 874 0.4% +0xc10981a5 213781 99.6% + + + + The procsystime script captures and + prints the system call time usage for a given + PID or process name. In the following + example, a new instance of /bin/csh + was spawned. The procsystime was executed + and remained waiting while a few commands were typed on the + other incarnation of csh. These are the + results of this test: + + &prompt.root; ./procsystime -n csh +Tracing... Hit Ctrl-C to end... +^C + +Elapsed Times for processes csh, + + SYSCALL TIME (ns) + getpid 6131 + sigreturn 8121 + close 19127 + fcntl 19959 + dup 26955 + setpgid 28070 + stat 31899 + setitimer 40938 + wait4 62717 + sigaction 67372 + sigprocmask 119091 + gettimeofday 183710 + write 263242 + execve 492547 + ioctl 770073 + vfork 3258923 + sigsuspend 6985124 + read 3988049784 + + As shown, the read system call seems to use the + most time in nanoseconds with the getpid() + system call used the least amount of time. + + + + The D Language + + The DTrace Toolkit includes many scripts in the special language of + DTrace. This language is called the D language by &sun; + documentation, and it is very similar to C++. An in depth + discussion of the language is beyond the scope of this document. It is + extensively discussed + at . + + + + diff --git a/el_GR.ISO8859-7/books/handbook/filesystems/Makefile b/el_GR.ISO8859-7/books/handbook/filesystems/Makefile new file mode 100644 index 0000000000..cb61bfe236 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/filesystems/Makefile @@ -0,0 +1,18 @@ +# +# Build the Handbook with just the content from this chapter. +# +# $FreeBSD$ +# +# %SOURCE% en_US.ISO8859-1/books/handbook/filesystems/Makefile +# %SRCID% 1.1 +# + +CHAPTERS= filesystems/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml b/el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml new file mode 100644 index 0000000000..18d6e92a6d --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml @@ -0,0 +1,630 @@ + + + + + + + Tom + Rhodes + Γράφηκε από τον + + + + + Υποστήριξη Συστημάτων Αρχείων + + + Σύνοψη + + File Systems + + File Systems Support + File Systems + + + Τα συστήματα αρχείων αποτελούν αναπόσπαστο τμήμα κάθε λειτουργικού + συστήματος. Επιτρέπουν στους χρήστες να δημιουργούν και να αποθηκεύουν + αρχεία, παρέχουν πρόσβαση σε δεδομένα, και φυσικά αξιοποιούν τους + σκληρούς δίσκους. Διαφορετικά λειτουργικά συστήματα χρησιμοποιούν + συνήθως διαφορετικά εγγενή συστήματα αρχείων. Το σύστημα αρχείων του + &os; είναι το Fast File System ή FFS, το + οποίο προήλθε από το αρχικό σύστημα αρχείων του Unix™, γνωστό + επίσης και ως UFS. Αυτό είναι και το εγγενές + σύστημα αρχείων του &os;, το οποίο χρησιμοποιείται στους σκληρούς + δίσκους και προσφέρει πρόσβαση στα δεδομένα. + + Το &os; προσφέρει επίσης πληθώρα διαφορετικών συστημάτων αρχείων, + ώστε να παρέχει τοπική πρόσβαση σε δεδομένα που έχουν δημιουργηθεί από + άλλα λειτουργικά συστήματα, π.χ. δεδομένα που βρίσκονται σε τοπικά + USB αποθηκευτικά μέσα, οδηγούς flash, και σκληρούς + δίσκους. Υπάρχει επίσης υποστήριξη για άλλα, μη-εγγενή συστήματα + αρχείων, όπως το το Extended File System (EXT) του + &linux; καθώς και το σύστημα Z File System (ZFS) της + &sun;. + + Το &os; παρέχει διαφορετικό επίπεδο υποστήριξης για κάθε σύστημα + αρχείων. Για ορισμένα θα χρειαστεί να φορτωθεί κάποιο άρθρωμα στον + πυρήνα, ενώ για άλλα θα πρέπει να εγκατασταθούν κάποια εργαλεία. + Το κεφάλαιο αυτό έχει σχεδιαστεί να βοηθήσει τους χρήστες του &os; να + αποκτήσουν πρόσβαση σε άλλα συστήματα αρχείων στο σύστημα τους, + ξεκινώντας από το Ζ File System της &sun;. + + Αφού διαβάσετε αυτό το κεφάλαιο, θα γνωρίζετε: + + + + Τη διαφορά μεταξύ των εγγενών και των υποστηριζόμενων + συστημάτων αρχείων. + + + + Ποια συστήματα αρχείων υποστηρίζονται από το &os;. + + + + Πως να ενεργοποιήσετε, να ρυθμίσετε, να αποκτήσετε πρόσβαση και + να χρησιμοποιήσετε μη-εγγενή συστήματα αρχείων. + + + + Πριν διαβάσετε αυτό το κεφάλαιο, θα πρέπει: + + + + Να κατανοείτε βασικές έννοιες του &unix; και του &os; + (). + + + + Να είστε εξοικειωμένος με τις βασικές διαδικασίες ρύθμισης και + εγκατάστασης προσαρμοσμένου πυρήνα + (). + + + + Να αισθάνεστε άνετα με την εγκατάσταση εφαρμογών τρίτου + κατασκευαστή στο &os; (). + + + + Να είστε εξοικειωμένος με τους δίσκους, τα μέσα + αποθήκευσης, και τα αντίστοιχα ονόματα συσκευών στο + &os; (). + + + + + + Τη δεδομένη στιγμή, το ZFS θεωρείται + δοκιμαστική δυνατότητα. Μερικές επιλογές μπορεί να υπολείπονται + λειτουργικότητας, και άλλες μπορεί να μη λειτουργούν καθόλου. Με + την πάροδο του χρόνου, η δυνατότητα αυτή θα θεωρηθεί έτοιμη για χρήση + σε περιβάλλοντα παραγωγής, και η παρούσα τεκμηρίωση θα ανανεωθεί ώστε + να αντιπροσωπεύει αυτή την κατάσταση. + + + + + The Z File System + + The Z file system, developed by &sun;, is a new + technology designed to use a pooled storage method. This means + that space is only used as it is needed for data storage. It + has also been designed for maximum data integrity, supporting + data snapshots, multiple copies, and data checksums. A new + data replication model, known as RAID-Z has + been added. The RAID-Z model is similar + to RAID5 but is designed to prevent data + write corruption. + + + ZFS Tuning + + The ZFS subsystem utilizes much of + 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, + at this time, the following steps are recommended. + + + Memory + + The total system memory should be at least one gigabyte, + with two gigabytes or more recommended. In all of the + examples here, the system has one gigabyte of memory with + several other tuning mechanisms in place. + + Some people have had luck using fewer than one gigabyte + of memory, but with such a limited amount of physical memory, + when the system is under heavy load, it is very plausible + that &os; will panic due to memory exhaustion. + + + + Kernel Configuration + + It is recommended that unused drivers and options + be removed from the kernel configuration file. Since most + devices are available as modules, they may simply be loaded + using the /boot/loader.conf file. + + Users of the i386 architecture should add the following + option to their kernel configuration file, rebuild their + kernel, and reboot: + + options KVA_PAGES=512 + + This option will expand the kernel address space, thus + allowing the vm.kvm_size tunable to be + pushed beyond the currently imposed limit of 1 GB + (2 GB for PAE). To find the most + suitable value for this option, divide the desired address + space in megabytes by four (4). In this case, it is + 512 for 2 GB. + + + + Loader Tunables + + The kmem address space should be + increased on all &os; architectures. On the test system with + one gigabyte of physical memory, success was achieved with the + following options which should be placed in + the /boot/loader.conf file and the system + restarted: + + vm.kmem_slze="330M" +vm.kmem_size_max="330M" +vfs.zfs.arc_max="40M" +vfs.zfs.vdev.cache.size="5M" + + For a more detailed list of recommendations for ZFS-related + tuning, see + . + + + + + Using <acronym>ZFS</acronym> + + There is a start up mechanism that allows &os; to + mount ZFS pools during system + initialization. To set it, issue the following + commands: + + &prompt.root; echo 'zfs_enable="YES"' >> /etc/rc.conf +&prompt.root; /etc/rc.d/zfs start + + The remainder of this document assumes two + SCSI disks are available, and their device names + are da0 + and da1 + respectively. Users of IDE hardware may + use the ad + devices in place of SCSI hardware. + + + Single Disk Pool + + To create a ZFS over a single disk + device, use the zpool command: + + &prompt.root; zpool create example /dev/da0 + + To view the new pool, review the output of the + df: + + &prompt.root; df +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235230 1628718 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032846 48737598 2% /usr +example 17547136 0 17547136 0% /example + + This output clearly shows the example + pool has not only been created but + mounted as well. It is also accessible + just like a normal file system, files may be created on it + and users are able to browse it as in the + following example: + + &prompt.root cd /example +&prompt.root; ls +&prompt.root; touch testfile +&prompt.root; ls -al +total 4 +drwxr-xr-x 2 root wheel 3 Aug 29 23:15 . +drwxr-xr-x 21 root wheel 512 Aug 29 23:12 .. +-rw-r--r-- 1 root wheel 0 Aug 29 23:15 testfile + + Unfortunately this pool is not taking advantage of + any ZFS features. Create a file system + on this pool, and enable compression on it: + + &prompt.root; zfs create example/compressed +&prompt.root; zfs set compression=gzip example/compressed + + The example/compressed is now a + ZFS compressed file system. Try copying + some large files to it by copying them to + /example/compressed. + + The compression may now be disabled with: + + &prompt.root; zfs set compression=off example/compressed + + To unmount the file system, issue the following command + and then verify by using the df + utility: + + &prompt.root; zfs umount example/compressed +&prompt.root; df +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235232 1628716 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032864 48737580 2% /usr +example 17547008 0 17547008 0% /example + + Re-mount the file system to make it accessible + again, and verify with df: + + &prompt.root; zfs mount example/compressed +&prompt.root; df +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235234 1628714 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032864 48737580 2% /usr +example 17547008 0 17547008 0% /example +example/compressed 17547008 0 17547008 0% /example/compressed + + The pool and file system may also be observed by viewing + the output from mount: + + &prompt.root; mount +/dev/ad0s1a on / (ufs, local) +devfs on /dev (devfs, local) +/dev/ad0s1d on /usr (ufs, local, soft-updates) +example on /example (zfs, local) +example/data on /example/data (zfs, local) +example/compressed on /example/compressed (zfs, local) + + As observed, ZFS file systems, after + creation, may be used like ordinary file systems; however, + many other features are also available. In the following + example, a new file system, data is + created. Important files will be stored here, so the file + system is set to keep two copies of each data block: + + &prompt.root; zfs create example/data +&prompt.root; zfs set copies=2 example/data + + It is now possible to see the data and space utilization + by issuing the df again: + + &prompt.root; df +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235234 1628714 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032864 48737580 2% /usr +example 17547008 0 17547008 0% /example +example/compressed 17547008 0 17547008 0% /example/compressed +example/data 17547008 0 17547008 0% /example/data + + Notice that each file system on the pool has the same + amount of available space. This is the reason for using + the df through these examples, to show + that the file systems are using only the amount of space + they need and will all draw from the same pool. + The ZFS file system does away with concepts + such as volumes and partitions, and allows for several file + systems to occupy the same pool. Destroy the file systems, + and then destroy the pool as they are no longer + needed: + + &prompt.root; zfs destroy example/compressed +&prompt.root; zfs destroy example/data +&prompt.root; zpool destroy example + + Disks go bad and fail, an unavoidable trait. When + 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 RAID. ZFS supports + this feature in its pool design which is covered in + the next section. + + + + <acronym>ZFS</acronym> RAID-Z + + As previously noted, this section will assume that + two SCSI exists as devices + da0 and + da1. To create a + RAID-Z pool, issue the following + command: + + &prompt.root; zpool create storage raidz da0 da1 + + The storage zpool should have been + created. This may be verified by using the &man.mount.8; and + &man.df.1; commands as before. More disk devices may have + been allocated by adding them to the end of the list above. + Make a new file system in the pool, called + home where user files will eventually be + placed: + + &prompt.root; zfs create storage/home + + It is now possible to enable compression and keep extra + copies of the user's home directories and files. This may + be accomplished just as before using the following + commands: + + &prompt.root; zfs set copies=2 storage/home +&prompt.root; zfs set compression=gzip storage/home + + To make this the new home directory for users, copy the + user data to this directory, and create the appropriate + symbolic links: + + &prompt.root; cp -rp /home/* /storage/home +&prompt.root; rm -rf /home /usr/home +&prompt.root; ln -s /storage/home /home +&prompt.root; ln -s /storage/home /usr/home + + Users should now have their data stored on the freshly + created /storage/home + file system. Test by adding a new user and logging in as + that user. + + Try creating a snapshot which may be rolled back + later: + + &prompt.root; zfs snapshot storage/home@08-30-08 + + Note that the snapshot option will only capture a real + file system, not a home directory or a file. The + @ character is a delimiter used between + the file system name or the volume name. When a user's + home directory gets trashed, restore it with: + + &prompt.root; zfs rollback storage/home@08-30-08 + + To get a list of all available snapshots, run the + ls in the file system's + .zfs/snapshot + directory. For example, to see the previously taken + snapshot, perform the following command: + + &prompt.root; ls /storage/home/.zfs/snapshot + + It is possible to write a script to perform monthly + 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: + + &prompt.root; zfs destroy storage/home@08-30-08 + + There is no reason, after all of this testing, we should + keep /storage/home + around in its present state. Make it the real + /home file + system: + + &prompt.root; zfs set mountpoint=/home storage/home + + Issuing the df and + mount commands will show that the system + now treats our file system as the real + /home: + + &prompt.root; mount +/dev/ad0s1a on / (ufs, local) +devfs on /dev (devfs, local) +/dev/ad0s1d on /usr (ufs, local, soft-updates) +storage on /storage (zfs, local) +storage/home on /home (zfs, local) +&prompt.root; df +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235240 1628708 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032826 48737618 2% /usr +storage 17547008 0 17547008 0% /storage +storage/home 17547008 0 17547008 0% /home + + This completes the RAID-Z + configuration. To get status updates about the file systems + created during the nightly &man.periodic.8; runs, issue the + following command: + + &prompt.root; echo 'daily_status_zfs_enable="YES"' >> /etc/periodic.conf + + + + Recovering <acronym>RAID</acronym>-Z + + Every software RAID has a method of + monitoring their state. + ZFS is no exception. The status of + RAID-Z devices may be viewed with the + following command: + + &prompt.root; zpool status -x + + If all pools are healthy and everything is normal, the + following message will be returned: + + all pools are healthy + + If there is an issue, perhaps a disk has gone offline, + the pool state will be returned and look similar to: + + pool: storage + state: DEGRADED +status: One or more devices has been taken offline by the administrator. + Sufficient replicas exist for the pool to continue functioning in a + degraded state. +action: Online the device using 'zpool online' or replace the device with + 'zpool replace'. + scrub: none requested +config: + + NAME STATE READ WRITE CKSUM + storage DEGRADED 0 0 0 + raidz1 DEGRADED 0 0 0 + da0 ONLINE 0 0 0 + da1 OFFLINE 0 0 0 + +errors: No known data errors + + This states that the device was taken offline by the + administrator. This is true for this particular example. + To take the disk offline, the following command was + used: + + &prompt.root; zpool offline storage da1 + + It is now possible to replace the + da1 after the system has been + powered down. When the system is back online, the following + command may issued to replace the disk: + + &prompt.root; zpool replace storage da1 + + From here, the status may be checked again, this time + without the flag to get state + information: + + &prompt.root; zpool status storage + pool: storage + state: ONLINE + scrub: resilver completed with 0 errors on Sat Aug 30 19:44:11 2008 +config: + + NAME STATE READ WRITE CKSUM + storage ONLINE 0 0 0 + raidz1 ONLINE 0 0 0 + da0 ONLINE 0 0 0 + da1 ONLINE 0 0 0 + +errors: No known data errors + + As shown from this example, everything appears to be + normal. + + + + Data Verification + + As previously mentioned, ZFS uses + checksums to verify the integrity of + stored data. They are enabled automatically upon creation + of file systems and may be disabled using the following + command: + + &prompt.root; zfs set checksum=off storage/home + + This is not a wise idea; however, as checksums take + 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 ZFS + check data integrity using checksum verification. This + process is known as scrubing. To verify the + data integrity of the storage pool, issue + the following command: + + &prompt.root; zpool scrub storage + + This process may take considerable time depending on + the amount of data stored. It is also very + I/O intensive, so much that only one + of these operations may be run at any given time. After + the scrub has completed, the status is updated and may be + viewed by issuing a status request: + + &prompt.root; zpool status storage + pool: storage + state: ONLINE + scrub: scrub completed with 0 errors on Sat Aug 30 19:57:37 2008 +config: + + NAME STATE READ WRITE CKSUM + storage ONLINE 0 0 0 + raidz1 ONLINE 0 0 0 + da0 ONLINE 0 0 0 + da1 ONLINE 0 0 0 + +errors: No known data errors + + The completion time is in plain view in this example. + This feature helps to ensure data integrity over a long + period of time. + + There are many more options for the Z file system, + see the &man.zfs.8; and &man.zpool.8; manual + pages. + + + + + + + + diff --git a/el_GR.ISO8859-7/books/handbook/updating/Makefile b/el_GR.ISO8859-7/books/handbook/updating/Makefile new file mode 100644 index 0000000000..fd42d72743 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/updating/Makefile @@ -0,0 +1,18 @@ +# +# Build the Handbook with just the content from this chapter. +# +# $FreeBSD$ +# +# %SOURCE% en_US.ISO8859-1/books/handbook/updating/Makefile +# %SRCID% 1.1 +# + +CHAPTERS= updating/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/el_GR.ISO8859-7/books/handbook/updating/chapter.sgml b/el_GR.ISO8859-7/books/handbook/updating/chapter.sgml new file mode 100644 index 0000000000..b27a71c607 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/updating/chapter.sgml @@ -0,0 +1,581 @@ + + + + + + + Tom + Rhodes + Γράφηκε από τον + + + + + Colin + Percival + Βασίστηκε σε σημειώσεις που παρείχε ο + + + + + Ενημερώνοντας το &os; + + + Σύνοψη + + Updating FreeBSD + + freebsd-update + Updating + + + Ένα κύριο χαρακτηριστικό του &os; έχει παραμείνει αναλλοίωτο με την + πάροδο του χρόνου: Η απαίτηση για την χρήση εφαρμογών και βοηθητικών + προγραμμάτων για την ανάκτηση μικρών και μεγάλων ενημερώσεων του + συστήματος. + + Για πολλά χρόνια, οι χρήστες που επιθυμούσαν να αναβαθμίσουν το + σύστημα τους, να ανακτήσουν τις ενημερώσεις ασφαλείας, και να λάβουν + ενημερωμένες εκδόσεις των πακέτων και των ports, χωρίς να χαλάσουν τη + λειτουργία της Συλλογής των Ports, ήταν αναγκασμένοι να χρησιμοποιούν + το εργαλείο CVSup. + + Αν και το CVSup υποστηρίζεται ακόμα (και + έχει επίσης προστεθεί και μια έκδοση του σε γλώσσα C στο βασικό σύστημα + του &os;), υπάρχουν και νέες μέθοδοι για την ανάκτηση ενημερώσεων του + συστήματος. + + Εργαλεία όπως το &man.portsnap.8; και το &man.freebsd-update.8; + έχουν εκσυγχρονίσει την διαδικασία αναβάθμισης. Αυτές οι νέες μέθοδοι + αυξάνουν την παραγωγικότητα ενώ ταυτόχρονα παρέχουν και μια απλούστερη + διεπαφή προς τους χρήστες. Ορισμένα από αυτά τα εργαλεία μπορούν να + εκτελεστούν από το &man.cron.8;, ελαχιστοποιώντας την ανάγκη + αλληλεπίδρασης με το διαχειριστή του συστήματος. Αυτό είναι πραγματικό + όφελος για όσους διαχειρίζονται και παρακολουθούν εκατοντάδες συστήματα + &os;. + + Στο κεφάλαιο αυτό θα εξηγήσουμε τις νέες μεθόδους, καθώς και + τους τρόπους με τους οποίους μπορούν να ωφεληθούν τόσο οι χρήστες όσο + και οι διαχειριστές συστημάτων, από την πρακτική και εύκολη εφαρμογή + τους. + + Αφού διαβάσετε αυτό το κεφάλαιο, θα γνωρίζετε: + + + + Ποια βοηθητικά προγράμματα μπορείτε να χρησιμοποιήσετε για να + ενημερώσετε το σύστημα και την Συλλογή των Ports. + + + + Πως να χρησιμοποιήσετε το freebsd-update + για να εφαρμόσετε ενημερώσεις ασφαλείας και άλλες μικρές και + μεγαλύτερες αναβαθμίσεις στο &os;. + + + + Πως να συγκρίνετε την κατάσταση ενός εγκατεστημένου συστήματος + με αναφορά ένα γνωστό και εγγυημένα σωστό σύστημα. + + + + Πριν διαβάσετε αυτό το κεφάλαιο, θα πρέπει: + + + + Να κατανοείτε βασικές έννοιες του &unix; και του &os; + (). + + + + Να είστε εξοικειωμένος με βασικές έννοιες της ρύθμισης και + μεταγλώττισης προσαρμοσμένου πυρήνα + (). + + + + Να είστε εξοικειωμένος με την Συλλογή των Ports και την + εγκατάσταση εφαρμογών τρίτου κατασκευαστή στο &os; + (). + + + + Να είστε εξοικειωμένος με τα διάφορα τμήματα πηγαίου κώδικα + από τα οποία αποτελείται το &os;, καθώς και με τη χρήση του + εργαλείου &man.mergemaster.8; + (). + + + + + + Ενημέρωση του &os; + + Η εφαρμογή ενημερώσεων ασφαλείας αποτελεί ένα σημαντικό τμήμα της + συντήρησης λογισμικού, ειδικά όταν πρόκειται για το λειτουργικό σύστημα. + Για μεγάλο διάστημα, η διαδικασία αυτή δεν ήταν εύκολη στο &os;. + Έπρεπε να εφαρμοστούν patches στον πηγαίο κώδικα, να γίνει μεταγλώττιση + του από την αρχή, και να εγκατασταθούν ξανά τα νέα εκτελέσιμα. + + Αυτό δεν είναι πλέον αναγκαίο, καθώς το &os; διαθέτει τώρα ένα + βοηθητικό πρόγραμμα, το freebsd-update. Το πρόγραμμα + παρέχει δύο διαφορετικές λειτουργίες. Η πρώτη είναι η δυνατότητα + δυαδικής (binary) ενημέρωσης του βασικού συστήματος με τις τελευταίες + διορθώσεις ασφάλειας και λαθών, χωρίς να χρειάζεται ξανά μεταγλώττιση + και εγκατάσταση. Η δεύτερη είναι η δυνατότητα αναβάθμισης του + συστήματος σε μια νέα μικρή ή μεγάλη επίσημη έκδοση (release). + + + Δυαδικές διορθώσεις λαθών και ασφάλειας, διατίθενται για όλες + τις αρχιτεκτονικές και εκδόσεις που υποστηρίζονται από την ομάδα + ασφάλειας. Ωστόσο, ορισμένα χαρακτηριστικά όπως η δυνατότητα + αναβάθμισης του λειτουργικού σε μια νέα έκδοση, απαιτούν την + τελευταία έκδοση του &man.freebsd-update.8; και του &os; 6.3. + Πριν προχωρήσετε στην αναβάθμιση σε μια νέα έκδοση, θα πρέπει να + διαβάσετε τις σχετικές με αυτήν ανακοινώσεις, καθώς μπορεί να + περιέχουν σημαντικές πληροφορίες. Μπορείτε να δείτε τις + ανακοινώσεις εκδόσεων στην παρακάτω τοποθεσία: + . + + + Αν υπάρχει κάποιο crontab που χρησιμοποιεί τις + δυνατότητες του freebsd-update, θα πρέπει να + απενεργοποιηθεί πριν ξεκινήσει η παρακάτω διαδικασία. Μπορείτε να + εγκαταστήσετε την τελευταία έκδοση του + freebsd-update κατεβάζοντας το συμπιεσμένο πακέτο + από το παραπάνω URL και εκτελώντας τις παρακάτω + εντολές: + + &prompt.root; gunzip -c freebsd-update-upgrade.tgz | tar xvf - +&prompt.root; mv freebsd-update.sh /usr/sbin/freebsd-update +&prompt.root; mv freebsd-update.conf /etc + + Δεν απαιτείται να κατεβάσετε την τελευταία έκδοση, αν χρησιμοποιείτε + κάποια από τις τρέχουσες εκδόσεις του &os;. + + + Το Αρχείο Ρυθμίσεων + + Κάποιοι χρήστες ίσως θέλουν να αλλάξουν το αρχείο ρυθμίσεων, ώστε + να έχουν καλύτερο έλεγχο της διαδικασίας. Οι επιλογές είναι γενικά + αρκετά καλά τεκμηριωμένες, αλλά οι παρακάτω ίσως να χρειάζονται + κάποιες επιπλέον επεξηγήσεις: + + # Components of the base system which should be kept updated. +Components src world kernel + + Αυτή η παράμετρος ελέγχει ποια τμήματα του &os; θα διατηρούνται + ενημερωμένα. Η προεπιλογή είναι να ενημερώνεται ο πηγαίος κώδικας, + όλο το βασικό σύστημα, και ο πυρήνας. Τα τμήματα είναι τα ίδια + που διατίθενται και κατά την εγκατάσταση, για παράδειγμα αν βάλετε + την επιλογή world/games θα εγκαθίστανται ενημερώσεις + για τα παιχνίδια. Αν βάλετε src/bin θα επιτρέψετε + την ενημέρωση του πηγαίου κώδικα του καταλόγου + src/bin. + + Η καλύτερη επιλογή είναι να αφήσετε εδώ την προεπιλεγμένη τιμή, + καθώς αν την αλλάξετε ώστε να περιέχει συγκεκριμένα μόνο τμήματα, + θα αναγκαστείτε να αναφέρετε χωριστά μέσα στο αρχείο ρυθμίσεων κάθε + τμήμα που θέλετε να ενημερώνεται. Αυτό ίσως έχει καταστροφικά + αποτελέσματα, καθώς είναι πιθανό ο πηγαίος κώδικας και τα εκτελέσιμα + προγράμματα να μην είναι πλέον σε συγχρονισμό μεταξύ τους. + + # Paths which start with anything matching an entry in an IgnorePaths +# statement will be ignored. +IgnorePaths + + Προσθέστε διαδρομές σε καταλόγους, όπως + /bin ή + /sbin για να αφήσετε + απείραχτους τους συγκεκριμένους καταλόγους κατά την διαδικασία + ενημέρωσης. Η επιλογή αυτή μπορεί να χρησιμοποιηθεί για να αποτρέψει + το freebsd-update να γράψει πάνω σε πιθανόν + δικές σας τοπικές αλλαγές. + + # Paths which start with anything matching an entry in an UpdateIfUnmodified +# statement will only be updated if the contents of the file have not been +# modified by the user (unless changes are merged; see below). +UpdateIfUnmodified /etc/ /var/ /root/ /.cshrc /.profile + + Η επιλογή αυτή θα ενημερώσει τα αρχεία ρυθμίσεων στους καταλόγους + που καθορίζονται, μόνο αν αυτά δεν έχουν μεταβληθεί από το χρήστη. + Αν υπάρχουν τοπικές αλλαγές, δεν θα γίνει ενημέρωση. Υπάρχει μια + ακόμα επιλογή, η KeepModifiedMetadata, η οποία + οδηγεί το freebsd-update να αποθηκεύσει τις αλλαγές + μεταξύ των δύο εκδόσεων κατά τη διάρκεια της συγχώνευσης + (merge). + + # When upgrading to a new &os; release, files which match MergeChanges +# will have any local changes merged into the version from the new release. +MergeChanges /etc/ /var/named/etc/ + + Πρόκειται για τη λίστα των καταλόγων που περιέχουν αρχεία + ρυθμίσεων, και στα οποία το freebsd-update θα + επιχειρεί την διαδικασία συγχώνευσης αλλαγών. Η διαδικασία + συγχώνευσης γίνεται με μια σειρά από patches τύπου &man.diff.1; + παρόμοια με το &man.mergemaster.8; αλλά με λιγότερες επιλογές. Οι + συγχωνεύσεις είτε γίνονται δεκτές, είτε προκαλούν το άνοιγμα κάποιου + συντάκτη κειμένου, διαφορετικά η εκτέλεση του + freebsd-update ακυρώνεται. Αν δεν είστε + σίγουρος, κρατήστε αντίγραφο ασφαλείας του καταλόγου + /etc και απλώς δεχθείτε τις + αλλαγές. Δείτε το για περισσότερες + πληροφορίες σχετικά με την εντολή + mergemaster. + + # Directory in which to store downloaded updates and temporary +# files used by &os; Update. +# WorkDir /var/db/freebsd-update + + Στον κατάλογο αυτό φυλάσσονται όλα τα patches και τα προσωρινά + αρχεία. Σε περιπτώσεις όπου ο χρήστης εκτελεί αναβάθμιση σε μια + νεότερη έκδοση του &os;, θα πρέπει να διαθέτει τουλάχιστον ένα + gigabyte ελεύθερου χώρου. + + # When upgrading between releases, should the list of Components be +# read strictly (StrictComponents yes) or merely as a list of components +# which *might* be installed of which &os; Update should figure out +# which actually are installed and upgrade those (StrictComponents no)? +# StrictComponents no + + Αν θέσετε την παραπάνω επιλογή στο yes, + το freebsd-update θα υποθέσει ότι η λίστα + Components είναι πλήρης και δεν θα επιχειρήσει + να προχωρήσει σε αλλαγές εκτός λίστας. Ουσιαστικά, το + freebsd-update θα προσπαθήσει να ενημερώσει κάθε + αρχείο που ανήκει στη λίστα Components. + + + + Patches Σχετικά με την Ασφάλεια + + Τα patches που σχετίζονται με την ασφάλεια, αποθηκεύονται σε + ένα απομακρυσμένο μηχάνημα και μπορούν να μεταφορτωθούν και να + εγκατασταθούν με την ακόλουθη εντολή: + + &prompt.root; freebsd-update fetch +&prompt.root; freebsd-update install + + Αν με την παραπάνω εντολή εγκατασταθούν ενημερώσεις στον πυρήνα, + θα χρειαστεί να επανεκκινήσετε το σύστημα. Αν όλα πάνε καλά, το + σύστημα θα είναι πλέον ενημερωμένο και μπορείτε να εκτελείτε το + freebsd-update αυτόματα με την βοήθεια του + &man.cron.8;. Μια απλή καταχώριση στο αρχείο + /etc/crontab είναι επαρκής για αυτό + το σκοπό: + + @daily root freebsd-update cron + + Η παραπάνω καταχώριση ορίζει ότι το + freebsd-update θα εκτελείται μια φορά την ημέρα. + Με τον τρόπο αυτό, και όταν η εκτέλεση είναι μέσω της επιλογής + , το freebsd-update απλώς + θα ελέγχει για ενημερώσεις. Αν υπάρχουν, η εφαρμογή θα τις + κατεβάζει, αλλά δεν θα τις εγκαθιστά. Θα στέλνει όμως ένα email + στο χρήστη root ώστε να τις εγκαταστήσει + χειροκίνητα. + + Αν οτιδήποτε πάει στραβά, το freebsd-update + έχει την ικανότητα να επιστρέφει στην προηγούμενη σταθερή κατάσταση, + αναιρώντας το τελευταίο σετ αλλαγών με την ακόλουθη εντολή: + + &prompt.root; freebsd-update rollback + + Με την ολοκλήρωση της εντολής, θα πρέπει να επανεκκινήσετε το + σύστημα αν έχουν γίνει αλλαγές στον πυρήνα ή σε κάποιο από τα + αρθρώματα του. Αυτό θα επιτρέψει στο &os; να φορτώσει τα νέα + εκτελέσιμα στη μνήμη. + + + Η εντολή freebsd-update λειτουργεί μόνο + με τον πυρήνα GENERIC. Αν έχετε κάνει αλλαγές + στον GENERIC ή έχετε εγκαταστήσει + προσαρμοσμένο πυρήνα, το freebsd-update δεν θα + ολοκληρώσει τις αλλαγές. Θα αποτύχει στην πρώτη περίπτωση, και + θα εμφανίσει ένα μήνυμα λάθους στη δεύτερη. + + + + + Αναβαθμίσεις σε Μικρές και Μεγάλες Εκδόσεις + + Η διαδικασία αυτή θα απομακρύνει τα παλιά αρχεία αντικειμενικού + κώδικα (object files) καθώς και τις παλιές βιβλιοθήκες, κάνοντας + τις περισσότερες εφαρμογές τρίτων κατασκευαστών να μη λειτουργούν. + Σας συνιστούμε είτε να απεγκαταστήσετε όλα τα εγκατεστημένα ports και + να τα εγκαταστήσετε ξανά, ή να τα αναβαθμίσετε αργότερα, + χρησιμοποιώντας το βοηθητικό πρόγραμμα + ports-mgmt/portupgrade. + Οι περισσότεροι χρήστες θα θέλουν να κάνουν μια δοκιμαστική + μεταγλώττιση χρησιμοποιώντας την ακόλουθη εντολή: + + &prompt.root; portupgrade -af + + Με αυτό τον τρόπο εξασφαλίζεται ότι τα πάντα θα επανεγκατασταθούν + σωστά. Σημειώστε ότι αν θέσετε την μεταβλητή περιβάλλοντος + BATCH στην τιμή yes, όλες οι + πιθανές ερωτήσεις που θα εμφανιστούν κατά τη διαδικασία, θα + απαντηθούν αυτόματα με yes. Έτσι δεν υπάρχει πλέον + ανάγκη για παρέμβαση του χρήστη κατά τη διάρκεια της διαδικασίας + μεταγλώττισης. + + Είναι δυνατές οι αναβαθμίσεις τόσο σε μικρές όσο και σε μεγάλες + εκδόσεις, δίνοντας στην εντολή freebsd-update τον + επιθυμητό αριθμό έκδοσης. Για παράδειγμα, η ακόλουθη εντολή θα + αναβαθμίσει το σύστημα σε &os; 6.3: + + &prompt.root; freebsd-update -r 6.3-RELEASE upgrade + + Μετά τη λήψη της εντολής, το + freebsd-update θα αξιολογήσει την κατάσταση του + συστήματος και του αρχείου ρυθμίσεων του, σε μια απόπειρα να μαζέψει + τις απαραίτητες πληροφορίες για την αναβάθμιση του συστήματος. + Οι πληροφορίες που ανιχνεύθηκαν θα εμφανιστούν στην οθόνη με τη μορφή + μιας λίστας εγκατεστημένων προγραμμάτων. Για παράδειγμα: + + Looking up update.FreeBSD.org mirrors... 1 mirrors found. +Fetching metadata signature for 6.3-BETA1 from update1.FreeBSD.org... done. +Fetching metadata index... done. +Inspecting system... done. + +The following components of FreeBSD seem to be installed: +kernel/smp src/base src/bin src/contrib src/crypto src/etc src/games +src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue +src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin +world/base world/info world/lib32 world/manpages + +The following components of FreeBSD do not seem to be installed: +kernel/generic world/catpages world/dict world/doc world/games +world/proflibs + +Does this look reasonable (y/n)? y + + Στο σημείο αυτό, το freebsd-update θα + κατεβάσει όλα τα αρχεία που απαιτούνται για την αναβάθμιση. Σε + μερικές περιπτώσεις, ο χρήστης θα κληθεί να απαντήσει σε ερωτήσεις + σχετικά με το τι θα εγκατασταθεί ή πως πρέπει να προχωρήσει η + διαδικασία. + + Αφού μεταφορτωθούν όλα τα patches στο τοπικό σύστημα, θα γίνει + και η εφαρμογή τους. Η διαδικασία αυτή ίσως πάρει λίγο χρόνο, + ανάλογα με την ταχύτητα και το φορτίο του μηχανήματος. Έπειτα θα + γίνει η συγχώνευση των αρχείων ρυθμίσεων. Αυτό το μέρος της + διαδικασίας απαιτεί παρέμβαση του χρήστη, καθώς σε κάποια αρχεία θα + χρειαστεί η συγχώνευση να γίνει χειροκίνητα με τη βοήθεια κάποιου + συντάκτη κειμένου. Ο χρήστης θα ενημερώνεται για το αποτέλεσμα κάθε + επιτυχημένης συγχώνευσης καθώς εξελίσσεται η διαδικασία. Σε + περίπτωση αποτυχημένης συγχώνευσης (ή αγνόησης της), η διαδικασία + αναβάθμισης θα διακοπεί. Ενδεχομένως να θέλετε να κρατήσετε αντίγραφο + ασφαλείας του καταλόγου /etc + και να συγχωνεύσετε αργότερα (χειροκίνητα) κάποια σημαντικά αρχεία, + όπως το master.passwd ή το + group. + + + Στο σημείο αυτό δεν έχει γίνει ακόμα καμιά αλλαγή στο σύστημα, + καθώς όλη η διαδικασία της αναβάθμισης και συγχώνευσης γίνεται σε + διαφορετικό κατάλογο. Όταν εφαρμοστούν επιτυχώς όλα τα patches + και ολοκληρωθεί με επιτυχία η διαδικασία της συγχώνευσης όλων των + αρχείων ρύθμισης, ο χρήστης θα πρέπει να επιβεβαιώσει την τελική + εγκατάσταση. + + + Με το τέλος αυτής τη διαδικασίας, η αναβάθμιση μπορεί να + οριστικοποιηθεί στο δίσκο, με τη χρήση της ακόλουθης εντολής: + + &prompt.root; freebsd-update install + + Στην πρώτη φάση, θα αλλαχθεί ο πυρήνας και τα σχετικά αρθρώματα. + Στο σημείο αυτό, θα πρέπει να γίνει επανεκκίνηση του μηχανήματος. + Μπορείτε να χρησιμοποιήσετε την ακόλουθη εντολή για να επανεκκινήσετε + το μηχάνημα ώστε να φορτωθεί στη μνήμη ο νέος πυρήνας: + + &prompt.root; shutdown -r now + + Μόλις το σύστημα επανέλθει σε λειτουργία, θα πρέπει να εκτελέσετε + ξανά το freebsd-update. Η προηγούμενη λειτουργία + έχει αποθηκευθεί, και έτσι το freebsd-update δεν θα + ξεκινήσει από την αρχή, αλλά θα απομακρύνει όλες τις παλιές + κοινόχρηστες βιβλιοθήκες και τα αρχεία αντικειμενικού κώδικα. Για να + συνεχίσετε σε αυτό το στάδιο, δώστε την ακόλουθη εντολή: + + &prompt.root; freebsd-update install + + + Ανάλογα με το αν υπήρξαν αλλαγές στους αριθμούς εκδόσεων των + βιβλιοθηκών, ίσως να υπάρχουν μόνο δύο φάσεις εγκατάστασης αντί για + τρεις. + + + Όλο το λογισμικό τρίτου κατασκευαστή θα πρέπει τώρα να + μεταγλωττιστεί και να επανεγκατασταθεί από την αρχή. Αυτό απαιτείται + καθώς το εγκατεστημένο λογισμικό ίσως εξαρτάται από βιβλιοθήκες οι + οποίες αφαιρέθηκαν κατά τη διαδικασία της αναβάθμισης. Μπορείτε να + χρησιμοποιήσετε την εντολή + ports-mgmt/portupgrade + για να αυτοματοποιήσετε αυτή τη διαδικασία. Για να ξεκινήσετε, δώστε + τις παρακάτω εντολές: + + &prompt.root; portupgrade -f ruby +&prompt.root; rm /var/db/pkg/pkgdb.db +&prompt.root; portupgrade -f ruby18-bdb +&prompt.root; rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db +&prompt.root; portupgrade -af + + Μόλις ολοκληρωθεί το παραπάνω, ολοκληρώστε τη διαδικασία + αναβάθμισης με μια τελευταία κλήση της εντολής + freebsd-update. Δώστε την παρακάτω εντολή για να + ολοκληρώσετε οτιδήποτε έχει απομείνει στη διαδικασία + αναβάθμισης: + + &prompt.root; freebsd-update install + + Επανεκκινήστε το μηχάνημα σας στην νέα έκδοση του &os;. + Η διαδικασία έχει ολοκληρωθεί. + + + + Σύγκριση Κατάστασης του Συστήματος + + Το βοηθητικό πρόγραμμα freebsd-update μπορεί να + χρησιμοποιηθεί για να ελέγξετε την κατάσταση της εγκατεστημένης + έκδοσης του &os; σε σχέση με μια γνωστή και σωστή εγκατάσταση. + Η επιλογή αυτή συγκρίνει και αξιολογεί την τρέχουσα έκδοση των + προγραμμάτων συστήματος, των βιβλιοθηκών και των αρχείων ρύθμισης. + Για να ξεκινήσετε τη σύγκριση, δώστε την ακόλουθη εντολή: + + &prompt.root; freebsd-update IDS >> outfile.ids + + + Αν και το όνομα της εντολής είναι IDS, δεν + θα πρέπει σε καμιά περίπτωση να θεωρηθεί υποκατάστατο ενός + συστήματος ανίχνευσης εισβολέα (intrusion detection system) όπως + είναι για παράδειγμα το + security/snort. + Καθώς το freebsd-update αποθηκεύει τα δεδομένα + του στο δίσκο, υπάρχει πάντα η πιθανότητα να έχει γίνει αλλοίωση + τους. Αν και η πιθανότητα αυτή μπορεί να μειωθεί χρησιμοποιώντας + τη ρύθμιση kern.securelevel και αποθηκεύοντας + τα δεδομένα της εντολής freebsd-update σε ένα + σύστημα αρχείων μόνο για ανάγνωση, μια ακόμα καλύτερη λύση θα ήταν + να συγκρίνετε το σύστημα με κάποιο δίσκο που θεωρείτε σίγουρα + ασφαλή. Για παράδειγμα, με ένα δίσκο DVD ή με + ένα εξωτερικό δίσκο USB που φυλάσσετε σε ασφαλή + τοποθεσία. + + + Θα γίνει τώρα μια επιθεώρηση του συστήματος και θα δημιουργηθεί + μια λίστα από αρχεία και τιμές hash του τύπου &man.sha256.1;, + τόσο για το εγκατεστημένο όσο και για το γνωστό σύστημα. Επειδή + πρόκειται για μεγάλη λίστα, την ανακατευθύνουμε στο αρχείο + outfile.ids. Στην οθόνη το κείμενο θα κυλούσε + πολύ γρήγορα, και σύντομα θα γέμιζε την προσωρινή μνήμη απεικόνισης + της κονσόλας. + + Οι γραμμές αυτές έχουν γενικά μεγάλο μήκος, αλλά είναι εύκολο + να επεξεργαστούμε την έξοδο. Για παράδειγμα, για να δείτε μια λίστα + όλων των αρχείων που διαφέρουν από αυτά της επίσημης έκδοσης, δώστε + την ακόλουθη εντολή: + + &prompt.root; cat update.ids | awk '{ print $1 }' | more +/etc/master.passwd +/etc/motd +/etc/passwd +/etc/pf.conf + + Τα παραπάνω είναι μόνο ένα μέρος της εξόδου, υπάρχουν ακόμα + πολλά διαφορετικά αρχεία. Κάποια από αυτά τα αρχεία είναι φυσιολογικό + να έχουν τροποποιηθεί. Για παράδειγμα, το + /etc/passwd έχει τροποποιηθεί, καθώς έχουν + προστεθεί χρήστες στο σύστημα. Σε μερικές περιπτώσεις, μπορεί να + υπάρχουν και άλλα αρχεία, όπως π.χ. αρθρώματα πυρήνα τα οποία + διαφέρουν αφού έχουν ενημερωθεί μέσω της + freebsd-update. Για να εξαιρέσετε συγκεκριμένα + αρχεία ή καταλόγους, προσθέστε τα στην επιλογή + IDSIgnorePaths στο αρχείο ρυθμίσεων + /etc/freebsd-update.conf. + + Εκτός από την χρήση που αναφέραμε προηγουμένως, το σύστημα αυτό + μπορεί να χρησιμοποιηθεί και ως τμήμα μιας λεπτομερούς διαδικασίας + αναβάθμισης. + + + + + Portsnap: Ένα Εργαλείο Ενημέρωσης της Συλλογής των Ports + + Το βασικό σύστημα του &os; περιλαμβάνει επίσης ένα βοηθητικό + πρόγραμμα για την ενημέρωση της Συλλογής των Ports. Πρόκειται για το + &man.portsnap.8;. Όταν το εκτελέσετε, θα συνδεθεί σε ένα απομακρυσμένο + διακομιστή, θα επαληθεύσει το κλειδί του πηγαίου κώδικα, και θα + κατεβάσει ένα νέο αντίγραφο της Συλλογής των Ports. Το κλειδί + χρησιμοποιείται για να επαληθεύσει την ακεραιότητα όλων των αρχείων + που μεταφορτώνονται, εξασφαλίζοντας ότι δεν έχουν αλλοιωθεί κατά + την μεταφορά. Για να κατεβάσετε τα τελευταία αρχεία της Συλλογής των + Ports, εκτελέστε την ακόλουθη εντολή: + + &prompt.root; portsnap fetch +Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found. +Fetching snapshot tag from portsnap1.FreeBSD.org... done. +Fetching snapshot metadata... done. +Updating from Wed Aug 6 18:00:22 EDT 2008 to Sat Aug 30 20:24:11 EDT 2008. +Fetching 3 metadata patches.. done. +Applying metadata patches... done. +Fetching 3 metadata files... done. +Fetching 90 patches.....10....20....30....40....50....60....70....80....90. done. +Applying patches... done. +Fetching 133 new ports or files... done. + + Το παραπάνω παράδειγμα δείχνει ότι το &man.portsnap.8; + βρήκε και επαλήθευσε αρκετά patches τα οποία πρέπει να εφαρμοστούν + στο υπάρχον δέντρο των ports. Αυτό δείχνει επίσης ότι το πρόγραμμα + έχει εκτελεστεί κατά το παρελθόν. Αν αυτή ήταν η πρώτη φορά που + εκτελούνταν, θα γίνονταν απλώς κατέβασμα της συλλογής. + + Όταν το &man.portsnap.8; εκτελέσει επιτυχώς της λειτουργία + fetch, η Συλλογή των Ports και τα + αντίστοιχα patches έχουν αποθηκευθεί στο τοπικό σύστημα και έχει γίνει + η επαλήθευση τους. Τα ενημερωμένα αρχεία μπορούν να εγκατασταθούν + γράφοντας: + + &prompt.root; portsnap extract +/usr/ports/.cvsignore +/usr/ports/CHANGES +/usr/ports/COPYRIGHT +/usr/ports/GIDs +/usr/ports/KNOBS +/usr/ports/LEGAL +/usr/ports/MOVED +/usr/ports/Makefile +/usr/ports/Mk/bsd.apache.mk +/usr/ports/Mk/bsd.autotools.mk +/usr/ports/Mk/bsd.cmake.mk +... + + Η διαδικασία έχει πλέον ολοκληρωθεί, και μπορείτε να εγκαταστήσετε + ή να αναβαθμίσετε εφαρμογές χρησιμοποιώντας την ενημερωμένη Συλλογή των + Ports. + + + +