Jetson TX2 RAID

I need to use RAID to my nvidia jetson tx2 server machine. I started from webmin for make RAID configuration I gor this error;

The kernel RAID status file /proc/mdstat does not exist on your system. Your kernel probably does not support RAID.

After, I tried install mdadm to my ubuntu server machihe and I got this error;

:~$ sudo apt-get install -y mdadm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libckyapplet1 libnss3-tools
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  default-mta | mail-transport-agent dracut-core
The following NEW packages will be installed:
  mdadm
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 370 kB of archives.
After this operation, 1.155 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 mdadm arm64 4.1~rc1-3~ubuntu18.04.4 [370 kB]
Fetched 370 kB in 1s (335 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package mdadm.
(Reading database ... 241212 files and directories currently installed.)
Preparing to unpack .../mdadm_4.1~rc1-3~ubuntu18.04.4_arm64.deb ...
Unpacking mdadm (4.1~rc1-3~ubuntu18.04.4) ...
Setting up mdadm (4.1~rc1-3~ubuntu18.04.4) ...
W: mdadm: failed to load MD subsystem.
Generating mdadm.conf... done (failed to scan arrays; /proc probably not mounted).
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for systemd (237-3ubuntu10.52) ...
Processing triggers for initramfs-tools (0.130ubuntu3.13) ...
update-initramfs: Generating /boot/initrd.img-4.9.253-tegra
Warning: couldn't identify filesystem type for fsck hook, ignoring.
I: The initramfs will attempt to resume from /dev/zram5
I: (UUID=b5226fac-8043-4ed0-8b4a-e0ec66e971f7)
I: Set the RESUME variable to override this.
W: mkconf: MD subsystem is not loaded, thus I cannot scan for arrays.
W: mdadm: failed to auto-generate temporary mdadm.conf file.
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/aarch64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/aarch64-linux-gnu_GL.conf: No such file or directory

What can I do for RAID, Does TX2 supports RAID?

Nvidia Jetson TX2
Ubuntu 18.04 LTS
Kernel 4.9.125-tegra

The file “/proc/mdstat” would be the result of a kernel feature or driver. Those pseudo files in “/proc” are not real files, and are instead the result of a kernel feature pretending to be a file.

Basically the software you install with apt would need to make certain “system calls” through that file. So you need the software, but you also need the kernel feature/driver. This is not a case of Jetsons or Linux supporting or not supporting RAID as this is simply a case for all of Linux to make sure the kernel feature is installed.

Mostly this is the same on a Jetson as it is on any other Linux, but there can be some changes to correctly installing a new kernel (can be risky if not done correctly) or kernel module (very little risk, easy to do) on a Jetson versus a desktop PC. Not all features or drivers can be in the form of a module, but many can. The trick is to now identify which feature needs to be enabled in the kernel.

Different RAID features might require different kernel features (don’t know). To see the name of all features with “RAID” in their name on the running system:
zcat /proc/config.gz | grep 'RAID'

The features which are either “=m” or “=y” are installed. The rest of those could be installed (lines starting with a hash mark ‘#’ are neutralized and are comments). It comes down to finding out which you need. Quite often a desktop PC will have all of those available as a module which loads only when needed, but in an embedded system disk space can be at a premium and it won’t make available every little feature without the user getting involved.

Which RAID mode are you interested in? I ask because different modes might require different features.

Thanks for informations, I interesing with RAID 6. I think this RAID mode enought NAS file syetem. Which steps should I follow?

I’ve not seen anyone actually using RAID 6 mode before. Some of the documentation is questionable since it might be looking at a different kernel release, but what do you see from this (which tests for symbols in the running kernel):
zcat /proc/config.gz | egrep -i '(config_blk_dev_md|config_experimental|raid6)'

On one Ubuntu release of a TX2 I see:

# CONFIG_BLK_DEV_MD is not set
CONFIG_RAID6_PQ=m

I think probably CONFIG_BLK_DEV_MD needs to be added, but I don’t know for sure. I would think that it would not be possible to configure for CONFIG_RAID6_PQ if a prerequisite were missing and if using a proper config tool instead of directly editing the .config file (and the kernels I am looking at are stock from NVIDIA, so they would have used a valid config tool).

It is possible though that if you have the raid6_pq module perhaps inserting the module is all you’d have to do (normally I would have expected the need for the module to be automatically determined, but try manual insert). You should find the model “raid6_pq.ko” (which is from building kernel symbol “CONFIG_RAID6_PQ” as “=m”) at:
/lib/modules/$(uname -r)/kernel/lib/raid6/raid6_pq.ko

If you cd to that location, and run this command, what happens?
sudo insmod ./raid6_pq.ko

Once that is done you should see raid6_pq in the “lsmod” output. If this is correct, then you might try your RAID6 commands again. If only that feature was missing, then it might work without further effort.

Output

# CONFIG_BLK_DEV is not set

CONGIF_RAID6_PQ=m 

Output of sudo insmod ./RAID6_PQ=m

insmod: ERROR:  could not load module ./RAID6_PQ=m : No such file or directory

I checked again i can see mdadm on my tx2, but mdstat is not avaiable.

RAID6 is not an absolute requirement for me. RAID5 was recommended for NAS systems in a research I did. RAID6 is more reliable but rather slow if there is no hardware.
RAID5 looks fine to me as well. @linuxdev

Try:

sudo modprobe raid6_pq

# Or
sudo insmod /lib/modules/4.9.253-tegra/kernel/lib/raid6/raid6_pq.ko

Basically what @Honey_Patouceul says, but rephrased: You have to either name the specific file, e.g., be in that directory and provide the file name via “./raid6_pq.ko”, or from somewhere else name the full path, e.g., the “sudo insmod /lib/modules/4.9.253-tegra/kernel/lib/raid6/raid6_pq.ko” command using full path, or else use a program which knows how to search for module files (and that is what the “sudo modprobe raid6_pq” is…it searches for and loads files of a given symbol instead of naming the file name verbatim). So the “sudo insmod ./RAID6_PQ=m” is actually an error and won’t do anything since it does not name a file and is not a proper symbol name.

1 Like