Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
4,600 Views

NUC6i7KYK RAID 0 Linux How-To (Ubuntu) (WIP)

Jump to solution

I have been able to get the RAID array set up and running in Windows, which got great results.

But when I try and set it up in Linux (Ubuntu 16.04) it doesn't see the array or the drives.

Here's how to trick it - it's fairly similar to what I did with a Xeon E3 configuration too.

1) Go into BIOS, set it to RAID and redirect m.2 to SATA. Reboot and go back into BIOS.

2) In that same section you'll see a new tab that gets you into the IRST settings and will let you create the array.

I normally reboot one more time back into BIOS for good measure after this, may be overkill.

3) Go back, turn off the redirects. Leave it in RAID mode.

I did the next steps using Ubuntu 16.04 amd64 install ISO.

4) Boot to "Try Without Installing"

5) Connect to internet.

6) Open terminal, type in "sudo apt-get install mdadm" and press ENTER.

7) After it installs type in "sudo mdadm --assemble --scan" and press ENTER.

If you have done everything right the array assembles and everything looks good to continue the installation... and that's where I'm currently stuck.

I'm still running into issues with formatting after this so will update as I get past this point.

Current error is when it tries to make an EXT4 parition on it. Swap and EFI created just fine.

Here's what comes up in dmesg:

  1. EXT4-fs (md126p2): VFS: Can't find ext4 filesystem
  2. [ 146.074689] EXT4-fs (md126p2): VFS: Can't find ext4 filesystem
  3. [ 146.075716] EXT4-fs (md126p2): VFS: Can't find ext4 filesystem
  4. [ 146.076745] FAT-fs (md126p2): bogus number of reserved sectors
  5. [ 146.076748] FAT-fs (md126p2): Can't find a valid FAT filesystem
  6. [ 146.084329] squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on md126p2
  7. [ 146.087554] XFS (md126p2): Invalid superblock magic number
  8. [ 146.088566] FAT-fs (md126p2): bogus number of reserved sectors
  9. [ 146.088569] FAT-fs (md126p2): Can't find a valid FAT filesystem
  10. [ 146.091191] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device md126p2.
  11. [ 146.095038] hfsplus: unable to find HFS+ superblock
  12. [ 146.096302] qnx4: no qnx4 filesystem (no root dir).
  13. [ 146.097419] ufs: You didn't specify the type of your ufs filesystem
  14. mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
  15. >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old</span>
  16. [ 146.097467] ufs: ufs_fill_super(): bad magic number
  17. [ 146.098568] hfs: can't find a HFS filesystem on dev md126p2
0 Kudos

Accepted Solutions
Highlighted
New Contributor I
254 Views

Follow-up: The easiest way to do this that I have found is as follows:

1) In BIOS keep in AHCI mode.

2) Install Ubuntu on one NVMe. Use the default options, leave as-is. We'll adjust later.

3) After install, reboot back into USB and open gparted. Resize your / and linux-swap as you desire. I set / to 64GB and linux-swap to 16GB. I leave the rest unformatted for now.

4) Configure the second NVMe. For simplicity sake I just mirrored what was on the other and don't use the second / or EFI partition. I do enable the swap though.

5) Boot into installed Ubuntu.

6) sudo apt-get install gparted mdadm, then go into gparted. Make both unformatted ext4 (make sure they are the same size) and then exit.

7) I used the following to create the RAID parition:

sudo mdadm -C /dev/md0 --level=stripe -n 2 -c 512

sudo mkfs.ext4 -E nodiscard /dev/md0

8) Use disks to update fstab, adjust manually as necessary.

There you go! I'll note any further updates as I get them but so far so good.

View solution in original post

0 Kudos
15 Replies
Highlighted
New Contributor I
254 Views

More notes:

Ideally I'd like this to work like Windows but it isn't.

RAID & redirect (like in Windows) makes neither drive available.

RAID & no redirect OR AHCI shows the m.2 separately and then I can mdadm to assemble.

Will write the bootloader partition at beginning, swap at end. ext4 in the middle is where it always gets stuck.

 

Tried manually doing the whole drive as ext4 using mkfs.ext4 in terminal.

This started to make progress, then I walked away and screen went off. Couldn't get to come back on without a reboot.

So short of some new ideas here I'm grasping at straws in trying to keep this alive.

Nothing more in /var/log files, including dmesg, that would offer any clues as to what's causing this.

I tried manually creating the RAID array and that works but still locks up on partition creation.

