0

I partially know the answer to this question; I "know" SATA-disks uses the path /dev/sdaX while the nvme uses /dev/nvmeX. Is the path to the disk different when RAID is enabled through BIOS?

Reason I'm asking is beucase: How can I know path to the disk (device) I want to partition (using PXE) without turning on the machine in advance?

New contributor
N. J is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0
0

Unfortunately there are many possible paths. Depending on how the RAID is implemented, there might be:

  • a legacy naming style unique to particular RAID controller series, like /dev/cciss/* for old Compaq/HP SmartArray hardware RAID controllers
  • several different variants managed by dmraid for various BIOS-RAID firmware/software RAID implementations
  • regular /dev/sd* naming style for some hardware RAID controllers and non-RAID storage controllers
  • /dev/nvmeXnY naming scheme for NVMe devices, where X = NVMe device number and Y = NVMe namespace number (usually always 1 unless some big enterprise NVMe setup)
  • no disks visible at all (!) if there is an unconfigured true hardware RAID controller

This is why configuration control is important for large deployments. Usually, you wouldn't start mass PXE deployments of a new model until you had tested that specific model with the expected configuration and worked out its quirks.

Once you gain experience with a particular vendor's hardware, you may eventually be able to make good estimates on how a previously-unknown model is likely to behave based on how that vendor normally sets things up, but without knowing anything about the hardware you'll be PXE booting, there is no universal answers to be had.

Some hardware RAID controllers might automatically set up a sensible default RAID configuration if up to two unused (or totally wiped) disks are plugged in and there is no existing RAID configuration, to ease PXE mass deployments.

Others might require confirmation on pressing a particular key at boot to set a default RAID configuration (since setting a default RAID configuration can be a destructive action if the disks aren't in fact empty). Yet some hardware RAID controllers might require running a RAID configuration tool before you can PXE boot an OS installer. If there is a scriptable version of the RAID configuration tool available, you might be able to integrate it into your PXE deployment process.

3
  • Your answer is related to my question when it comes to path and practice, which is why it should be accepted. However, any experience with Intel RST and Linux @telcoM ?
    – N. J
    Nov 24 at 12:32
  • A little bit. If I recall correctly, the naming scheme would be /dev/mapper/isw_<alphabet-soup>_Volume<X> for logical disks of a particular RAID set, and /dev/mapper/isw_<alphabet-soup>_Volume<X>p<Y> for partitions of RAID sets. <alphabet-soup> would be a RAID set unique identifier encoded as a series of printable letters, determined when the RAID set was initialized. At my workplace, the default policy is to have real hardware RAID controllers on Linux systems; if we can't have that for whatever reason, we'd rather use mdadm-based software RAID.
    – telcoM
    Nov 24 at 13:54
  • Intel RST would be managed with dmraid in Linux, and it's essentially a FRAID: a firmware-configurable software RAID, with potential to some hardware assist in some system configurations and with special (often binary-only) drivers. The cheap option.
    – telcoM
    Nov 24 at 14:06
0

fdisk -l or lsblk should tell you what storage the o/s knows about. If the o/s does not see them, then it could be because it has no drivers for them.

7
  • I tried a manual installation and received the following: Block probing did not discover any disks
    – N. J
    Nov 24 at 10:50
  • Then you have to look for drivers. Some details would help.
    – Bib
    Nov 24 at 10:52
  • I haven't found much more information other than bugs.launchpad.net/ubuntu/+source/casper/+bug/684280, and that lsblk -l only shows loop0 to loop7 ```
    – N. J
    Nov 24 at 12:01
  • You need to tell us what the hardware is. Without that, no one can help you.
    – Bib
    Nov 24 at 12:03
  • All the PCs from the uni is optiplex 7090
    – N. J
    Nov 24 at 12:23
0

How can I know path to the disk (device) I want to partition (using PXE) without turning on the machine in advance?

I can't speak for other linux, but for RHEL 7 there is

/dev/disk/by-id/
/dev/disk/by-label/
/dev/disk/by-partlabel/
/dev/disk/by-partuuid/
/dev/disk/by-path/
/dev/disk/by-uuid/

Without turning the machine on, if you use by-label then you should be able to do it. For example my server has an Dell PERC raid controller, raid-5 of 6 disks, and in the raid controller I made that volume label data.

Therefore /dev/disk/by-label/data is a link to /dev/sdb1 in my case. But for doing anything I can reliably I can reference /dev/disk/by-label/data to access that disk (or volume) which is behind a hardware raid controller, where I have labeled it that using the raid controller. If you have labeled multiple disks with the same label syntax, don't do that that's bad and will obviously be problematic if you wish to reference by-label.

If you explore the other options, you may be able to understand and forecast the syntax of the disk

Under by-id I see on my system entries such as wwn-0x62cea7f048bd6b0028133956b9cd56d5-part3 -> ../../sda3 where sda3 is my 1 operating system disk as JBOD and is my / partition mount of linux.

Recognizing wwn = world wide number, which is usually printed on the label on the disk, you could reference that before turning on your computer and then know the syntax of how to reference the disk.

Is path to disk (/dev/mydisk) different from SATA, SSD, NVME or RAID?

yes, a listing of my /dev/disk/by-path on my rhel7 server shows

pci-0000:db:00.0-scsi-0:2:0:0@        pci-0000:db:00.0-scsi-0:2:0:0-part3@
pci-0000:db:00.0-scsi-0:2:0:0-part1@  pci-0000:db:00.0-scsi-0:2:1:0@
pci-0000:db:00.0-scsi-0:2:0:0-part2@  pci-0000:db:00.0-scsi-0:2:1:0-part1@

The path to every disk will be different, it has to be even if they are all sata or all nvme or whatever.

When you said I "know" SATA-disks uses the path /dev/sdaX while the nvme uses /dev/nvmeX

that location of /dev/sd? is the actual block device that you reference. To find out what a given sd?? refers to, reference all the links under /dev/disks/ to understand. And there is no reason you must use /dev/sda1 for example, you can reference any of the links under /dev/disk/by-whatever that fits your needs.

2
  • Thank you for you answer, @ron. (wish multiple questions could've been accepted. You give me new perspective and new tools to use with disks. Reason why I'm asking for "knowing" path to disk on before-hand is because: cloud-init requires path: /dev/MyDisk in order to partition it.
    – N. J
    Nov 25 at 11:07
  • for what its worth... if it is the one and only disk in the system then you can be reasonably sure it will always be sda.
    – ron
    Nov 26 at 1:33

Your Answer

N. J is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.