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

Disk Layout Generation with HP SmartArray with mor than one Logical Drive #455

Closed
wzwei opened this issue Sep 3, 2014 · 12 comments
Closed
Assignees
Labels
bug The code does not do what it is meant to do fixed / solved / done
Milestone

Comments

@wzwei
Copy link
Contributor

wzwei commented Sep 3, 2014

I experienced a bug in the generation of the disk layout file. My tests run on a system with four
disks building two Raid-1 logical drives. As far as I understand the array configuration part in the
recovery step, there should be two "logicaldrive"-Lines in disklayout.conf. Apparently mine has
only one entry:

logicaldrive /dev/sdb 0|B|2 raid=1 drives=1I:1:1,1I:1:2,1I:1:3,1I:1:4, spares= sectors=32 stripesize=256

But it should be like that:

logicaldrive /dev/sda 0|A|1 raid=1 drives=1I:1:1,1I:1:2, spares= sectors=32 stripesize=256
logicaldrive /dev/sdb 0|B|2 raid=1 drives=1I:1:3,1I:1:4, spares= sectors=32 stripesize=256

I had a look at 27_hpraid.layout.sh. The faulty part seems to be the while-loop starting at line 54.

Regards,
Wolfgang

@gdha gdha self-assigned this Sep 4, 2014
@gdha gdha added the bug label Sep 4, 2014
@gdha gdha added this to the Rear v1.17 milestone Sep 4, 2014
@gdha
Copy link
Member

gdha commented Sep 4, 2014

Hi Wolfgang - understood. Could you the hpraid-config.tmp file so it is easier for me to follow?

@wzwei
Copy link
Contributor Author

wzwei commented Sep 4, 2014

hpraid-config.tmp:

,----
| Smart Array P410i in Slot 0 (Embedded)
|
| array A
|
| logicaldrive 1 (279.4 GB, RAID 1, OK)
|
| array B
|
| logicaldrive 2 (279.4 GB, RAID 1, OK)
|
| physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
| physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
| physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
| physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
`----

This is the actual Smartarray config:
,----
| # hpacucli ctrl slot=0 pd all show
|
| Smart Array P410i in Slot 0 (Embedded)
|
| array A
|
| physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
| physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
|
| array B
|
| physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
| physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
|
`----

@wzwei
Copy link
Contributor Author

wzwei commented Oct 2, 2014

Hi Gratien,

any advaneces here?

@gdha
Copy link
Member

gdha commented Oct 6, 2014

@wzwei sorry too busy with other projects (earning money gets priority as with free as beer I cannot make a living :)
Please have a look into the script /usr/share/rear/layout/save/GNU/Linux/27_hpraid_layout.sh which is doing the work in your case. In case you find a bug do not hesitate to propose a pull request.

@wzwei
Copy link
Contributor Author

wzwei commented Oct 6, 2014

Hi Gratien,

gdha notifications@github.com writes:

@wzwei sorry too busy with other projects (earning money gets priority as with free as beer I cannot make a living :)

Same here. Erning money is sometimes very important ;-)

Please have a look into the script
/usr/share/rear/layout/save/GNU/Linux/27_hpraid_layout.sh which is
doing the work in your case. In case you find a bug do not hesitate
to propose a pull request.

I will have look. Let's see what I can do.

Regards,
Wolfgang

@wzwei
Copy link
Contributor Author

wzwei commented Oct 6, 2014

I found the issue. The script generates two listings: one for the logical drives and one for the
physical drives. On a system with more than one logical drives you loose the connection of logical
and physical drives! See the example output from my earlier post.

In my opinion the correct way would be to run "$HPSSACLI ctrl all show config". This command is
mentioned in the script as "the order logicaldrive and array could be wrong". My tests on various
Smart Array Controlles (P400, P410, P420) with different drive configurations showed no problems.

So I would go back to the older version of the script with the command above.

@wzwei
Copy link
Contributor Author

wzwei commented Oct 6, 2014

Investigated on the history of 27_hpraid_layout.sh . Issue #208 introduced the current behavior:

About a year ago hpacucli introduced a different order of arrays and logical drives. I would say
this was a bug in hpacucli! Current versions of hpacucli (9.40.12.0) all show the correct order.

Therefore I ask to change the code back to the way it worked before #208.

@schlomo
Copy link
Member

schlomo commented Oct 6, 2014

If there is a known broken version of hpacucli then IMHO we should maybe
add code to recognize that version and warn the user or even abort ReaR.
Especially if we know that this version leads to recovery problems.

On 6 October 2014 17:58, Wolfgang Zweimueller notifications@github.com
wrote:

Investigated on the history of 27_hpraid_layout.sh . Issue +208 introduced
the current behavior:

About a year ago hpacucli introduced a different order of arrays and
logical drives. I would say
this was a bug in hpacucli! Current versions of hpacucli (9.40.12.0) all
show the correct order.

Therefore I ask to change the code back to the way it worked before #208
#208.


Reply to this email directly or view it on GitHub
#455 (comment).

@gdha
Copy link
Member

gdha commented Oct 7, 2014

@pavoldomin your input is certainly welcome as SME.

@wzwei
Copy link
Contributor Author

wzwei commented Oct 7, 2014

The release notes of hpacucli show nothing about fixed bugs. Maybe @pavoldomin can check his setup with a current version of hpacucli.

Another note: It seems that HP supports both hpacucli and hpssacli! I am able to install both tools
from the same source (http://downloads.linux.hp.com/SDR/repo/spp/RedHatEnterpriseServer/). But
hpssacli delivers a bit more information than hpacucli. Nothing to worry now.

@pavoldomin
Copy link
Contributor

Hi,

I agree with @wzwei it was hpacucli bug and I agree with @schlomo, the code should parse the output correctly regardless the hpacucli version. Did a small survey here; seems that only hpacucli version 9.30.15.0 suffers by the bug. Older as well as newer versions print the ctrl config correctly.

Simple condition like:

   if //"command" is hpacucli// && hpacucli version | grep -q '9.30.15'; then //current parsing code//
   else //old parsing code//

should do it. I can pull a patch myself, but not soon, October does not look realistic :(

@wzwei: hpacucli is obsolete, replaced by hpssacli in the Sept. 2013 HP SPP.

gdha added a commit that referenced this issue Nov 5, 2014
Bad code for other versions of hpacucli was introduced by issue #208
@gdha
Copy link
Member

gdha commented Feb 16, 2015

added to the release notes so we can close this issue

@gdha gdha closed this as completed Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code does not do what it is meant to do fixed / solved / done
Projects
None yet
Development

No branches or pull requests

4 participants