public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Raid 1 problems
@ 2007-10-21 18:08 Arnau Bria
  2007-10-21 18:34 ` Mike Williams
  0 siblings, 1 reply; 10+ messages in thread
From: Arnau Bria @ 2007-10-21 18:08 UTC (permalink / raw
  To: gentoo-user

Hi,

following http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID
and some other docs, I moved my system to RAID 1.
Using gentoo LiveCD, all my config worked fine: I was able to mount md0
and md1 (at this point my only raid devices) and see data.

So after ensuring my raid was sync, I decided to boot to my normal
system, and I found that my system was not able to boot because it said
something about my filesystem in md1, a message like:

The filesystem size (according to the superblock) is 104420 blocks
The physical size of the device is 104320 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

(don't look at block number cause it refers to md0, and original
message was about md1).

So, I decided to set dump/pass option to 0 in my fstab so fs won't be
check at next start.
After that, it booted fine, but I'd like to repair my system, and now,
md0 complains about fs too...

# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hdf3[0]
      8112704 blocks [2/1] [U_]

md0 : active raid1 hdh1[1] hdf1[0]
      104320 blocks [2/2] [UU]

So, anyone could tell what to do for reparing mdX?¿

TIA,
Arnau
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 18:08 [gentoo-user] Raid 1 problems Arnau Bria
@ 2007-10-21 18:34 ` Mike Williams
  2007-10-21 19:29   ` Arnau Bria
  2007-10-22 18:03   ` Arnau Bria
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Williams @ 2007-10-21 18:34 UTC (permalink / raw
  To: gentoo-user

On Sunday 21 October 2007 19:08:21 Arnau Bria wrote:
> Hi,
>
> following http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID
> and some other docs, I moved my system to RAID 1.
> Using gentoo LiveCD, all my config worked fine: I was able to mount md0
> and md1 (at this point my only raid devices) and see data.
>
> So after ensuring my raid was sync, I decided to boot to my normal
> system, and I found that my system was not able to boot because it said
> something about my filesystem in md1, a message like:
>
> The filesystem size (according to the superblock) is 104420 blocks
> The physical size of the device is 104320 blocks
> Either the superblock or the partition table is likely to be corrupt!
> Abort<y>? yes
>
> (don't look at block number cause it refers to md0, and original
> message was about md1).

with /dev/md0 unmounted:

resize2fs -f /dev/md0

> So, I decided to set dump/pass option to 0 in my fstab so fs won't be
> check at next start.
> After that, it booted fine, but I'd like to repair my system, and now,
> md0 complains about fs too...
>
> # cat /proc/mdstat
> Personalities : [raid1]
> md1 : active raid1 hdf3[0]
>       8112704 blocks [2/1] [U_]
>
> md0 : active raid1 hdh1[1] hdf1[0]
>       104320 blocks [2/2] [UU]
>
> So, anyone could tell what to do for reparing mdX?¿

mdadm --manage /dev/md1 --add /dev/hdh3

Then make sure hdh3's partition type is 'fd' raid autodetect.

-- 
Mike Williams
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 18:34 ` Mike Williams
@ 2007-10-21 19:29   ` Arnau Bria
  2007-10-21 19:42     ` Mike Williams
  2007-10-22 18:03   ` Arnau Bria
  1 sibling, 1 reply; 10+ messages in thread
From: Arnau Bria @ 2007-10-21 19:29 UTC (permalink / raw
  To: gentoo-user

On Sun, 21 Oct 2007 19:34:51 +0100
Mike Williams wrote:

> On Sunday 21 October 2007 19:08:21 Arnau Bria wrote:
[...]
> > The filesystem size (according to the superblock) is 104420 blocks
> > The physical size of the device is 104320 blocks
> > Either the superblock or the partition table is likely to be
> > corrupt! Abort<y>? yes
> >
> > (don't look at block number cause it refers to md0, and original
> > message was about md1).
> 
> with /dev/md0 unmounted:
> 
> resize2fs -f /dev/md0

If same thing happens with md1, I suppose I must boot with livecd and
do the same with md1, am I right?


[...] 
> mdadm --manage /dev/md1 --add /dev/hdh3
> 
> Then make sure hdh3's partition type is 'fd' raid autodetect.
Yes it is. 
Thanks a lot.

Cheers,
Arnau
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 19:29   ` Arnau Bria
@ 2007-10-21 19:42     ` Mike Williams
  2007-10-21 20:30       ` Arnau Bria
  2007-10-21 22:00       ` Neil Bothwick
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Williams @ 2007-10-21 19:42 UTC (permalink / raw
  To: gentoo-user

On Sunday 21 October 2007 20:29:47 Arnau Bria wrote:
> > with /dev/md0 unmounted:
> >
> > resize2fs -f /dev/md0
>
> If same thing happens with md1, I suppose I must boot with livecd and
> do the same with md1, am I right?

Yeah, you can't reduce the filesystem online. The RAIDing shrinks the space 
available for the filesystem slightly. I don't know why, but I've had the 
same problem before.

> > mdadm --manage /dev/md1 --add /dev/hdh3
> >
> > Then make sure hdh3's partition type is 'fd' raid autodetect.
>
> Yes it is.
> Thanks a lot.

Was it before, or did mdadm ignore it/kick it out for some reason?
dmesg | grep hdh

-- 
Mike Williams
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 19:42     ` Mike Williams
@ 2007-10-21 20:30       ` Arnau Bria
  2007-10-21 21:03         ` Arnau Bria
  2007-10-21 22:00       ` Neil Bothwick
  1 sibling, 1 reply; 10+ messages in thread
From: Arnau Bria @ 2007-10-21 20:30 UTC (permalink / raw
  To: gentoo-user

On Sun, 21 Oct 2007 20:42:57 +0100
Mike Williams wrote:

> On Sunday 21 October 2007 20:29:47 Arnau Bria wrote:
[...]
> Yeah, you can't reduce the filesystem online. The RAIDing shrinks the
> space available for the filesystem slightly. I don't know why, but
> I've had the same problem before.
thanks for your explanation.

> > > mdadm --manage /dev/md1 --add /dev/hdh3
> > >
> > > Then make sure hdh3's partition type is 'fd' raid autodetect.
> >
> > Yes it is.
> Was it before, or did mdadm ignore it/kick it out for some reason?
> dmesg | grep hdh

hdh: Maxtor 7Y250P0, ATA DISK drive
hdh reduced to Ultra33 mode.
hdh: max request size: 128KiB
hdh: 490234752 sectors (251000 MB) w/7936KiB Cache, CHS=30515/255/63, UDMA(33)
hdh: cache flushes supported
 hdh: hdh1 hdh2 hdh3 hdh4 < hdh5 hdh6 >
md: invalid raid superblock magic on hdh3
md: hdh3 has invalid sb, not importing!


Let me ask you one more thing. I have this device:

md3 : active raid1 hdh6[1]
      98727360 blocks [2/1] [_U]

And I'd like to add hdf6, and then sync but against it (I mean, make
hdf6 "primary" and copy its data to hdh6).

What steps should I follow? 

TIA,
Arnau
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 20:30       ` Arnau Bria
@ 2007-10-21 21:03         ` Arnau Bria
  2007-10-21 21:49           ` Mike Williams
  0 siblings, 1 reply; 10+ messages in thread
From: Arnau Bria @ 2007-10-21 21:03 UTC (permalink / raw
  To: gentoo-user

On Sun, 21 Oct 2007 22:30:51 +0200
Arnau Bria wrote:

[...]
> Let me ask you one more thing. I have this device:
> 
> md3 : active raid1 hdh6[1]
>       98727360 blocks [2/1] [_U]
> 
> And I'd like to add hdf6, and then sync but against it (I mean, make
> hdf6 "primary" and copy its data to hdh6).
I'd removed the array and created again with second drive missing.
now I have:
md3 : active raid1 hdf6[0]
      98727360 blocks [2/1] [U_]

and will sync.

 TIA,
 Arnau
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 21:03         ` Arnau Bria
@ 2007-10-21 21:49           ` Mike Williams
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Williams @ 2007-10-21 21:49 UTC (permalink / raw
  To: gentoo-user

On Sunday 21 October 2007 22:03:23 Arnau Bria wrote:
> > Let me ask you one more thing. I have this device:
> >
> > md3 : active raid1 hdh6[1]
> >       98727360 blocks [2/1] [_U]
> >
> > And I'd like to add hdf6, and then sync but against it (I mean, make
> > hdf6 "primary" and copy its data to hdh6).
>
> I'd removed the array and created again with second drive missing.
> now I have:
> md3 : active raid1 hdf6[0]
>       98727360 blocks [2/1] [U_]
>
> and will sync.

Yeah, that'd work, or you could have created it with both devices, but 
specifing hdf6 *first*:
mdadm -C /dev/md3 -n2 -l1 /dev/hd[fh]6

As for md1, I'm not sure what to make of that.
I'd be a little wary of it, once the array is created/started the superblock 
must be written, so I'm worried about why the kernel thought it wasn't there. 
Probably nothing though, I've had partitions kicked out of arrays before, 
even though they go back in fine.

-- 
Mike Williams
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 19:42     ` Mike Williams
  2007-10-21 20:30       ` Arnau Bria
@ 2007-10-21 22:00       ` Neil Bothwick
  1 sibling, 0 replies; 10+ messages in thread
From: Neil Bothwick @ 2007-10-21 22:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Hello Mike Williams,

> Yeah, you can't reduce the filesystem online. The RAIDing shrinks the
> space available for the filesystem slightly. I don't know why, but I've
> had the same problem before.

The RAID superblock is stored at the end of the partition.


-- 
Neil Bothwick

Puritanism: The haunting fear that someone, somewhere may be happy.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-21 18:34 ` Mike Williams
  2007-10-21 19:29   ` Arnau Bria
@ 2007-10-22 18:03   ` Arnau Bria
  2007-10-22 19:29     ` Arnau Bria
  1 sibling, 1 reply; 10+ messages in thread
From: Arnau Bria @ 2007-10-22 18:03 UTC (permalink / raw
  To: gentoo-user

On Sun, 21 Oct 2007 19:34:51 +0100
Mike Williams wrote:

> On Sunday 21 October 2007 19:08:21 Arnau Bria wrote:
Hi,
[...] 

I'm doing this:
> with /dev/md0 unmounted:
> 
> resize2fs -f /dev/md0
but with md1 and I get this error:

# resize2fs -f /dev/md1
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/md1 to 2028176 (4k) blocks.
resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/md1

Looking google I find some posible solutions, but I'm afraid of losing
data.


*Data is still there:
mount /dev/md1 livecd ~ # mount /dev/md1 kaka
livecd ~ # ls kaka/
bin  boot  dev  etc  home  lib  lost+found  mnt  opt  proc  root  sbin  sys  tmp  usr  var

TIA,
Arnau
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Raid 1 problems
  2007-10-22 18:03   ` Arnau Bria
@ 2007-10-22 19:29     ` Arnau Bria
  0 siblings, 0 replies; 10+ messages in thread
From: Arnau Bria @ 2007-10-22 19:29 UTC (permalink / raw
  To: gentoo-user

On Mon, 22 Oct 2007 20:03:08 +0200
Arnau Bria wrote:

> On Sun, 21 Oct 2007 19:34:51 +0100
> Mike Williams wrote:
> 
> > On Sunday 21 October 2007 19:08:21 Arnau Bria wrote:
> Hi,
> [...] 
> 
> I'm doing this:
> > with /dev/md0 unmounted:
> > 
> > resize2fs -f /dev/md0
> but with md1 and I get this error:
> 
> # resize2fs -f /dev/md1
> resize2fs 1.39 (29-May-2006)
> Resizing the filesystem on /dev/md1 to 2028176 (4k) blocks.
> resize2fs: Attempt to read block from filesystem resulted in short
> read while trying to resize /dev/md1
> 
> Looking google I find some posible solutions, but I'm afraid of losing
> data.
I finally followed:
 http://www.linux.com/base/ldp/howto/Software-RAID-HOWTO-7.htmlt#ss7.6
and after a e2fsck -f /dev/md1, was going to do reseize2fs and I got
this:

livecd ~ # resize2fs -f /dev/md1
Segmentation fault
livecd ~ # ls
Segmentation fault
livecd ~ # pwd
/root
livecd ~ # ls
Segmentation fault
livecd ~ #
livecd ~ #
livecd ~ #
livecd ~ #
livecd ~ #
livecd ~ #
livecd ~ #
livecd ~ #
livecd ~ # init 0
Segmentation fault

looking for my backup :-)

> TIA,
> Arnau
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-10-22 19:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-21 18:08 [gentoo-user] Raid 1 problems Arnau Bria
2007-10-21 18:34 ` Mike Williams
2007-10-21 19:29   ` Arnau Bria
2007-10-21 19:42     ` Mike Williams
2007-10-21 20:30       ` Arnau Bria
2007-10-21 21:03         ` Arnau Bria
2007-10-21 21:49           ` Mike Williams
2007-10-21 22:00       ` Neil Bothwick
2007-10-22 18:03   ` Arnau Bria
2007-10-22 19:29     ` Arnau Bria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox