On Thu, Mar 31, 2016 at 11:57 PM, Marc Haber <mh+linux-bt...@zugschlus.de> wrote: > On Thu, Mar 31, 2016 at 11:16:30PM +0200, Kai Krakow wrote: >> Am Thu, 31 Mar 2016 23:00:04 +0200 >> schrieb Marc Haber <mh+linux-bt...@zugschlus.de>: >> > I find it somewhere between funny and disturbing that the first call >> > of btrfs check made my kernel log the following: >> > Mar 31 22:45:36 fan kernel: [ 6253.178264] EXT4-fs (dm-31): mounted >> > filesystem with ordered data mode. Opts: (null) Mar 31 22:45:38 fan >> > kernel: [ 6255.361328] BTRFS: device label fanbtr devid 1 transid >> > 67526 /dev/dm-31 >> > >> > No, the filesystem was not converted, it was directly created as >> > btrfs, and no, I didn't try mounting it. >> >> I suggest that your partition contained ext4 before, and you didn't run >> wipefs before running mkfs.btrfs. > > I cryptsetup luksFormat'ted the partition before I mkfs.btrfs'ed it. > That should do a much better job than wipefsing it, shouldnt it?
Not really. The first btrfs super is at 64K. The second at 64M. The third at 256G. While wipefs will remove the magic only on the first, mkfs.btrfs will take care of all three. And luksFormat only overwrites the first 132K of a block device. There's a scant chance of bugs related to previous filesystems not being erased, I think this is more likely when mixing and matching filesystems just because the superblocks for each filesystem aren't in the same location. If you're concerned about traces of previous file systems, then use the dmcrypt device itself, rather than merely using the original block device where merely 132K at the beginning has been overwritten. Everytime you format a device, the resulting dmcrypt logical device is in effect full of completely random data. A new random key is generated each time you use luksFormat, even if you're using the same passphrase. -- Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html