Fsck .

42
• fsck https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and- online-course.html

Transcript of Fsck .

Page 1: Fsck .

• fsck

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 2: Fsck .

IBM AIX - POWER/PowerPC-based systems

1 It was the first Operating System to introduce the idea of a journaling file system, JFS, which allowed for fast boot times by avoiding the need to ensure the consistency of the file

systems on disks (see fsck) on every reboot

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 3: Fsck .

Git (software) - Characteristics

1 To check integrity, run the git fsck command.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 4: Fsck .

inode - Practical considerations

1 Many computer programs used by system administrators in UNIX Operating Systems often designate files with inode numbers. Examples include popular disk integrity

checking utilities such as the fsck or pfiles. Thus, the need naturally arises to translate inode numbers to file pathnames and vice versa. This can be accomplished using the

file finding utility find with the -inum option, or the ls command with the proper option (-i

on POSIX compliant platforms).

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 5: Fsck .

Btrfs - Checking and recovery

1 Unix systems traditionally rely on "fsck" programs to check and repair

filesystems. The btrfsck program is now available but, as of May 2012, it is

described by the authors as "relatively new code" which has "not seen

widespread testing on a large range of real-life breakage", and that "may cause

additional damage in the process of repair".

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 6: Fsck .

Hard disk drive - Integrity and failure

1 For logical damage to file systems, a variety of tools, including fsck on UNIX-like systems and CHKDSK on

Windows, can be used for data recovery

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 7: Fsck .

Unix - Components

1 System utilities – administrative tools such as mkfs, fsck, and many

others.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 8: Fsck .

ext3 - Advantages

1 The ext2 and ext3 file systems share the same standard set of utilities, e2fsprogs, which includes an fsck

tool

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 9: Fsck .

ext3 - Functionality

1 ext3, like most current Linux filesystems, cannot be fsck-ed while

the filesystem is mounted for writing. Attempting to check a file system

that is already mounted may detect bogus errors where changed data has not reached the disk yet, and

corrupt the file system in an attempt to "fix" these errors.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 10: Fsck .

IBM AIX (operating system) - POWER/PowerPC-based systems

1 It was the first Operating System to introduce the idea of a journaling file system, IBM Journaled File System 2

(JFS2)|JFS, which allowed for fast boot times by avoiding the need to ensure

the consistency of the file systems on disks (see fsck) on every reboot

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 11: Fsck .

Kyoto Cabinet - Practical functionality

1 If inconsistency of the database is detected when opening the

database, all regions are scanned as with fsck and the database is

reconstructed with surviving records implicitly.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 12: Fsck .

Lustre (file system) - History

1 This contract covered the completion of features, including improved Single Server Metadata Performance scaling, which allows Lustre to

better take advantage of many-core metadata server; online Lustre distributed filesystem

checking (LFSCK), which allows verification of the distributed filesystem state between data and

metadata servers while the filesystem is mounted and in use; and Distributed Namespace (DNE),

formerly Clustered Metadata (CMD), which allows the Lustre metadata to be distributed across

multiple servers

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 13: Fsck .

Lustre (file system) - Release history

1 The MDS LFSCK feature can verify and repair the Object Index (OI) file

while the file system is in use, after a file-level backup/restore or corruption

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 14: Fsck .

Lustre (file system) - Release history

1 The LFSCK feature allows scanning and verifying the internal consistency of the MDT FID and LinkEA attributes

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 15: Fsck .

ZFS - Resilvering and scrub

1 ZFS has no fsck repair tool equivalent, common on Unix filesystems, which does

file system validation and file system repair.No fsck utility equivalent exists for ZFS. This utility has traditionally served two purposes, those of file system repair and file system validation. Instead, ZFS

has a repair tool called scrub which examines and repairs silent corruption

and other problems. Some differences are:

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 16: Fsck .

ZFS - Resilvering and scrub

1 * fsck must be run on an offline filesystem, which means the

filesystem must be unmounted and is not usable while being repaired.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 17: Fsck .

ZFS - Resilvering and scrub

1 * fsck usually only checks metadata (such as the journal log) but never checks the data itself. This means, after an fsck, the data might still be

corrupt.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 18: Fsck .

ZFS - Resilvering and scrub

1 * scrub checks everything, including metadata and the data. The effect can be observed by comparing fsck to scrub times — sometimes a fsck on a large RAID completes in a few

minutes, which means only the metadata was checked. Traversing all metadata and data on a large RAID takes many hours, which is exactly

what scrub does.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 19: Fsck .

Unix File System - Implementations

1 To overcome the remaining issues after a failure, a background fsck utility was

introduced.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 20: Fsck .

Unix File System - Implementations

1 FreeBSD 9.0 adds support for lightweight journaling on top of

softupdates(SU+J), which greatly reduces the need for background fsck, and uses NFS-style ACLs by

default.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 21: Fsck .

Microsoft ScanDisk

1 On Unix-like systems there are

tools like fsck_msdosfs to do

the same task.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 22: Fsck .

Fsck

1 The system utility 'fsck' (for 'f'ile 's'ystem 'c'hec'k') is a tool for

checking the consistency of a file system in Unix and Unix-like

operating systems, such as Linux and Mac OS X.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 23: Fsck .

