Re: fsck_y_enable: use -C

From: Andriy Gapon <avg_at_freebsd.org>
Date: Mon, 01 Jun 2009 18:33:12 +0300
on 01/06/2009 16:20 Andriy Gapon said the following:
> What about the following patch?
> I believe that the idea behind fsck_y_enable is to try to make unattended systems
> with rw filesystems as recoverable as possible at the cost of potential damage to
> the data. The new "-C" option should not interfere with this goal, but should
> reduce recovery time, because currently fsck -y checks *all* filesystems from
> fstab, even those that are ro or clean:
> 
> -C      Check if the “clean” flag is set in the superblock and skip file
>         system checks if file system was properly dismounted and marked
>         clean.
> 

One potential issue that I've just thought of is that fsck_msdosfs doesn't seem to
support this option (even in a dummy way), so it would be a problem for those who
have msdos filesystems in fstab and also have fsck_y_enable.


> diff --git a/etc/rc.d/fsck b/etc/rc.d/fsck
> index bf51089..c0cb359 100755
> --- a/etc/rc.d/fsck
> +++ b/etc/rc.d/fsck
> _at__at_ -45,7 +45,7 _at__at_ fsck_start()
>  		8)
>  			if checkyesno fsck_y_enable; then
>  				echo "File system preen failed, trying fsck -y."
> -				fsck -y
> +				fsck -y -C
>  				case $? in
>  				0)
>  					;;
> 


-- 
Andriy Gapon
Received on Mon Jun 01 2009 - 13:33:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC