A question about fsck and the -t option
CyberLeo Kitsana
cyberleo at cyberleo.net
Thu Apr 3 04:16:07 UTC 2014
On 04/02/2014 06:00 PM, Ronald F. Guilmette wrote:
>
> In message <533C40BF.2010907 at cyberleo.net>,
> CyberLeo Kitsana <cyberleo at cyberleo.net> wrote:
>
>> A glance at the source code[1] suggests that {fsck} attempts to infer the
>> type from the fstab, and then the BSD disklabel.
>
> Based upon my limited perusal/skimming of the fsck man page, this appears
> to be undocumented behavior.
>
> I shall be filing a documentation PR on this, because I'm a firm believer
> that important aspects of behavior should be documented.
Excellent idea.
>> It does not appear to
>> attempt a guess from the filesystem magic itself.
>
> Should it perhaps do so?
I don't think so. Magical behaviour can be the source of much strife.
Precisely what is fsck supposed to do if you create a zpool on a disk
without first erasing the ufs magic therefrom, or vice versa, for example?
It's much safer to have the operator declare the filesystem type
explicitly, via flags or invoking the proper fsck_* binary directly, or
implicitly, via fstab, than to run the risk of mis-guessing their intent.
> The particular filesystem that wanted to check yesterday was most definitely
> _not_ listed in my /etc/fstab file. But that was not an oversight. That was
> by intent.
>
> Also and separately, please correct me if I am wrong, but aren't BSD style
> partition labels going the way of the dinosaur, now that we have GPT
> partitioning available?
Not until GPT stops causing unintended consequences with older machines
and poorly implemented firmwares.
--
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo at CyberLeo.Net>
Furry Peace! - http://www.fur.com/peace/
More information about the freebsd-questions
mailing list