linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Robinson <john.robinson@anonymous.org.uk>
To: Asdo <asdo@shiftmail.org>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: First raid1 sector gets zeroed at first reboot
Date: Wed, 17 Aug 2011 18:32:05 +0100	[thread overview]
Message-ID: <4E4BFB15.1090200@anonymous.org.uk> (raw)
In-Reply-To: <4E4BF026.8030006@shiftmail.org>

On 17/08/2011 17:45, Asdo wrote:
> On 08/17/11 16:34, John Robinson wrote:
[...]
>> The first sector of a md RAID with metadata 1.0 is in its data area,
>> so there's no way md is writing to this area itself, it's almost
>> certainly the filesystem that's writing it.
> This is an interesting observation then. ("no way" is a bit extreme
> though)

If it did, everybody's filesystems would be getting trashed, and I don't 
think this is happening.

> You are right in the sense that it might have been the
> filesystem that is doing something at the first remount, and not MD. I
> can't be sure it's MD anymore. Still, this is wrong, why should the
> filesystem wipe its own boot sector?
> It's ext3 btw. If no one pops up with an explanation here on linux-raid
> I will also ask there.
>
> I still stand that what I am doing is correct. I am using the partition
> boot sector properly
> http://en.wikipedia.org/wiki/Volume_boot_record

Not all filesystems or other things you might have in a partition 
necessarily support a volume boot record. LVM doesn't. XFS doesn't. md 
doesn't unless you use metadata 1.2. As it happens it can work with md 
if you use metadata 0.9 or 1.0 and a filesystem which does support a 
volume boot record.

ext2/3 supports a volume boot record. The first superblock starts 1K 
into the filesystem. If you are using a 1K block size, the superblock is 
in block 1, so mke2fs won't touch an existing volume boot record. If you 
are using the more likely 4K block size, the superblock is 1K into block 
0, and mke2fs will write zeros to the first 1K.

Once mke2fs has been run, however, I wouldn't expect ext2/3 to overwrite 
the volume boot record, given that the developers bothered to support 
one in the first place, but that's an ext2/3 question.

Cheers,

John.

      reply	other threads:[~2011-08-17 17:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16 17:42 First raid1 sector gets zeroed at first reboot Asdo
2011-08-17 13:43 ` John Robinson
2011-08-17 14:00   ` Asdo
2011-08-17 14:34     ` John Robinson
2011-08-17 16:45       ` Asdo
2011-08-17 17:32         ` John Robinson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E4BFB15.1090200@anonymous.org.uk \
    --to=john.robinson@anonymous.org.uk \
    --cc=asdo@shiftmail.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).