Re: [Tux3] mkfs.tux3: wiping other fs signatures

Previous thread: [Tux3] Tux3 command interpreter by Daniel Phillips on Monday, September 1, 2008 - 1:15 pm. (4 messages)

Next thread: [Tux3] Time to truncate by Daniel Phillips on Monday, September 1, 2008 - 6:24 pm. (6 messages)
From: Szabolcs Szakacsits
Date: Friday, December 12, 2008 - 7:28 am

Hi,

If it's not done yet then please wipe the beginning and end of the device 
when creating tux3 as the other mkfs utilities do. Not doing so can result 
nasty random mount failures or data corruptions when overwritten FOO file 
system mounted or tried to be mounted as FOO, or a valid tux3 mounted or 
tried to be mounted as FOO after fs type autodetection which is fairly 
undeterministic.

We just had a NTFS corruption report when a user accidentially overwrote 
his NTFS. Thankfully we found the tux3 signature, tux3 mounted fine then 
the user also confirmed he was testing tux3 and formatted the wrong 
partition.

Thanks,
	   Szaka

-- 
NTFS-3G:  http://ntfs-3g.org

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: Daniel Phillips
Date: Monday, September 1, 2008 - 6:15 pm

The last burst of checkins has brought Tux3 to the pointer where it
undeniably acts like a filesystem: one can write files, go away,
come back later and read those files by name.  We can see some of the
hoped for attractiveness starting to emerge: Tux3 clearly does scale
from the very small to the very big at the same time.  We have our
Exabyte file with 4K blocksize and we can also create 64 Petabyte
files using 256 byte blocks.  How cool is that?  Not much chance for
internal fragmentation with 256 byte blocks.

   http://en.wikipedia.org/wiki/Fragmentation_(computer)

I wonder how well Tux3 will perform with 256 byte blocks.  Actually,
I don't really see big problems.  We should probably be working mostly
with tiny blocks in initial development, because little blocks generate
bushy trees, and bushy trees expose boundary conditions much faster
than big blocks.  Which is exactly what we need now if we want to get
stable early.  Plus it helps focus on allocation strategy: more little
blocks means more chances for things to go wrong by fragmentation.
Let's keep that issue front and center throughout the entire course of
Tux3 development.

(When we get closer to the kernel port I will switch to working mainly
with 512 byte blocks, which is the finest granularity supported by
Linux block devices at present.)

Anyway, the question naturally arises: what next?  There are so many
issues remaining, big and small.  Some of the big ones:

  * Atomic Commit - we want to know if Tux3's new forward logging
    strategy is as good as I have boasted, and indeed, does it work
    at all?  And what is the commit algorithm exactly?

  * Versioning - very nearly the entire reason for Tux3 to exist,
    although we are now beginning to see evidence that even as a
    conventional non-versioning filesystem, Tux3 is not without its
    attractions.

  * Coalesce on delete - without this we can still delete files but we
    cannot recover file index blocks, only empty them, not so good.

  * ...
From: Daniel Phillips
Date: Friday, December 12, 2008 - 11:56 am

Set the first 4K and last sector to zero?

Regards,

Daniel

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: OGAWA Hirofumi
Date: Friday, December 12, 2008 - 12:59 pm

Ah, I was forgetting about it. I think, first 1024bytes (FAT, NTFS, and EFI),
and last 64kbytes (EFI, and MD RAID), should be enough. Right?
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: Ph. Marek
Date: Friday, December 12, 2008 - 1:50 pm

Please, let us be on the safe side, and do the first 256k or even 1M each.
FAT stores a backup boot sector, and that is typically in the 11th  
sector, but it can be nearly anywhere else.

So I'd beg for the minimum of 64kB at start at end - and if it doesn't  
cost too much, please 1M.


Regards,

Phil




_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: OGAWA Hirofumi
Date: Friday, December 12, 2008 - 2:24 pm

No, no. We don't need to worry about the backup-boot sector.

The backup-boot sector is pointed by the boot sector (boot->backup_boot
in linux). So, after we zeroed the boot sector, there is no backup-boot
sector anymore.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: Szabolcs Szakacsits
Date: Saturday, December 13, 2008 - 7:33 am

Afair, reiserfs puts signature at 128 kB. NTFS may also have a backup at 
the middle of the volume.

Regards,
	    Szaka

--
NTFS-3G:  http://ntfs-3g.org

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: OGAWA Hirofumi
Date: Saturday, December 13, 2008 - 8:36 am

I see. Well, auto detection is not perfect always, rather it's mess
historically.

However, if zeroed the boot sector is not enough for NTFS, in theory, we
can't detect NTFS even if it's FAT actually?  Because the middle of the
volume may be data block on FAT. So, we can't do anything for it.
Instead, NTFS driver or auto-detect engine have to do something, if it
wants.

Anyway, the solution for auto-detection would change the detection
order, i.e. try to detect tux3 before reiserfs and NTFS.  Because tux3
put superblock at 4096 offset for now, and other blocks can be used for
any purpose.

So I think, mkfs clears first 1024b (or 4096b) and last 64kb, at least
for now, it is enough?

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
From: Daniel Phillips
Date: Friday, December 12, 2008 - 12:38 pm

Done:

   http://hg.tux3.org/tux3/rev/ab8112cf102f

Regards,

Daniel

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
Previous thread: [Tux3] Tux3 command interpreter by Daniel Phillips on Monday, September 1, 2008 - 1:15 pm. (4 messages)

Next thread: [Tux3] Time to truncate by Daniel Phillips on Monday, September 1, 2008 - 6:24 pm. (6 messages)