Appreciate any advice out there.

0 Kudos
Highlighted
Valued Contributor I
254 Views

You may want to read the white paper on IRST technology in Linux http://www.intel.com/content/www/us/en/intelligent-systems/software/rst-linux-paper.html Intel® Rapid Storage Technology in Linux* you'll see there are some limitations in Linux as opposed to the Windows platform where this has been working for years.

Take note of the section on: Comparison of "DM RAID and MD RAID".

It seems dmraid and thus dmadm has been deprecated and mdraid with the mdadm command replaced it.

I see you still use dmadm?

Highlighted
Beginner
254 Views

I don't have a NUC6i7KYK yet, but have planed to create a RAID-1 and install Ubuntu 16.04 as well.

Which m.2 cards do you use and are they sata or nvme?

With redirection enabled are there no /dev/sd* or /dev/nvme* devices visible?

Have you tried to format with another filesystem, like f2fs (needs /boot as separate partition with supported filesystem for GRUB)?

You could also directly ask the Intel software developers via mailto:linux-raid@vger.kernel.org linux-raid@vger.kernel.org. Read via https://marc.info/?l=linux-raid https://marc.info/?l=linux-raid

0 Kudos
Highlighted
New Contributor I
254 Views

hegenious wrote:

It seems dmraid and thus dmadm has been deprecated and mdraid with the mdadm command replaced it.

I see you still use dmadm?

I'm using mdadm as the white paper suggested. It finds and sets up the container and volume properly.

0 Kudos
Highlighted
New Contributor I
254 Views

Tobias,

I'm using 2 Samsung 950 Pro 512GB.

With redirection enabled, correct - neither appear. Without redirection they appear as /dev/nvme* and after mdadm --assemble --sync the volume (/dev/md126) and container (/dev/md127) appear.

I am testing mkfs.ext4 again now and so far it's slogging on discarding blocks. Never seen performance this slow.

I've tried a few other things, like installing to a USB stick - no dice. GRUB won't install to it, even my VisionTek PocketSSD that comes up as /dev/sd*

May try a SD card and see if I can get it to stick there for booting and work on the RAID symlinked to ~.

0 Kudos
Highlighted
Beginner
254 Views

From the Intel Linux NVMe Driver Reference Guide for Developers:

http://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guid... http://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guid...

Maybe discard is now default in Ubuntu 16.04, make sure to create the filesystem with

mkfs.ext4 -E nodiscard /dev/DEVICE

Could you also try to create the container and raid volume manually (on slide 26 onwards):

http://de.slideshare.net/LarryCover/handson-lab-how-to-unleash-your-storage-performance-by-using-nvm... http://de.slideshare.net/LarryCover/handson-lab-how-to-unleash-your-storage-performance-by-using-nvm...

0 Kudos
Highlighted
New Contributor I
254 Views

Tobias,

Confirmed that mkfs.ext4 -E nodiscard worked!

Now I think I think I'm going to follow those slides next so that I have space on the drive outside the RAID for GRUB and / and then will try to mount the RAID volume to somewhere like /home or symlink into ~.

Will keep everyone updated!

0 Kudos
Highlighted
Beginner
254 Views

Have you tried to install GRUB on to the RAID volume?

Intel RST should assembles the drives to one or more visible volumes before Linux starts.

Creating one volume stretching the whole container with a GPT should be enough to install GRUB on it.

0 Kudos
Highlighted
New Contributor I
254 Views

Tobias,

Kept running into issues installing GRUB on the raid volume - fatal error, even if I made a separate 1 MB BIOS partition for GRUB.

Current workaround was disabling PCI-E slots to install Ubuntu to USB (VisionTek PocketSSD), then assemble the raid and symlink to home folder.

That has it at least at a point where I can start testing.

I'm a bit concerned this method is going to experience quite a performance hit but hoping moving ccache and keeping the rest of android build process on the RAID volume will minimize it.

I'll keep working on this and note my results as I get through them.

0 Kudos
Highlighted
Beginner
254 Views

Can you try this:

# https://gist.github.com/umpirsky/6ee1f870e759815333c8 https://gist.github.com/umpirsky/6ee1f870e759815333c8

# http://de.slideshare.net/LarryCover/handson-lab-how-to-unleash-your-storage-performance-by-using-nvm... http://de.slideshare.net/LarryCover/handson-lab-how-to-unleash-your-storage-performance-by-using-nvm...

sudo -s

apt-get -y install mdadm

apt-get -y install grub-efi-amd64

