Results 1 to 11 of 11

Thread: Raid1

  1. #1

    Raid1

    I'm trying to create a RAID1 array on my WL-500gP, but I'm only partly successfull.

    I'm running lastest oleg firmware (1.9.2.7-7f), and I'm using the oleg optware repository.

    My crosscompile environment is VMware running Fedora core 6 (with gcc 3.4 instead of 4.1)



    Steps I've taken :

    - Recompile the firmware, with Multi-device support and RAID1 support enabled as modules.
    (I also had to disable LPRng, otherwise the firmware wouldn't build)

    - copy md.o and raid1.o from the crosscompile pc to /opt/lib/modules on the router

    - Compile mdadm:
    While crosscompiling, 'make mdadm' & 'make mdadm-ipk' both build fine, but installing mdadm_2.6-1_mipsel.ipk on the router fails on a md5-checksum
    While native compiling, 'make mdadm' builds fine, but 'make mdadm-ipk' fails.
    So I manually copied mdadm from optware/builds/mdadm/ to /opt/sbin

    - Load the raid modules:
    insmod /opt/lib/modules/md.o
    insmod /opt/lib/modules/raid1.o

    - for test purposes, I attached a usb-cardreader, with a 128 MB sd-card and a 128 MB cf-card.
    - on both discs I created one partition of 122 MB , type fb (Linux raid autodetect)

    -next step would be the creation of the raid-array:

    mknod /dev/md0 b 9 0
    mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/discs/disc1/part1 /dev/discs/disc3/part1

    However this fails with the error:
    mdadm: ADD_NEW_DISK for /dev/discs/disc1/part1 failed: Invalid argument

    In the systemlog, I get the following messages:
    kernel: md: invalid superblock checksum on scsi/host1/bus0/target0/lun0/part1
    kernel: md: scsi/host1/bus0/target0/lun0/part1 has invalid sb, not importing!
    kernel: md: md_import_device returned -22

    The only raid-array I can create is a legacy array without a superblock:

    mknod /dev/md0 b 9 0
    mdadm --build /dev/md0 --level=1 --raid-devices=2 /dev/discs/disc1/part1 /dev/discs/disc3/part1

    after that, I can see the array being build, using cat /proc/mdstat


    Questions:
    - what could be the reason that i can't build an array with superblocks?
    (could it be that mdadm isn't compatible with the raid modules?)

    - what are the risks when running a mirror without superblocks?

  2. #2
    Join Date
    Jun 2008
    Location
    Moscow, Russia
    Posts
    11

    Thumbs up Solved

    There is a CRC computing function bug in md.c source file.

    This article describes this bug.
    http://linux.derkeiler.com/Mailing-L.../msg03410.html

    Attaches:
    - md.c fixed file
    - compiled kernel modules *.o (place to /opt/lib/modules/2.4.20/kernel/drivers/md)
    Attached Files Attached Files

  3. #3

    Swap, Opt, and Raid 1?

    I recieved my WL-500gP V2 today, and before starting i have some questions:

    I have a 120Gb USB drive and a 1Tb Usb drive (and a 1Gb CF Microdrive) ready to be used.

    Can I:
    - Mirror the 120Gb on to the 1 Tb. (raid 1)
    - Use the remaining capacity from the 1Tb not mirrored (other partition)
    - Do I really need 512Mb swap?
    - Can I use the Microdrive for that?
    - Use the remaing 512Mb for opt? (Should be enough?)
    - Give some compliments to this forum?

  4. #4
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by Sterke-Jerke View Post
    I recieved my WL-500gP V2 today, and before starting i have some questions:

    I have a 120Gb USB drive and a 1Tb Usb drive (and a 1Gb CF Microdrive) ready to be used.

    Can I:
    - Mirror the 120Gb on to the 1 Tb. (raid 1)
    - Use the remaining capacity from the 1Tb not mirrored (other partition)
    - Do I really need 512Mb swap?
    - Can I use the Microdrive for that?
    - Use the remaing 512Mb for opt? (Should be enough?)
    - Give some compliments to this forum?
    you can put it in raid 1

    you won't be able to use the remaining capacity... golden rule of raid is: the lowest capacity is used, the rest is unused.

    swap file is recommended to keep everything smooth

    microdrive and swap don't go together really well, they usually crash after a few hours, or weeks... hdds don't

    512mb for opt is ok, depends on what you want to do with it.

  5. #5
    Hi,

    like wpte said, flash drives are going to wear-out after a given amount of time. Although the performance gain is impressive (mostly due to access-times), you will see strange errors after 4-5-6 months which you can't explain.

    if you have so much storage (1tb) you absolutely need a swap partition for the memory (otherwise the asus can not address all the space).

    If you don't need 'hardware/software' raid settings, put a swap, /opt and data partition on the 120gb. also put a data partition on the 1 tb, and use a scheduled script (cron) to duplicate important data from the 120gb to the 1tb. this way you'll have a second accessible backup.

  6. #6
    Quote Originally Posted by raas View Post
    Hi,

    like wpte said, flash drives are going to wear-out after a given amount of time. Although the performance gain is impressive (mostly due to access-times), you will see strange errors after 4-5-6 months which you can't explain.
    It is a mini harddisk drive (not flash memeory) in a CF casing.
    I there also a limit on its live span?

    PS.

    About the unused diskspace, it is not possible to create a non-mirrored partition then?

  7. #7
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by Sterke-Jerke View Post
    It is a mini harddisk drive (not flash memeory) in a CF casing.
    I there also a limit on its live span?

    PS.

    About the unused diskspace, it is not possible to create a non-mirrored partition then?

    There is always a live span on things... however, a hdd will survive for a couple of years, defenately if you let spin it down

    The problem with raid is, that in the most simple way, 2 hdd's have to write at the same time.
    now to do this, the software will write/read to a driver, wich will split, or simultaneously write or read the drive...
    now when you're doing this, you can't suddenly access some other part of 1 of the 2 disks and access some information...
    with a nice driver it might be possible, however, the chance on harddrive errors will be huge

  8. #8
    Quote Originally Posted by wpte View Post
    you can put it in raid 1

    you won't be able to use the remaining capacity... golden rule of raid is: the lowest capacity is used, the rest is unused.
    If you're using hardware raid1, that golden rule is true.... However in this case, software raid1 is used.

    If you create a 120 GB partition on the 1 TB disk, you can mirror the 120GB partition from disk1 onto the 120GB partition on disk2.

    If both 120 GB partitions are not exactly the same size, then the golden rule kicks back in. (eg 119 mirrored to 120 results in 119)

    Beware though that rebuilding a mirror can take a very long time (because limited usb-speed).

    You should make sure that the mirror gets unmounted nicely in case of a reboot. You should also check different scenarios to see how the mirror holds up... e.g. a sudden lost of power, the spinning down when idle feature on some casings.

  9. #9
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    like I said... probably works bad
    it just sounds dangerous to do, raid isn't really that stable mutch with only 2 disks I think. it works, but you really need to watch carefully what you're doing..
    raid5 works nice tho

  10. #10

    Create RAID 0

    I have a WL500gPV2 with Oleg Firmware - WL500gpv2-1.9.2.7-d-r2710
    I installed MDADM and now I need to load modules md and raid0.
    I downloaded modules from here.

    But now if I try to load them I get this error:
    Code:
    [admin@WL-00221561958C root]$ insmod /opt/lib/modules/md.o
    insmod: unresolved symbol _clear_page
    [admin@WL-00221561958C root]$ insmod /opt/lib/modules/raid0.o
    insmod: ELF file not for this architecture
    [admin@WL-00221561958C root]$ insmod /opt/lib/modules/raid1.o
    insmod: unresolved symbol md_interrupt_thread
    Does this mean I have to recompile them for my CPU (please say no )?

  11. #11
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    uhm... you need new ones for your kernel
    these are compiled for kernel 2.4.20 but the latest 1.9.2.7-d firmware is at kernel 2.4.37.11 right now

    you can also try the 1.9.2.7-rtn firmware for your wl-500gpv2, it has a kernel version 2.6.22.19

Similar Threads

  1. Raid1 (mirroring)... recovery from crash.
    By medsource in forum WL-700g Q&A
    Replies: 3
    Last Post: 20-01-2007, 13:22
  2. External backup drive and streaming media
    By rgrossjr in forum WL-700g Q&A
    Replies: 11
    Last Post: 15-11-2006, 08:39

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •