Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2009 16:16:25 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Alexander Best <alexbestms@math.uni-muenster.de>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: strange newfs results
Message-ID:  <4A325529.5000409@icyb.net.ua>
In-Reply-To: <permail-20090612080837f0889e84000055aa-a_best01@message-id.uni-muenster.de>
References:  <permail-20090612080837f0889e84000055aa-a_best01@message-id.uni-muenster.de>

next in thread | previous in thread | raw e-mail | index | archive | help
on 12/06/2009 11:08 Alexander Best said the following:
> hi there,
> 
> i was surprised to see the following:
> 
> 1. pax -w -f /dev/ad0p2 .
> 2. file -s /dev/ad0p2 -> POSIX tar archive
> 3. newfs -U -L usr /dev/ad0p2
> 4. file -s /dev/ad0p2 -> POSIX tar archive
> 
> mounting/reading/writing ad0p2 however works like one expects from a ufs
> partition. i added a `dd if=/dev/zero of=/dev/ad0p2 bs=1m count=10` between
> step 2 and 3 and now ad0p2 is recognised by `file -s` as "Unix Fast File
> system".
> 
> is this a bug or a feature? i'm running r193846M.

Neither - I wonder why you didn't write the subject as "strange file results" :-)

Did you try pax -r after newfs?

You see, newfs doesn't wipe the whole media, it just writes out the blocks that it
UFS needs, so some (many many) blocks written by pax remain unchanged.

And it's a matter of file's internal tasting order which blocks with "magic" byte
pattern it would detect first.

-- 
Andriy Gapon



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