Fsck - Use

1 Generally, fsck is run automatically at boot time. There are two common triggers for automatically executing fsck. Either the

operating system detects that a file system is in an inconsistent state (likely due to a non-graceful shutdown such as a Crash

(computing)|crash or power loss), or after a certain number of times that the file system

is mounted (to prevent small, undetected inconsistencies from becoming

exacerbated).https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 24: Fsck .

Fsck - Use

1 The fsck command works directly on data-structures that are internal, and intrinsically specific to a file system implementation. A

matching fsck command that is tailored specifically to the design of the file system is

often provided by the authors of a file system. The exact behaviors of various fsck

implementations vary, but they typically follow a common order of internal operations

and provide a common command-line interface to the user.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 25: Fsck .

Fsck - Use

1 Most fsck utilities provide options for either interactively repairing

damaged file systems (the user must decide how to fix specific problems),

automatically deciding how to fix specific problems (so the user does not have to answer any questions), or reviewing the problems that need

to be resolved on a file system without actually fixing them

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 26: Fsck .

Fsck - Use

1 A journaling file system is designed such that tools such as fsck do not

need to be run after unclean shutdown (i.e

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 27: Fsck .

Fsck - Use

1 While fsck usually only checks metadata, such as the journal log, but never checks the data itself,

scrub checks everything, including metadata and the data

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 28: Fsck .

Fsck - Use as profanity

1 Because of the severity of fsck not being able to resolve this error, the terms fsck and fscked have come

into use among Unix system administrators as a minced oath.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 29: Fsck .

Fsck - Use as profanity

1 A report from a question and answer session at USENIX 1998 claims that fsck originally had a different name.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 30: Fsck .

Fsck - Use as profanity

1 :Dennis Ritchie: Well, the second letter was

differenthttps://groups.google.com/forum/#!msg/alt.sysadmin.recovery/tsGbbkvHo2c/6T-Pj9d3A6wJhttp://www.c2.com/cgi/wiki?MindFsck

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 31: Fsck .

Fsck - Use as profanity

1 Another online use of the term, not really profanity but a curt way of dismissing someone, was Go fsck

yourself, meaning to go and correct your issue (attitude, ignorance of the subject matter, etc.) before posting

again. This takes the fsck process as a metaphor, since running fsck involves rebooting and fixing

fundamental errors on the hard drive before continuing work on the

computer.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 32: Fsck .

Expect

1 It is used to automate control of interactive application software|applications such as telnet, ftp,

Passwd (command)|passwd, fsck, rlogin, tip (unix utility)|tip, Secure

Shell|ssh, and others

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 33: Fsck .

Fuck - Common alternatives

1 Huff Jr., Re: Mandrake 8.2 Musings, alt.os.linux.mandrake,

[http://groups.google.com/group/alt.os.linux.mandrake/msg/3641a310fcc6ed93?dmode=source

Google Groups] At some point in your Linux career you should ask yourself: 'If there are

3.4million successful, happy Mandrake users...what the 'fsck' is wrong with me?' In

Battlestar Galactica the bowdlerized form 'Frak (expletive)|Frack' (spelt 'Frak (expletive)|Frak' in

the Battlestar Galactica (reimagining)|reimagined 2003 version) was used as a substitute for fuck

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 34: Fsck .

List of DOS commands - CHKDSK

1 Equivalent to the Unix command fsck

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 35: Fsck .

AdvFS

1 The original team had enough confidence in its log based recovery

to release it without an fsck style recovery utility on the assumption that the file system journal would always be allocated on mirrored

drives.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 36: Fsck .

EncFS - Advantages

1 * Corruption of data is more isolated. Data corruption of filedata is local to a single file and data corruption of

the filesystem can be corrected with a reliable filesystem repair utility like fsck. In some whole-disk encryption

systems, one or both of these attributes are not present.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 37: Fsck .

F2FS - Implemented

1 * Offline Fsck|filesystem check (Check and fix

inconsistency[https://lkml.org/lkml/2014/9/20/104 f2fs-tools: release 1.4.0]

by Jaegeuk Kim)

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 38: Fsck .

DRBD - Mode of operation

1 This transition may require a subsequent verification of the

integrity of the file system stacked on top of DRBD, by way of a fsck|filesystem check or a journaling

filesystem|journal replay

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 39: Fsck .

HFS Plus - Linux

1 The Linux kernel includes the hfsplus module[http://git.kernel.org/?p=linux/kernel

/git/torvalds/linux-2.6.git;a=tree;f=fs/hfsplus;hb=HEAD Git Repository Kernel.org] for mounting HFS+ filesystems read-write. HFS+ fsck and mkfs have been ported to

Linux and are part of the hfsprogs package.[http://packages.debian.org/sid/hfsprogs

User-space supporting tools for HFS+ filesystems under Posix systems.]

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 40: Fsck .

BBC Redux - Technical details

1 The fsck-free ZFS file system is used after experiments with Unix File

System (UFS) proved it to be too slow

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 41: Fsck .

CHKDSK

1 'CHKDSK' (short for check disk) is a system software|system tool in DOS, OS/2 and Windows. It verifies the file

system integrity of a Volume (computing)|volume and fixes logical file system errors. It is similar to the

fsck command in Unix.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html