I've been wrestling with setting up a clean Debain server with a Raid-1 software Raid usuing mdadm tools.
I've been searching the internet and these lists over the past couple of days or so and with all of that help, I'm RIGHT there, and I thought it would have been working flawlessly a couple of restarts ago, but alas ...
Everything seemed to be working perfectly before I tried to boot off of my raid-device.
the general idea is /dev/md1 is composed of /dev/hdc1,/dev/hda1 and mapped to /boot
/dev/md3 ---> /dev/hdc3,/hda3 --> /
/dev/md5 ---> /dev/hdc5,/hda5 --> /home
/dev/md6 ---> /dev/hdc6,/hda6 --> /usr
/dev/md7 ---> /dev/hdc7,/hda7 --> /var
/dev/md8 ---> /dev/hdc8,/hda8 --> /tmp
(I'm thinking I don't really need /tmp on raid, but once you got one, might as well go for 'em all!)
so before I changed lilo and my fstab so I could boot of the raid everything was fine, I copied all of my /dev/hdaX partitions to the appropriate /dev/mdX partitions (which only consisted of /dev/hdcX devices to start with). I edited the fstab appropriately to get the /dev/mdX partitions to mount on the appropriate mount points ... once I did that restarted and everything was working fine, I then added the /dev/hda partitions in the array ... they started to sync, I restarted, everything is still fine ... the raid is fully functional with every /dev/mdX device having to active disks in it's raid array, then ...
Once I put the /boot and / into the fold of the /dev/md devices in fstab and lilo.conf, it seems that for some reason the array forgets that the /dev/hda disks are part of the array
a cat /proc/mdstat gives me this:
Personalities : [raid1] [multipath] read_ahead 1024 sectors
md1 : active raid1 hdc1[1]
14976 blocks [2/1] [_U]
md3 : active raid1 hdc3[1]
997824 blocks [2/1] [_U]
md5 : active raid1 hdc5[1]
19580288 blocks [2/1] [_U]
md6 : active raid1 hdc6[1]
14651136 blocks [2/1] [_U]
md7 : active raid1 hdc7[1]
3613568 blocks [2/1] [_U]
md8 : active raid1 hdc8[1]
256896 blocks [2/1] [_U]
so I do a
mdadm /dev/md8 --add /dev/hda8
to put /dev/hda8 back online (my tmp directory, which has the lowest fear factor of messing with/up for me) i check /proc/mdstat .. it shows it's syncing ... and when it finally syncs, it shows that both drives are up and runninig in the raid array (as they should be!):
md8 : active raid1 hda8[0] hdc8[1] 256896 blocks [2/2] [UU]
which looks good .. but everytime I restart, /dev/hda8 drops off of the array!
What's happening?
some debugging info: This is a clean (and minimal?) debian woody install I recompiled the kernel w/ RAID1 support and what not.
When I was copying over my files from my working /dev/hda install I wasn't exactly sure of the best way to copy over all of the files on /dev/hda3 (whch is mounted at /) so I just copied each directory that wasn't on another partition (like /usr, /var, /home, etc) one by one, then I created mount points on / for each of the filesystems to mount there (so I made a dir on my /dev/md3 device for /usr my raid usr partition had a place to mount and so on ... i feel like this may be causing some type of problems, because I'm getting some weird perms errors unless I am root .. for instance, if I log in as my admin user and type vi, i get a perm error like: ex/vi: Error: Unable to create temporary file: Permission denied which I feel like shouldn't happen .. would that have something to do w/ anything at this stage of the game?)
here's my fstab: # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> /dev/md3 / ext2 defaults 0 0 /dev/hda2 none swap sw,pri=1 0 0 /dev/hdc2 none swap sw,pri=1 0 0 proc /proc proc defaults 0 0 /dev/fd0 /floppy auto user,noauto 0 0 /dev/cdrom /cdrom iso9660 ro,user,noauto 0 0 /dev/md1 /boot ext2 defaults 0 0 /dev/md5 /home ext2 defaults 0 0 /dev/md6 /usr ext2 defaults 0 0 /dev/md7 /var ext2 defaults 0 0 /dev/md8 /tmp ext2 defaults 0 0 -------------------------------------------
when I type 'mount', everything seems to be fine: /dev/md3 on / type ext2 (rw) proc on /proc type proc (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/md1 on /boot type ext2 (rw) /dev/md5 on /home type ext2 (rw) /dev/md6 on /usr type ext2 (rw) /dev/md7 on /var type ext2 (rw) /dev/md8 on /tmp type ext2 (rw) --------------------------------------------
lilo.conf lba32 boot=/dev/md1 raid-extra-boot="/dev/hda,/dev/hdc" root=/dev/md3 install=/boot/boot-menu.b map=/boot/map delay=20 prompt timeout = 150 vga=normal default=Linux
image=/vmlinuz label=Linux read-only
image=/vmlinuz.old label=LinuxOLD read-only
-- Steve Lianoglou PagePoint, http://www.pagepoint.com
PagePoint. Web Solutions for Academic Research, Small Business and Non-Profits
510.558.1534 phone 510.588.5455 fax
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]