Thinkcat
Posts: 29
Joined: Wed Mar 14, 2018 10:50 pm
Location: Finland

Current best way to use iSCSI as root disk in 2018?

Mon Mar 26, 2018 10:42 am

Hello

I am trying to set up an iSCSI root. I have looked at the elinux instructions, but I wished that I'd not need to compile a new kernel. Well, there is some kind of iSCSI support, because iscsiadm works right away, but seems like it is compiled as a module. Also, I could not verify this at first, because getting the config from /proc required inserting a module (called configs), and I only found this out later.

I am now going to attempt a kernel compile. But what is the current state of affairs? Will it ever be possible to have a distribution kernel that includes iSCSI? Will I need to always edit the kernel and initrd names into config.txt each time there is an update?

If someone can tell, what are the actual choices, then please do. I will keep on doing tests and if I find out something interesting, I'll share it here.

Would PXE solve all or some of these problems and make easy kernel updates a possibility?

ejolson
Posts: 4030
Joined: Tue Mar 18, 2014 11:47 am

Re: Current best way to use iSCSI as root disk in 2018?

Tue Mar 27, 2018 2:31 am

Thinkcat wrote:
Mon Mar 26, 2018 10:42 am
Hello

I am trying to set up an iSCSI root. I have looked at the elinux instructions, but I wished that I'd not need to compile a new kernel. Well, there is some kind of iSCSI support, because iscsiadm works right away, but seems like it is compiled as a module. Also, I could not verify this at first, because getting the config from /proc required inserting a module (called configs), and I only found this out later.

I am now going to attempt a kernel compile. But what is the current state of affairs? Will it ever be possible to have a distribution kernel that includes iSCSI? Will I need to always edit the kernel and initrd names into config.txt each time there is an update?

If someone can tell, what are the actual choices, then please do. I will keep on doing tests and if I find out something interesting, I'll share it here.

Would PXE solve all or some of these problems and make easy kernel updates a possibility?
I think the standard kernel has iSCSI support complied as a module. You need to load the module, initialize networking, attach the iSCSI drive and then pivot root to the iSCSI drive. All of this could be done by a script which runs from an initial ramdisk. It should also be possible (but likely more difficult due to systemd complexity) to boot directly into the SD card, perform the required steps and then pivot root

solanum
Posts: 13
Joined: Thu Nov 03, 2011 9:54 pm

Re: Current best way to use iSCSI as root disk in 2018?

Sun Apr 01, 2018 5:13 am

If you set up pxe it ends up to be a lot like this:
https://www.raspberrypi.org/documentati ... utorial.md

Most low level developers use this method because it is -easy-. You screw up, and it doesn't boot, no biggie switch kernels, or whatever on the network and reboot. The real difference is pointing the filesystem to the iSCSI device, instead of nfs.

However, I am -guessing- you need to compile iSCSI support into the kernel, because it isn't using an initrd type of image., and the modules are located on the rootfs.

Return to “Advanced users”