FSCK(8) | Administracja systemem | FSCK(8) |
fsck - sprawdza i naprawia linuksowy system plików
fsck [-lsAVRTMNP] [-r [fd]] [-C [fd]] [-t typ-systemu-plików] [system-plików...] [--] [opcje-zależne-od-syst-pl]
fsck is used to check and optionally repair one or more Linux filesystems. filesys can be a device name (e.g., /dev/hdc1, /dev/sdb2), a mount point (e.g., /, /usr, /home), or an filesystem label or UUID specifier (e.g., UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of them.
Jeśli nie określono systemu plików w wierszu poleceń, ani nie użyto opcji -A, fsck domyślnie sprawdzi po kolei systemy plików z /etc/fstab. Jest to odpowiednik opcji -As.
The exit status returned by fsck is the sum of the following conditions:
The exit status returned when multiple filesystems are checked is the bit-wise OR of the exit statuses for each filesystem that is checked.
W rzeczywistości fsck jest po prostu interfejsem dla różnych programów sprawdzających dostępne w Linuksie systemy plików (fsck.typ-systemu-plików). Poszukiwanie programu specyficznego dla danego systemu plików odbywa się w zmiennej środowiskowej PATH. Jeśli PATH jest niezdefiniowana, przeszukiwane jest "/sbin".
Więcej szczegółów można znaleźć na stronach podręcznika programów sprawdzających właściwych dla poszczególnych systemów plików.
/dev/sda1: status 0, rss 92828, real 4.002804, user 2.677592, sys 0.86186
Interfejsy GUI mogą podać deskryptor pliku fd; w takim przypadku pasek postępu będzie przesyłany do tego deskryptora w formacie przetwarzalnym maszynowo, np.
/dev/sda1 0 92828 4.002804 2.677592 0.86186
Options specifiers may be included in the comma-separated fslist. They must have the format opts=fs-option. If an options specifier is present, then only filesystems which contain fs-option in their mount options field of /etc/fstab will be checked. If the options specifier is prefixed by a negation operator, then only those filesystems that do not have fs-option in their mount options field of /etc/fstab will be checked.
Na przykład, jeśli opts=ro pojawi się w liscie-syst-pl, to tylko systemy plików z pliku /etc/fstab, posiadające opcję ro będą sprawdzone.
Dla zgodności z dystrybucją Mandrake, w której skrypty startowe uzależnione są od nieautoryzowanej zmiany interfejsu użytkownika programu fsck, gdy typem systemu plików jest loop, to jest to traktowane tak, jakby podano opts=loop jako argument opcji -t.
Normally, the filesystem type is deduced by searching for filesys in the /etc/fstab file and using the corresponding entry. If the type cannot be deduced, and there is only a single filesystem given as an argument to the -t option, fsck will use the specified filesystem type. If this type is not available, then the default filesystem type (currently ext2) is used.
Główny system plików (/) zostanie sprawdzony jako pierwszy, chyba że podano opcję -P (patrz poniżej). Następnie będą sprawdzane systemy plików w kolejności określonej przez liczbę występującą w polu fs_passno (szóstym) pliku /etc/fstab. Systemy plików z wartością fs_passno wynoszącą 0 będą pomijane i w ogóle nie będą sprawdzane. Systemy plików z wartością fs_passno większą od zera będą sprawdzane w kolejności rosnącej, tzn. systemy plików z mniejszą wartością fs_passno będą sprawdzane wcześniej. Jeżeli istnieje kilka systemów plików o tym samym numerze przejścia, to fsck będzie usiłował sprawdzić je równolegle, jednakże będzie unikał jednoczesnego sprawdzania wielu systemów plików na tym samym dysku fizycznym.
fsck does not check stacked devices (RAIDs, dm-crypt, ...) in parallel with any other device. See below for FSCK_FORCE_ALL_PARALLEL setting. The /sys filesystem is used to determine dependencies between devices.
Stąd też, bardzo powszechną konfiguracją w /etc/fstab jest ustawienie dla głównego systemu plików pola fs_passno o wartości 1, zaś dla wszystkich pozostałych systemów plików przypisanie fs_passno wartości 2. Pozwoli to fsck na automatyczne równoległe uruchamianie programów sprawdzających systemy plików, jeżeli tylko było by to korzystne. Administratorzy systemów mogą zrezygnować z używania takiej konfiguracji jeśli z jakiegoś powodu chcą uniknąć równoległego sprawdzania systemów plików – na przykład, jeśli dany komputer niewiele pamięci, tak że problemem jest intensywne zastępowanie stron pamięci (paging).
fsck normally does not check whether the device actually exists before calling a filesystem specific checker. Therefore non-existing devices may cause the system to enter filesystem repair mode during boot if the filesystem specific checker returns a fatal error. The /etc/fstab mount option nofail may be used to have fsck skip non-existing devices. fsck also skips non-existing devices that have the special filesystem type auto.
Options which are not understood by fsck are passed to the filesystem-specific checker!
These options must not take arguments, as there is no way for fsck to be able to properly guess which options take arguments and which don't.
Dowolne opcje występujące po -- są traktowane jako opcje specyficzne dla danego systemu plików, które mają zostać przekazane do odpowiedniego programu sprawdzającego ten system plików.
Please note that fsck is not designed to pass arbitrarily complicated options to filesystem-specific checkers. If you're doing something complicated, please just execute the filesystem-specific checker directly. If you pass fsck some horribly complicated options and arguments, and it doesn't do what you expect, don't bother reporting it as a bug. You're almost certainly doing something that you shouldn't be doing with fsck. Options to different filesystem-specific fsck's are not standardized.
Na zachowanie programu fsck mają wpływ następujące zmienne środowiskowe:
/etc/fstab
Theodore Ts'o <tytso@mit.edu> Karel Zak <kzak@redhat.com>
fstab(5), mkfs(8), fsck.ext2(8) or fsck.ext3(8) or e2fsck(8), fsck.cramfs(8), fsck.jfs(8), fsck.nfs(8), fsck.minix(8), fsck.msdos(8), fsck.vfat(8), fsck.xfs(8), reiserfsck(8)
The fsck command is part of the util-linux package and is available from Linux Kernel Archive.
Autorami polskiego tłumaczenia niniejszej strony podręcznika są: Wojtek Kotwica <wkotwica@post.pl>, Andrzej Krzysztofowicz <ankry@green.mf.pg.gda.pl> i Michał Kułach <michal.kulach@gmail.com>
Niniejsze tłumaczenie jest wolną dokumentacją. Bliższe informacje o warunkach licencji można uzyskać zapoznając się z GNU General Public License w wersji 3 lub nowszej. Nie przyjmuje się ŻADNEJ ODPOWIEDZIALNOŚCI.
Błędy w tłumaczeniu strony podręcznika prosimy zgłaszać na adres manpages-pl-list@lists.sourceforge.net.
luty 2009 | util-linux |