Commit Graph

11 Commits (d672bf167c08fa8d12cee0616df781fbba5ad3b0)

Author SHA1 Message Date
Harald Hoyer 1594d0bf9c fs-lib/fs-lib.sh: skip fsck for xfs and btrfs. remount is enough 2012-07-02 18:52:49 +02:00
Harald Hoyer b65bde04e7 fs-lib/fs-lib.sh: removed test mounting of btrfs and xfs
mount/umount check only costs time and we fail later anyway.
mount can take very long on large filesystems. Better fail on the real
mount.
2012-06-29 12:41:25 +02:00
Harald Hoyer 840d8e4733 add filesystem options to fsck_single()
if we have e.g. special btrfs options for "/" and "/usr", we want to use
those for the test mount to determine if the filesystem is corrupted.
2012-05-31 12:57:23 +02:00
Colin Guthrie d06580986b fs-lib: No need to pass in _dev and _fop as they are inherited, not used as arguments. 2012-02-22 18:04:43 +01:00
Harald Hoyer f74775ba1c 99fs-lib/fs-lib.sh: handle nfs as nop
handle fstype=nfs for fsck and let it be a nop
2011-12-15 08:54:49 +01:00
Harald Hoyer 1939a4f96e 99fs-lib/fs-lib.sh: accept "UUID=" and "LABEL=" for fsck_single
with the reuse of crypt-lib.sh devnames() and putting it in
dracut-lib.sh, fsck_single() can use more generic names from /etc/fstab
2011-12-15 08:54:48 +01:00
Michal Soltys 25b45979f2 fs-lib: add ability to choose fsck tools
in dracut.conf:

fscks="<tools>"
nofscks="yes"

and similary on command line:

--fscks [LIST] (in addition to conf's, if defined there)
--nofscks

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-10-10 11:54:26 +02:00
Michal Soltys f07aaccd06 99fs-lib: export FSTAB_FILE before fsck call
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-09-22 15:53:51 +02:00
Harald Hoyer 662ed0a13f 99fs-lib/fs-lib.sh: fsck btrfs via mounting like xfs
btrfsck is only for manual repairing your filesystem
2011-09-22 15:37:28 +02:00
Harald Hoyer 1afa0cb674 99fs-lib: add btrfsck 2011-08-11 17:52:40 +02:00
Michal Soltys fefab84fff implement fs-lib, squash a few bugs that were part of det_fs/wrap_fsck
To not pollute dracut-lib.sh, all the fsck related functions were moved
to fs-lib.sh. The functions available are as follows:

- fsck_single

this will detect/verify filesystem, check if it has necessary tools and
check the filesystem respecting additional flags (if any), using
specific "driver" (or falling back to generic one). Currently
available: fsck_drv_{com,xfs,std}. 'com' is used for tools following
typical subset of options/return codes (e.g. ext, jfs), 'std' is used
for "unknown" fs and doesn't assume it can be run non-interactively.

Please see comments around the code for more info.

- fsck_batch

this will check provided list of the devices;

Both of the above functions will fake empty fstab, to make generic fsck
not complain too much (excact devices are always provided on the command
line).

"Known" filesystems currently: ext234, reiser, jfs, xfs

- det_fs

Small bug fixed - as this function is meant to be called in $(), it may
not be verbose.
Current behaviour is:
 - if detection is successful, use its result
 - if detection is not successful, and filesystem is provided, return
   the provided one; otherwise use auto
2011-08-11 14:27:24 +02:00