Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   mdadm on reboot (http://www.linux-archive.org/centos/107511-mdadm-reboot.html)

"drew einhorn" 06-16-2008 03:36 AM

mdadm on reboot
 
Hi,

I'm in the process of trying mdadm for the first time


I've been trying stuff out of tutorials, etc.

At this point I know how to create stripes, and mirrors.

My stripe is automatically restarting on reboot,
but the degraded mirror isn't.

--

Drew Einhorn
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Les Mikesell 06-16-2008 06:09 AM

mdadm on reboot
 
drew einhorn wrote:

Hi,

I'm in the process of trying mdadm for the first time

I've been trying stuff out of tutorials, etc.

At this point I know how to create stripes, and mirrors.

My stripe is automatically restarting on reboot,
but the degraded mirror isn't.


Is the partition type set to FD?

--
Les Mikesell
lesmikesell@gmail.com


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"Theo Band [GreenPeak]" 06-16-2008 06:20 AM

mdadm on reboot
 
drew einhorn wrote:

Hi,

I'm in the process of trying mdadm for the first time

I've been trying stuff out of tutorials, etc.

At this point I know how to create stripes, and mirrors.

My stripe is automatically restarting on reboot,
but the degraded mirror isn't.

Did you create /etc/mdadm.conf ?

echo "DEVICE /dev/sd*" > /etc/mdadm.conf
mdadm --brief --examine /dev/sd* >> /etc/mdadm.conf

Check the raid with
cat /proc/mdstat

It tells you which devices are part of the array.

Finally put the raid flag on the partitions. I'm not sure whether it's
really needed, I just do it:

parted /dev/sda
set 1 raid
set 2 raid
print
1 0.031 101.975 primary ext3 boot, raid
2 101.975 194474.355 primary raid
quit

Theo
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"drew einhorn" 06-16-2008 01:02 PM

mdadm on reboot
 
On Mon, Jun 16, 2008 at 12:09 AM, Les Mikesell <lesmikesell@gmail.com> wrote:

drew einhorn wrote:


Hi,



I'm in the process of trying mdadm for the first time



I've been trying stuff out of tutorials, etc.



At this point I know how to create stripes, and mirrors.



My stripe is automatically restarting on reboot,

but the degraded mirror isn't.




Is the partition type set to FD?




That's the problem, but now I'm having trouble fixing it.

md1 has a single partitions** md1p1

[drew@funGus ~]$ sudo fdisk /dev/md1

The number of cylinders for this disk is set to 244123680.

There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs

** (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/md1: 999.9 GB, 999930593280 bytes
2 heads, 4 sectors/track, 244123680 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

*** Device Boot***** Start******** End***** Blocks** Id* System

/dev/md1p1************** 1** 244123680** 976494718** fd* Linux raid autodetect

Command (m for help): q

but the attempt to create md2 fails:

[drew@funGus ~]$ sudo mdadm -C -ayes /dev/md2 --level=raid1 --raid-devices=2* missing /dev/md1p1

mdadm: Cannot open /dev/md1p1: No such file or directory
mdadm: create aborted

[drew@funGus ~]$ sudo mdadm -C -ayes /dev/md2 --level=raid1 --raid-devices=2* missing /dev/md1p1
mdadm: Cannot open /dev/md1p1: No such file or directory

mdadm: create aborted

Hmm.* That's right.* I does not exist.

[drew@funGus dev]$ ls -l /dev/md*
brw-r----- 1 root disk 9, 0 Jun 16 06:43 /dev/md0
brw-r----- 1 root disk 9, 1 Jun 16 06:46 /dev/md1

brw-r----- 1 root disk 9, 2 Jun 16 06:48 /dev/md2
[drew@funGus dev]$





*




_______________________________________________

CentOS mailing list

CentOS@centos.org

http://lists.centos.org/mailman/listinfo/centos



--
Drew Einhorn
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Stephen Harris 06-16-2008 02:03 PM

mdadm on reboot
 
On Mon, Jun 16, 2008 at 07:02:17AM -0600, drew einhorn wrote:
> On Mon, Jun 16, 2008 at 12:09 AM, Les Mikesell <lesmikesell@gmail.com>
> > Is the partition type set to FD?
> >
> >
> That's the problem, but now I'm having trouble fixing it.
>
> md1 has a single partitions md1p1
>
> [drew@funGus ~]$ sudo fdisk /dev/md1

No; you need to set the partition type of the underlying physical partitions
on /dev/sda or wheverever your data really lives. This is what is
picked up

eg on my machine I have 4 disks in a RAID5 thus:
md3 : active raid5 sdd4[3] sdc3[2] sdb2[1] sda1[0]
1465151808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

So the raw partitions are sda1 sdb2 sdc3 sdd4

If I look at sda:

# fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 60801 488384001 fd Linux raid autodetect


That's where the "fd" needs to be.


--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 07:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.