* RAID1 problem, newbie to RAID
@ 2003-01-20 23:38 J Dalessandro
2003-01-21 1:03 ` Scott Mcdermott
0 siblings, 1 reply; 3+ messages in thread
From: J Dalessandro @ 2003-01-20 23:38 UTC (permalink / raw)
To: linux-raid
I am trying to get RAID1 working on a Debian machine with a 2.4.20
kernel. I hope I am close, but this is my first attempt at RAID on any
platform.
I seem to get two out of three partitions. I think my problem is in that
my "/" partition is mounted, but I'm new to RAID and I'm not sure how to
fix this issue. Below is my: /proc/mdstat, raidtab, fdisk -l outputs.
What am I missing here to solve my bungled configuration?
CM:~# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hda1[0]
96256 blocks [2/1] [U_]
md1 : active raid1 hda2[0]
9767424 blocks [2/1] [U_]
unused devices: <none>
CM:~# cat /etc/raidtab
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 32
persistent-superblock 1
device /dev/hda3
raid-disk 0
device /dev/hdc3
failed-disk 1
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 32
persistent-superblock 1
device /dev/hda2
raid-disk 0
device /dev/hdc2
failed-disk 1
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 32
persistent-superblock 1
device /dev/hda1
raid-disk 0
device /dev/hdc1
failed-disk 1
CM:~# df -k
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda3 86437648 480844 81565840 1% /
CM:~# fdisk -l
Disk /dev/hdc: 255 heads, 63 sectors, 12161 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 1 12 96358+ fd Linux raid autodetect
/dev/hdc2 13 1228 9767520 fd Linux raid autodetect
/dev/hdc3 1229 12161 87819322+ fd Linux raid autodetect
Disk /dev/hda: 255 heads, 63 sectors, 12161 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 12 96358+ 83 Linux
/dev/hda2 13 1228 9767520 82 Linux swap
/dev/hda3 1229 12161 87819322+ 83 Linux
CM:~#
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RAID1 problem, newbie to RAID
2003-01-20 23:38 RAID1 problem, newbie to RAID J Dalessandro
@ 2003-01-21 1:03 ` Scott Mcdermott
0 siblings, 0 replies; 3+ messages in thread
From: Scott Mcdermott @ 2003-01-21 1:03 UTC (permalink / raw)
To: linux-raid
J Dalessandro on Mon 20/01 16:38 -0700:
> I seem to get two out of three partitions. I think my problem is in
> that my "/" partition is mounted, but I'm new to RAID and I'm not sure
> how to fix this issue.
You can't have the filesystem mounted from the device you want to make
RAID; you have to boot from something else to do it before mounting it.
Also please realize that when you use persistent-superblock 1, mkraid
will use the last 4k (I think that's how much) for MD information,
overwriting filesystem data there, so you have to resize2fs if you have
existing data, before doing the mkraid. If you didn't do this, your FS
is now hosed, but maybe you didn't have any data blocks there (after
all, 4k is usually only one filesystem block) and e2fsck will repair it
without data loss. Using debugfs and dumpe2fs will tell you more
information.
Also, I'm curious why you have the failed disks in your raidtab.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: RAID1 problem, newbie to RAID
@ 2003-01-21 21:57 Cress, Andrew R
0 siblings, 0 replies; 3+ messages in thread
From: Cress, Andrew R @ 2003-01-21 21:57 UTC (permalink / raw)
To: 'J Dalessandro', linux-raid
The way to do this is to build the raid on the second disk, and mark the
first one (where you are currently mounted) as the failed disk in raidtab.
You have the raidtab set to use the first disk as the one to format for
raid, so it is busy.
The steps to build a software RAID from an existing Linux install are
outlined at
http://www.ibiblio.org/pub/Linux/docs/HOWTO/Software-RAID-HOWTO (section
4.12 & ff)
or
http://scsirastools.sourceforge.net/docs/UserGuide (section 4.0)
Andy
-----Original Message-----
From: J Dalessandro [mailto:joe@nan0.com]
Sent: Monday, January 20, 2003 6:39 PM
To: linux-raid@vger.kernel.org
Subject: RAID1 problem, newbie to RAID
I am trying to get RAID1 working on a Debian machine with a 2.4.20
kernel. I hope I am close, but this is my first attempt at RAID on any
platform.
I seem to get two out of three partitions. I think my problem is in that
my "/" partition is mounted, but I'm new to RAID and I'm not sure how to
fix this issue. Below is my: /proc/mdstat, raidtab, fdisk -l outputs.
What am I missing here to solve my bungled configuration?
CM:~# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hda1[0]
96256 blocks [2/1] [U_]
md1 : active raid1 hda2[0]
9767424 blocks [2/1] [U_]
unused devices: <none>
CM:~# cat /etc/raidtab
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 32
persistent-superblock 1
device /dev/hda3
raid-disk 0
device /dev/hdc3
failed-disk 1
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 32
persistent-superblock 1
device /dev/hda2
raid-disk 0
device /dev/hdc2
failed-disk 1
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 32
persistent-superblock 1
device /dev/hda1
raid-disk 0
device /dev/hdc1
failed-disk 1
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-21 21:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 23:38 RAID1 problem, newbie to RAID J Dalessandro
2003-01-21 1:03 ` Scott Mcdermott
-- strict thread matches above, loose matches on Subject: below --
2003-01-21 21:57 Cress, Andrew R
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).