tags 566072 +patch
thanks
Hi,
According to the v2.17-ReleaseNotes, this is a feature, and the recommended
way of dealing with potentially nonexistent filesystems is to use the nofail
option.
related commit:
http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;h=1bb516c34bf42d2ae9dc4aa40ae34b0df4e464a7
and manpage update:
http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;h=0779255c1392b0f29874c384b4dae426e0449773
So, assuming that we doesn't want to diverge from upstream, the way to go is
to add a remark in the Debian release notes, and display the offending device
right before the hard failure.
Note that the nonexistent+nofail check is done by fsck itself (eg. not
fsck.vfat or any other external binary) and only when invoked with -A.
Sample output with the attached patch:
$ ./fsck -A
fsck from util-linux-ng 2.17
e2fsck 1.41.12 (17-May-2010)
/dev/sda3 is mounted.
WARNING!!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.
Do you really want to continue (y/n)? no
check aborted.
e2fsck 1.41.12 (17-May-2010)
e2fsck: need terminal for interactive repairs
--> /dev/disk/by-id/usb-Sony_Sony_DSC-part1: device nonexistent and declared
without nofail
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
open: No such file or directory
Without -A the behaviour remains the same (which makes sense):
$ ./fsck /dev/disk/by-id/usb-Sony_Sony_DSC-part1
fsck from util-linux-ng 2.17
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
open: No such file or directory
-S
--- util-linux-2.17.2.orig/fsck/fsck.c 2010-09-29 23:22:47.000000000 +0200
+++ util-linux-2.17.2/fsck/fsck.c 2010-09-29 23:52:38.000000000 +0200
@@ -1033,6 +1033,11 @@ static int check_all(NOARGS)
fs->flags |= FLAG_DONE;
continue;
}
+ if ((!device_exists(fs->device)) &&
+ (!opt_in_list("nofail", fs->opts)))
+ fprintf(stderr,
+ _("%s: device nonexistent and declared without nofail\n"),
+ fs->device);
/*
* If a filesystem on a particular device has
* already been spawned, then we need to defer