linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lem <l3mming@iinet.net.au>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: RAID5 producing fake partition table on single drive
Date: Tue, 29 Aug 2006 17:17:35 +1000	[thread overview]
Message-ID: <1156835855.4404.10.camel@localhost.localdomain> (raw)
In-Reply-To: <17650.26362.445865.67553@cse.unsw.edu.au>

On Mon, 2006-08-28 at 13:46 +1000, Neil Brown wrote: 
> On Monday August 21, l3mming@iinet.net.au wrote:
> > 
> > This is where I'm having a problem - lilo fails due to the bogus
> > partition table, here's the output:
> > 
> > # lilo
> > part_nowrite: read:: Input/output error

> I think maybe lilo needs to be fixed.  If you haven't explicitly told
> it to look at sde, the worst it should do is give a warning.
> Maybe you can put something in lilo.conf to tell it what sort of
> partitions sde does (or doesn't) have so it won't bother looking
> itself?

# lilo -P ignore
part_nowrite: read:: Input/output error

Telling lilo to ignore invalid partition tables doesn't appear to work,
perhaps a bug report needs to be filed here.

> > 
> > The above buffer I/O errors (logical block 1792+) occur as filesystems
> > are being automounted. /dev/sde* doesn't exist in /etc/fstab of course.
> > 
> 
> Do you mount-by-label at all.  In that case mount we look at each
> partition, but it doesn't fail, so not-a-problem.

I do mount by label, yes, and it all works perfectly.

> > 
> > A few questions, searching for the best possible solution. I believe
> > this is worth the effort, else I can't run lilo without disabling the
> > array and removing /dev/sde from the system.
> > 
> > 1. Is it possible to have mdadm or another tool automatically convert
> > the superblocks to v1.1/1.2 (and perhaps create proper partitions)?
> 
> No.  It would require moving all the data on the device.

Bugger. :-(

> > 
> > 2. If number 1 isn't possible, is it possible to convert one drive at a
> > time to have a proper partition table? Like this: Stop array;
> > fdisk /dev/sde, create partition of type fd (entire disk), save
> > partition table; Start array. (then I'd assume mdadm would notice
> > that /dev/sde has changed and possibly start a resync? - if not, and it
> > just works, then great!). If that works, then do every other drive, one
> > at a time.
> 
> When you create a partition table, sde1 will be slightly smaller than
> sde1.  But if it is less than 64K smaller you might be able to do
> something.  mdadm won't notice by itself, but you could tell it.
> 
>  mdadm /dev/md0 --fail /dev/sde
>  mdadm /dev/md0 --remove /dev/sde
>  mdadm --zero-superb lock /dev/sde
>  ##use fdisk to create a single partition
>  mdadm /dev/md0 --add /dev/sde1
>  ## if that works then wait for the resync to complete
>  ## and do the same to other drives.  Then update any
>  ## config files that might be relevant.

I tried doing this, but mdadm complains in the following way:

[output from fdisk after using 'o' to create a new MSDOS partition table]

Disk /dev/sde: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1       30401   244196001   fd  Linux raid autodetect


# mdadm /dev/md0 --add /dev/sde1
mdadm: add new device failed for /dev/sde1 as 5: Invalid argument

from dmesg:

md: sde1 has invalid sb, not importing!
md: md_import_device returned -22

'mdadm --zero-superblock /dev/sde1' does not fix it.

'mdadm /dev/md0 --add /dev/sde' adds the HD back to the array without issue.

I'm having another issue with hard lockups (not even caps-lock light working)
when the array is being accessed and the kernel goes to swap something out (I
think this is what's happening, more observation required). The swap space is
on the system drive (shares a controller with the RAID array - onboard SATA
controller). I'm not sure why this happens.



  reply	other threads:[~2006-08-29  7:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-19 11:40 RAID5 producing fake partition table on single drive Lem
2006-08-21  7:35 ` Neil Brown
2006-08-21  8:03   ` Lem
2006-08-28  3:46     ` Neil Brown
2006-08-29  7:17       ` Lem [this message]
2006-08-21 22:47   ` Doug Ledford
2006-09-04 17:55     ` Bill Davidsen
2006-09-05 16:49       ` Luca Berra
2006-09-10  5:59       ` Lem
2006-09-14 22:42         ` Bill Davidsen
2006-09-15  7:51           ` Lem
2006-09-15  8:29             ` Luca Berra

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=1156835855.4404.10.camel@localhost.localdomain \
    --to=l3mming@iinet.net.au \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).