1 Rookie
•
7 Posts
0
59
PERC h755 disk order in Linux
Dear fellow Dell users,
[tl;dr]
At this moment, my question is: How can I make sure the Virtual Disks are shown to the OS in the order they're created?
Or, is there any other way to get the correct partitions on the desired arrays?
Background
I have to install many servers. Any manual action in the installation process should be automated. We have different types of servers, from different manufacturers. Some servers have different types of disks in them and we use the RAID controllers to create arrays (Dell, for example, calls them "Virtual Disks", other manufacturers refer to them as "Logical disks", etc. I call them arrays). Our relational database machines are designed to have three arrays:
- OS+binlogs (SSD storage ~900G)
- DB data (SSD storage ~3,5T)
- Backups (HDD storage ~4T)
Before you ask: the two SSD storages have different kinds of SSD's under them. One is more suitable for write intensive workloads and one more for read intensive workloads.
We use Redfish to create those RAID arrays. I will leave out the details of how we do that, but that works.
The RAID arrays are created in the order as listed above.
The problem
Even though we create the arrays in the order we like them, they're not configured in the desired order. And that order is not predictable. So, if we use /dev/sda, /dev/sdb and /dev/sdc, we may end up with our OS+binlogs volume on the spinning backup disks, while our DB data volume is written on the 900G SSD's and the backups on the SSD's intended for data. (or any variant you can think of).
What I tried to circumvent this:
- The RAID controller assigns ID's to the arrays. For a moment we thought these affected how the controller presented the arrays to the driver. The ID's were assigned in decreasing order, so I created the arrays in opposite order. No luck, obviously.
- Dell seems to support a Firmware Device Order option (which is about the only thing you cannot enable using RedFish!) which promises to address exactly this problem. We tried and proved it's not working.
- I tried to add some code to the early_command script we have. That code could use the /dev/block/sd?/queue/rotational and /dev/block/sd?/size information to determine which disk is for what. I reasoned: the smallest SSD is always for the OS, the biggest for DB data and the rotating one for backups. Sadly, despite writing a beautiful script, the megaraid_sas driver isn't loaded yet so /dev/block is still empty at this stage. I then tried to download a megaraid_sas.ko file to load but that fails as well. (I made sure it's the same kernel as busybox is running on then, but this is were I have not enough knowledge of the process to fix the load issue).
Since I'm stuck at this on the provisioning part, I'm trying to fix this in the Debian Installer at the moment. So, I will post a detailed version of this in the Debian user forum. The reason I ask here is I still have a vague hope that there is some way we can force a RAID controller to show the arrays to the OS in the order they're created. So, I'm betting on two horses: Fix it from the RAID controller and if that doesn't work: Fix it in the early_command stage of the Debian Installer....
Below some images
DISK | ID | Linux path |
01-OSlogs | 239 | /dev/sda |
02-Data | 238 | /dev/sdc |
03-Backups | 237 | /dev/sdb |
RealBOFH
1 Rookie
1 Rookie
•
7 Posts
0
July 9th, 2024 10:58
I worked around this problem in the Debian installer by using `partman/early_command` instead of `preseed/early_command`, however, I'm still curious to the answer to my original question (How can I make sure the Virtual Disks are shown to the OS in the order they're created?).
DELL-Erman O
Moderator
Moderator
•
2.4K Posts
1
July 5th, 2024 14:40
Hello,
As I understood, you want the disks to show up in a specific order (OS, data, backups) but the controller is like nah, I got my own system. This throws a fit in your server setup because the disks are all jumbled up. According to images it likely shows block device names that might be assigned to VDs in an unpredictable order.
You may creating the disks and give them clear labels (OS, data, backup). This way, even if the order is messed up, you can easily tell which disk is which. And you can check if there recently came up PERC firmware. Since you mentioned using an early command script, make sure it runs at the right point during the boot process. You might also need to manually load the megaraid_sas driver before your script kicks in.
Let's see how our community contributes to it!
RealBOFH
1 Rookie
1 Rookie
•
7 Posts
0
July 5th, 2024 15:02
@DELL-Erman O Thanks for your answer.
I created the Virtual Disks with clear labels, as you can see in the screenshot I attached to the question. However, I never found that name in the block device information in Linux. So, I still can't tell which disk is which. Should I find a way to read the labels in the early command stage, that would absolutely help me fixing this problem.
Yes, nice that you bring that up. So, the early command script is a script that runs in the very early stage of a Debian installer. At this moment I fail to load the megaraid_sas driver in it, I don't yet know why. I asked the Debian Community how to load the driver at that point.
I have a reason why I posted these questions in both this community forum and the Debian forum: From Dell, I would like to learn if there is a way to make the Virtual Disks order predictable. Sadly, the FDO option (see note in my opening post about this) doesn't fix the problem.
From the Debian folks I hope to learn how I can fix this in the early command stage of the Debian Installer.
pjwelsh
1 Rookie
1 Rookie
•
49 Posts
1
July 9th, 2024 16:49
@RealBOFH Sorry, but the general answer will be you won't *always* see them in the order created. The order is derived by many factors and is a major reason to use UUID or labels instead. This is a very long standing situation.
pjwelsh
1 Rookie
1 Rookie
•
49 Posts
1
July 9th, 2024 16:56
I should have noted that the command "blkid" or "lsblk -f" are a couple of several ways to to see disk labels (if any).
RealBOFH
1 Rookie
1 Rookie
•
7 Posts
0
July 10th, 2024 07:17
Thanks @pjwelsh for your explanation.
We could use UUID's in the fstab to mount filesystems (we don't, we use the LVM names), but there is no way to relate the label that we give to a Virtual Disk to the UUID. Same for labels, by the way.
You probably saw the screenshot (of the Virtual Disks in iDRAC webUI) in my opening post? So, I have three Virtual Disks: '01-OSlogs', '02-Data' and '03-Backups'.
Apart from the fact that busybox doesn't have `lsblk` (I'm not sure about `blkid`) build in, those tools do not show the labels we gave them on the controller. Here you see the output of those commands after I installed the server that I also took the screenshot of:
Anyway, as I wrote yesterday, I was able to work around this in a script that I run during the `partman/early_command` stage of the Debian Installer, so for me this problem is solved. Well, not solved, but worked around :).
Thanks to everyone who read the question and special thanks to those who thought with me and answered!
(edited)