Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 1997 16:17:48 +0200 (SAT)
From:      Robert Nordier <rnordier@iafrica.com>
To:        keith@blueberry.co.uk (Keith Jones)
Cc:        freebsd-questions@FreeBSD.ORG, dwhite@resnet.uoregon.edu
Subject:   Re: mountmsdosfs(): Warning: ......
Message-ID:  <199711211417.QAA04013@eac.iafrica.com>
In-Reply-To: <19971121125440.43767@blueberry.co.uk> from Keith Jones at "Nov 21, 97 12:54:40 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Keith Jones wrote:

> On Thu, Nov 20, 1997 at 11:15:00AM -0800, Doug White wrote:
> 
> > The problem is really that you've used FIPS to shrink a drive, and you
> > shrank the drive below the threshold for changing the standard
> > clustersize.  The msdosfs code isn't intelligent enough to grok the
> > proper clustersize, so it spits that out.  
> >
> > You should _*IMMEDIATELY*_ dismount the disk and not mount it until you
> > reformat the DOS disk.  Damage to the MSDOS and possibly the FreeBSD
> > filesystems will result if you use the FS when you receive the warning.
> 
> Erm, I don't think so. This problem was experienced with a freshly
> formatted DOS partition on a clean disk. FIPS has never darkened my disks.
[ ...]

The logic that causes a

    Root partition is not a multiple of the clustersize in length

warning to be issued is bogus.

A standard hard disk root directory (whether the DOS FS is large
or small) has 512 entries.  Each entry is 32 bytes, which gives a
root directory size of 16K.  If your cluster size is <= 16K, you
don't get the message; if your cluster size is > 16K, you do get
the message.  In itself, the message means nothing.  There is
nothing wrong with having a cluster size that "mismatches" the size
of your root directory.  The msdosfs can handle this.

In FreeBSD 2.1 and below, a problem that caused corruption when
using the msdosfs was that the VFS layer was not equipped to handle
FS blocks (eg. DOS FS clusters) exceeding 16K.  This limitation
was eliminated in the 2.2 releases (by setting MAXBSIZE to 65536
in /usr/src/sys/sys/param.h).

The msdosfs and the VFS are two separate bodies of code that work
at different levels.  By pure coincidence, the root directory limit
and the 2.1 VFS limit were both 16K.  So, in 2.1, by testing for
something that didn't matter, the warning was actually useful,
because it alerted users to something that did (in a round about
way).

In FreeBSD 2.2, the 16K<->16K coincidence is removed.  So the warning,
instead of being illogical and useful, is illogical and pointless
and may be ignored.

However, if you are running FreeBSD 2.1 or below, Doug's warning
should be taken seriously.

-- 
Robert Nordier



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711211417.QAA04013>