>>>>> "TT" == Theodore Ts'o <ty...@mit.edu> writes:
TT> So does fsck:

TT> % e2fsck /tmp/foo.img

You mean
% fsck /tmp/foo.img

OK. Indeed. These days it indeed works on any file!

OK, please update the following man pages:


DESCRIPTION
       fsck is used to check and optionally repair one or more Linux  filesys-
       tems.   filesys  can  be  a device name (e.g.  /dev/hdc1, /dev/sdb2), a
       mount point (e.g.  /, /usr, /home), or an ext2 label or UUID  specifier
       (e.g.   UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).

Above we see the fsck man page needs to say that it can even be used on
plain files that are images of filesystems.

DESCRIPTION
       e2fsck is used to check the ext2/ext3/ext4 family of file systems.  For
       ext3 and ext4 filesystems that use a journal, if the  system  has  been
       shut  down  uncleanly without any errors, normally, after replaying the
       committed transactions  in the  journal,  the  file  system  should  be
       marked  as clean.   Hence, for filesystems that use journalling, e2fsck
       will normally replay the journal and exit, unless its superblock  indi-
       cates that further checking is required.

       device  is  the  device  file  where  the  filesystem  is  stored (e.g.
       /dev/hdc1).

Say one can even use e2fsck on plain files that are images of filesystems.

       Note that in general it is not safe to run e2fsck on  mounted  filesys-
       tems.  The only exception is if the -n option is specified, and -c, -l,
       or -L options are not specified.   However, even if it is  safe  to  do
       so,  the  results  printed by e2fsck are not valid if the filesystem is
       mounted.   If e2fsck asks whether or not you should check a  filesystem
       which  is mounted, the only correct answer is ``no''.  Only experts who
       really know what they are doing should consider answering this question
       in any other way.

Clarify on the man page also that it is OK to do
e2fsck /tmp/foo.img
even though /tmp itself is mounted.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to