You are not logged in.
Pages: 1
When I run "mdadm --create /dev/md0 --level=0 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1" It tells me that /dev/md0 cannot be found. I have to manually create it with mknod. My question is, should I have to run "mknod -m 0660 /dev/md0 b 9 0" every time I boot to setup my RAID? I'm a little confused here. I was under the assumption that mdadm would create md0 for me automatically.
Offline
/etc/rc.sysinit will handle the creation of md-devices.
Here's a small snippet from /etc/rc.sysinit:
# If necessary, find md devices and manually assemble RAID arrays
if [ -f /etc/mdadm.conf -a "`grep ^ARRAY /etc/mdadm.conf 2>/dev/null`" ]; then
# udev won't create these md nodes, so we do it ourselves
for dev in `grep ^ARRAY /etc/mdadm.conf | awk '{print $2}'`; do
path=`echo $dev | sed 's|/[^/]*$||'`
node=`echo $dev | sed "s|^$path/||"`
minor=`echo $node | sed 's|^[^0-9]*||'`
[ ! -f $path/$node ] && /bin/mknod $path/$node b 9 $minor
done
status "Activating RAID arrays" /sbin/mdadm --assemble --scan
fi
Code should be free and hardware should be cheap.
Offline
yeah looks like your mdadm.conf file isn't set up properly.
here's mine:
# mdadm configuration file
#
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
#
#
# the config file takes two types of lines:
#
# DEVICE lines specify a list of devices of where to look for
# potential member disks
#
# ARRAY lines specify information about how to identify arrays so
# so that they can be activated
#
# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1
#DEVICE /dev/hda1 /dev/hdb1
#
# The designation "partitions" will scan all partitions found in
# /proc/partitions
DEVICE partitions
# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#
# super-minor is usually the minor number of the metadevice
# UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#
# mdadm -D <md>
#
# To capture the UUIDs for all your RAID arrays to this file, run this:
# # mdadm -D --scan >>/etc/mdadm.conf
#
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
#
# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a
# failed drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
#
# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program. To start mdadm's monitor mode, add
# "mdadm" to your DAEMONS array in /etc/rc.conf
#
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld
#PROGRAM /usr/sbin/handle-mdadm-events
DEVICE /dev/sdb1 /dev/sdc1
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=aedf2a81:5e98b88f:d227e108:c2475d33
Offline
I am interesed in this too ... I want to set up my discs raid1...
You guys followed wiki ?
Do not want to reinstall if I do not have too
Thought that mdadm would just mirror my drives or am I wrong (again!)
Mr Green
Offline
so I can run mdadm to mirror drive in raid1 & then alter Lilo/Grub ?
My need to move /media to main drive first (resize partition) but then be ok
Will back up first
Mr Green
Offline
Pages: 1