Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raid1 container #1460

Closed
Kolesar opened this issue Aug 29, 2017 · 4 comments
Closed

Raid1 container #1460

Kolesar opened this issue Aug 29, 2017 · 4 comments
Labels
enhancement Adaptions and new features needs sponsorship This issue will not get solved on a voluntary base by ReaR upstream. no-issue-activity special hardware or VM The issue depends on non common (virtual) hardware.
Milestone

Comments

@Kolesar
Copy link

Kolesar commented Aug 29, 2017

I have RAID 1 on my environment and I detect one issue in script:
rear/usr/share/rear/layout/save/GNU/Linux/210_raid_layout.sh

Output of mdadm is:

mdadm --misc --detail /dev/md127
/dev/md127:
        Version : imsm
     Raid Level : container
  Total Devices : 2

Working Devices : 2


           UUID : fe5173d0:dfb8783b:b19d7a81:c0715868
  Member Arrays : /dev/md/raid01

    Number   Major   Minor   RaidDevice

       0       8       16        -        /dev/sdb
       1       8        0        -        /dev/sda

As you can see, here we do not have Raid Devices in output and 210_raid_layout.sh break in line 44

let sparedevices=$totaldevices-$ndevices

because variable ndevices is empty.

Easy workaround is adding one if statement before line 44, like:

            if [ -z "$ndevices" ] ; then
                ndevices=0
            fi

But, I guess that command for Raid Level: container should be different.

Note: Command for another block device is OK

mdadm --misc --detail /dev/md126
/dev/md126:
      Container : /dev/md/imsm0, member 0
     Raid Level : raid1
     Array Size : 976759808 (931.51 GiB 1000.20 GB)
  Used Dev Size : 976759940 (931.51 GiB 1000.20 GB)
   Raid Devices : 2
  Total Devices : 2

          State : active 
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0


           UUID : 7e085b05:d8a58ee9:95b5187f:039d725c
    Number   Major   Minor   RaidDevice State
       1       8        0        0      active sync   /dev/sda
       0       8       16        1      active sync   /dev/sdb
@jsmeix jsmeix added enhancement Adaptions and new features minor bug An alternative or workaround exists labels Aug 30, 2017
@jsmeix jsmeix added this to the ReaR future milestone Aug 30, 2017
@jsmeix
Copy link
Member

jsmeix commented Aug 30, 2017

@Kolesar
I have no personal experience with RAID setup
so that I cannot really help here.

In general for issues where you already have a fix
I suggest that you submit a GitHub pull request
with your proposed fix, cf.
http://relax-and-recover.org/development/
and see in particular
https://github.com/rear/rear/wiki/Coding-Style

That code in 210_raid_layout.sh was mainly made in 2011 via
8125ec3
at that time in 21_raid_layout.sh so that this code
might need some general adaptions to keep it up-to-date
plus enhancements for things like "Raid Level: container".

@jsmeix
Copy link
Member

jsmeix commented Nov 9, 2017

See also
#1540 (comment)

@jsmeix jsmeix added needs sponsorship This issue will not get solved on a voluntary base by ReaR upstream. special hardware or VM The issue depends on non common (virtual) hardware. and removed minor bug An alternative or workaround exists labels Nov 9, 2017
@jsmeix
Copy link
Member

jsmeix commented Nov 10, 2017

@Kolesar
I assume you also have the special Intel Matrix RAID hardware, cf.
#1540 (comment)

@github-actions
Copy link

github-actions bot commented Jul 1, 2020

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features needs sponsorship This issue will not get solved on a voluntary base by ReaR upstream. no-issue-activity special hardware or VM The issue depends on non common (virtual) hardware.
Projects
None yet
Development

No branches or pull requests

2 participants