# apt-get -y install grub-efi-amd64-signed

mdadm -C /dev/md/imsm /dev/nvme0n1 /dev/nvme1n1 -n2 -e imsm

mdadm -C /dev/md0 /dev/md/imsm -n 2 -l 0 -c 128

sgdisk -Z /dev/md0

sgdisk -n 1:0:+128M -t 1:ef00 -c 1:"EFI System" /dev/md0

sgdisk -n 2:0:+4G -t 2:8200 -c 2:"Linux swap" /dev/md0

sgdisk -n 3:0:+32G -t 3:8304 -c 3:"Linux x86-64 root" /dev/md0

sgdisk -n 4:0:0 -t 4:8302 -c 4:"Linux /home" /dev/md0

mkfs.fat -n ESP -F 32 /dev/md0p1

mkswap /dev/md0p2

mkfs.ext4 -L "Ubuntu Root" -E nodiscard /dev/md0p3

mkfs.ext4 -L "Ubuntu Home" -E nodiscard /dev/md0p4

ubiquity -b

mount /dev/md0p3 /mnt

mount -o bind /dev /mnt/dev

mount -o bind /dev/pts /mnt/dev/pts

mount -o bind /sys /mnt/sys

mount -o bind /proc /mnt/proc

cat /etc/resolv.conf >> /mnt/etc/resolv.conf

chroot /mnt

nano /etc/grub.d/10_linux

# change quick_boot and quiet_boot to 0

apt-get -y install mdadm

apt-get -y install grub-efi-amd64

# apt-get -y install grub-efi-amd64-signed

update-grub

mount /dev/md0p1 /boot/efi

mkdir /boot/efi/EFI

grub-install --boot-directory=/boot --bootloader-id=Ubuntu --target=x86_64-efi --efi-directory=/boot/efi --recheck

update-grub

exit # from chroot

exit # from sudo -s

reboot

0 Kudos
Highlighted
Community Manager
254 Views

Hi all,

 

 

Garwynn I hope the information on this thread can be helpful you for you.

 

 

While Intel has not tested and validated Intel® NUC with any Linux distributions, I suggests you to check your Linux distro's website and forums at http://www.ubuntu.com/ http://www.ubuntu.com/ for peer assistance with this configuration issue.

 

 

Please see http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-nuc-boards/000005628.html Supported Operating Systems for Intel® NUC Products

 

 

Best wishes,

 

 

Ivan

 

0 Kudos
Highlighted
Community Manager
254 Views

Hi all,

 

 

Garwynn I hope the information on this thread can be helpful you for you.

 

 

While Intel has not tested and validated Intel® NUC with any Linux distributions, I suggests you to check your Linux distro's website and forums at http://www.ubuntu.com/ http://www.ubuntu.com/ for peer assistance with this configuration issue.

 

 

Please see http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-nuc-boards/000005628.html Supported Operating Systems for Intel® NUC Products

 

 

Best wishes,

 

 

Ivan

 

0 Kudos
Highlighted
New Contributor I
254 Views

Hi all. Just an update that I did get it working and - probably because it's not using the RAID controller - did not get any boost in performance in RAID0, like I did in Windows.

But thank you all for your help!

0 Kudos
Highlighted
New Contributor I
255 Views

Follow-up: The easiest way to do this that I have found is as follows:

1) In BIOS keep in AHCI mode.

2) Install Ubuntu on one NVMe. Use the default options, leave as-is. We'll adjust later.

3) After install, reboot back into USB and open gparted. Resize your / and linux-swap as you desire. I set / to 64GB and linux-swap to 16GB. I leave the rest unformatted for now.

4) Configure the second NVMe. For simplicity sake I just mirrored what was on the other and don't use the second / or EFI partition. I do enable the swap though.

5) Boot into installed Ubuntu.

6) sudo apt-get install gparted mdadm, then go into gparted. Make both unformatted ext4 (make sure they are the same size) and then exit.

7) I used the following to create the RAID parition:

sudo mdadm -C /dev/md0 --level=stripe -n 2 -c 512

sudo mkfs.ext4 -E nodiscard /dev/md0

8) Use disks to update fstab, adjust manually as necessary.

There you go! I'll note any further updates as I get them but so far so good.

View solution in original post

0 Kudos
Highlighted
Community Manager
254 Views

Thank you all for sharing this valuable information, I hope this can help other to solve issues like this.

 

 

Best wishes,

 

 

Ivan

 

0 Kudos