[SOLVED]Problems with tuning my Raid

  • Hello , thanks for this tuning .


    This is mi Raid
    Number Major Minor RaidDevice State
    0 8 0 0 active sync /dev/sda
    1 8 32 1 active sync /dev/sdc
    2 8 48 2 active sync /dev/sdd
    3 8 16 3 active sync /dev/sdb


    I log in as root in ssh
    sending this command

    Code
    mdadm --create /dev/md0 -e 1.2 -n 4 -c 128k -l 5 -N StorageRAID5 /dev/sda /dev/sdc /dev/sdd missing


    I get an error
    mdadm: invalid chunk/rounding value: 128k


    help me THX

  • Does your raid already exist before you try the mdadm command?


    Your Raid needs to get destroyed before WARNING: ALL DATA WILL BE LOST!!!!


    You need to remove all raid information on the discs with the mdadm --zero-superblock /dev/sda command for every disk.


    BEWARE YOU WILL LOOSE ALL DATA ON THAT DISKS IF YOU CARRY OUT THE ABOVE COMMAND!!!

    Everything is possible, sometimes it requires Google to find out how.

  • Zitat

    Does your raid already exist before you try the mdadm command?


    Yes my raid already exist .


    Zitat

    BEWARE YOU WILL LOOSE ALL DATA ON THAT DISKS IF YOU CARRY OUT THE ABOVE COMMAND!!!


    Thanks for info , I can get the command to destroy my raid?

  • ok I destroyed my raid ,

    Code
    mdadm /dev/md127 --fail /dev/sda --remove /dev/sda


    Code
    mdadm /dev/md127 --fail /dev/sdb --remove /dev/sdb


    Code
    mdadm /dev/md127 --fail /dev/sdc --remove /dev/sdc


    Code
    mdadm /dev/md127 --fail /dev/sdd --remove /dev/sdd


    Now what I do? :?:

  • Now run this command:


    Code
    mdadm --create /dev/md0 -e 1.2 -n 4 -c 128k -l 5 -N StorageRAID5 /dev/sda /dev/sdb /dev/sdc /dev/sdd


    This IS the command to create the RAID. It will also directly kick of the resync. After that you can create LVM or your filesystem however you like it.

    Everything is possible, sometimes it requires Google to find out how.

  • That is exactly what you wanted to achiev ... The raid has already been fully constructed. If you used the command above, it will have the right parameters set.


    You can check with:

    Code
    mdadm --misc --detail /dev/md127


    If everything is right, you should find the line
    Chunk Size : 128K
    like in this output:


    So now skip the mdadm --add command and continue with the tuning

    Everything is possible, sometimes it requires Google to find out how.


  • My Chunk Size is 512K .


    I created the raid 5 via webgui , because when I give the command

    Code
    root@Kymera:~# mdadm --create /dev/md0 -e 1.2 -n 4 -c 128k -l 5 -N Storage /dev/sda /dev/sdb /dev/sdc /dev/sdd
    mdadm: invalid chunk/rounding value: 128k
  • Ah okay, there is a typo in it... sorry for that.


    Please try:

    Code
    mdadm --create /dev/md0 -e 1.2 -n 4 -c 128 -l 5 -N Storage /dev/sda /dev/sdb /dev/sdc /dev/sdd


    I am not sure why I put the k in, but you are right, it does not work with k ... so simply leave it away as -c expects a k value.


    Can you give it a try with that? I then will update the original post to reflect that.

    Everything is possible, sometimes it requires Google to find out how.

  • Thanks SerErris, without k

    Code
    mdadm --create /dev/md0 -e 1.2 -n 4 -c 128 -l 5 -N Storage /dev/sda /dev/sdb /dev/sdc /dev/sdd


    I get this error
    mdadm: super1.x cannot open /dev/sda: Device or resource busy
    mdadm: /dev/sda is not suitable for this array.
    mdadm: super1.x cannot open /dev/sdb: Device or resource busy
    mdadm: /dev/sdb is not suitable for this array.
    mdadm: super1.x cannot open /dev/sdc: Device or resource busy
    mdadm: /dev/sdc is not suitable for this array.
    mdadm: super1.x cannot open /dev/sdd: Device or resource busy
    mdadm: /dev/sdd is not suitable for this array.
    mdadm: create aborted


    My Raid5 is currently active (see my screenshot)

  • Zitat von "SerErris"

    yes of cause ... you need to destroy the raid before (use the gui for that).


    Ok i destroy my Raid , and after

    Code
    mdadm --create /dev/md0 -e 1.2 -n 4 -c 128 -l 5 -N Storage /dev/sda /dev/sdb /dev/sdc /dev/sdd


    mdadm: partition table exists on /dev/sda but will be lost or
    meaningless after creating array
    mdadm: partition table exists on /dev/sdb but will be lost or
    meaningless after creating array
    mdadm: partition table exists on /dev/sdc but will be lost or
    meaningless after creating array
    mdadm: partition table exists on /dev/sdd but will be lost or
    meaningless after creating array
    Continue creating array?
    Continue creating array? (y/n) y
    mdadm: array /dev/md0 started.



    I can now create the file system?

  • yes, you can now create the file system.


    And as I see now, you have partitions on it. It wont hurt, but may confuse that there is a partition and you do not use it. You should not use any partition that is okay, but it is now looking weird.


    However no you can continue with the filesystem. You should not reboot until the reconstruct is done, otherwise it will start again.

    Everything is possible, sometimes it requires Google to find out how.

  • Zitat

    yes, you can now create the file system.


    Yes i created the filesystem .



    Next step

    Code
    tune2fs -E stride=32,stripe-width=96 -Odir_index /dev/mapper/MYUUID

    (what is this ? Odir_index)
    I get this error

    Code
    Can not find a valid superblock for the filesystem.


    Any idea?

  • I am not sure if a space is an issue here.


    Try

    Code
    tune2fs -E stride=32,stripe-width=96 -O dir_index /dev/mapper/MYUUID


    And UUID is NOT the one from the RAID (51ff4b7a:919db2bc:68ed45fd:ae8accda) you need the on from your ext4 filesystem.


    Another question, do you use LVM? If not, the /dev/mapper thing is wrong and you need to find the UUID of the ext4 of your mount device, which would be /dev/mdX.


    Those are the few things that come to my mind.

    Everything is possible, sometimes it requires Google to find out how.

  • Zitat

    Another question, do you use LVM?


    No i do not use LVM


    I found the UUID from my ext4

    Zitat

    /dev/md0: LABEL="StorageRAID5" UUID="fb054e34-b5ed-4f03-b44c-92bb4b507973" TYPE="ext4"


    Code
    tune2fs -E stride=32,stripe-width=96 -O dir_index /dev/mapper/fb054e34-b5ed-4f03-b44c-92bb4b507973


    i get this error

    Code
    tune2fs 1.41.12 (17-May-2010)


    Code
    No such file or directory when opening /dev/mapper/fb054e34-b5ed-4f03-b44c-92bb4b507973


    Code
    Can not find a valid superblock for the filesystem


    my question is I have to continue tuning or I can stop ?if I stop there may be problems of data loss?

  • Yep, the whole thread is using RAID+LVM+Ext4 ... so if you leave LVM away, you then need to use the right device for the tune2fs command as br41n stated.

    Everything is possible, sometimes it requires Google to find out how.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!