Subject: Alpine-Linux-Xen 4.12, max_loop=32

From: Helmut <[email-masked]>
Date: Thu, 1 Aug 2019 21:40:58 +0200

Hi,

i use Alpine-Linux-Xen4.12  with kernel 4.19.58-0-vanilla with several
domU's. Now I need more than 8 loop-devices for domU's.

So, I tried to configure max_loop=32. Where i can configure for
permanent usage ?

Any idea?

best regards
Helmut

---

From: PICCORO McKAY Lenz <[email-masked]>
Date: Thu, 1 Aug 2019 20:08:45 -0400

> So, I tried to configure max_loop=32. Where i can configure for

http://qgqlochekone.blogspot.com/2010/10/lopp-management-manejo-de-loops.html

---

From: Helmut <[email-masked]>
Date: Fri, 2 Aug 2019 11:37:58 +0200

Hello,

thx for the link. My actual config is:

/etc/modprobe.d/loop
        options loop max_loop=32

/etc/modprobe.d/xen
        options loop max_loop=32

/boot/extlinux.conf

 APPEND xen.gz dom0_mem=2048M dom0_max_vcpus=2 dom0_vcpus_pin  ---
vmlinuz-vanilla root=UUID=dad93766-6001-4458-a5de-d6ac14007b4c
modules=sd-mod,usb-storage,ext4,loop,xen-pciback nomodeset quiet
rootfstype=ext4 max_loop=32 xen-pciback.hide=(0000:04:01.0) ---
initramfs-vanilla

NO SUCCESS !!

only my manual script has succes:

for i in $(seq 8 32) ;  do mknod /dev/loop$i b 7 $i ;done
chmod 664 /dev/loop*
chown 0.disk /dev/loop*

But I need a permanently configure, did you more idea`s ?

best regards
Helmut

Am 02.08.2019 um 02:08 schrieb PICCORO McKAY Lenz:
>
> El jue., 1 de ago. de 2019 a la(s) 15:39, Helmut ([email-masked]
> <mailto:[email-masked]>) escribió:
>

---

From: PICCORO McKAY Lenz <[email-masked]>
Date: Fri, 2 Aug 2019 12:05:39 -0400

El vie., 2 de ago. de 2019 a la(s) 05:36, Helmut
([email-masked]) escribió:
>  APPEND xen.gz dom0_mem=2048M dom0_max_vcpus=2 dom0_vcpus_pin  --- vmlinuz-vanilla root=UUID=dad93766-6001-4458-a5de-d6ac14007b4c modules=sd-mod,usb-storage,ext4,loop,xen-pciback nomodeset quiet rootfstype=ext4 max_loop=32 xen-pciback.hide=(0000:04:01.0) --- initramfs-vanilla

OH xen vm! so i must do furter investigations.. i'll back with some info.. later

> El jue., 1 de ago. de 2019 a la(s) 15:39, Helmut ([email-masked]) escribió:
>>

---

From: Helmut <[email-masked]>
Date: Tue, 6 Aug 2019 13:59:15 +0200

Hello,

do you have a solution for my problem with Alpine-Linux-Xen and max_loops ?

best regards
Helmut Pohl

---

From: Cosmo Borsky <[email-masked]>
Date: Tue, 6 Aug 2019 08:10:45 -0400

> do you have a solution for my problem with Alpine-Linux-Xen and max_loops ?

Try adding `loop max_loop=32` to /etc/modules and reboot.

---

From: Helmut <[email-masked]>
Date: Tue, 6 Aug 2019 14:26:48 +0200

Hello,

thanks for your help. My actual config is:

/etc/modules
	loop max_loop=32

/etc/modprobe.d/loop
        options loop max_loop=32

/etc/modprobe.d/xen
        options loop max_loop=32

/boot/extlinux.conf

NO SUCCESS !!

But I need a permanently configure in dom0 for start of 10 domU within
hd-devices, did you more idea`s ?

best regards
Helmut

---

From: Cosmo Borsky <[email-masked]>
Date: Tue, 6 Aug 2019 08:46:31 -0400

> hd-devices, did you more idea`s ?

I see now, when booting only 8 loop modules will be made regardless of
the max_loop parameter.
The loops will be made when:
```
# ls /dev/loop[0-9]* | wc -l
8
# rmmod loop
# modprobe loop max_loop=32
# ls /dev/loop[0-9]* | wc -l
32
```

The loop module is loaded from the initfs without the /etc/modules and
/etc/modprobe.d options. In order to load those options, you will need
to add loop to /etc/mkinitfs/mkinitfs.conf, like so:

`/etc/mkinitfs/mkinitfs.conf/`
```
features="... loop"
```

After adding loop to your features list, run `mkinitfs` as root and then
reboot.

---

From: Cosmo Borsky <[email-masked]>
Date: Tue, 6 Aug 2019 10:33:39 -0400

After some testing, the `/etc/mkinitfs/mkinitfs.conf` edit is
unnecessary. `mkinitfs` is all you need after updating
`/etc/modprobe.d/loop.conf`

I have posted this on the Alpine Linux Xen wiki page:
https://wiki.alpinelinux.org/wiki/Xen_Dom0#Loop_Devices

---

From: Helmut <[email-masked]>
Date: Tue, 6 Aug 2019 22:05:38 +0200

Hello

that's it. That's the solution for my problem.

THANK YOU

Now, after reboot the xen-dom0 have 32 /dev/loop*  :-)))

/etc/modprobe.d/loop.conf and mkinitfs were the solution.

best regards
Helmut Pohl

---

From: PICCORO McKAY Lenz <[email-masked]>
Date: Tue, 6 Aug 2019 08:47:25 -0400

> /boot/extlinux.conf

THAT never will work due only affect your main operatin system.. not
the xen node

The internal emulated system must have all those changes!

---

From: Christian Kujau <[email-masked]>
Date: Thu, 1 Aug 2019 17:34:47 -0700 (PDT)

> So, I tried to configure max_loop=32. Where i can configure for

Depends on where you need those loop devices.

If they are needed in the Dom0 _for_ the DomUs, then max_loop=32 can be 
added to the kernel's command line in the Dom0's boot loader, i.e 
/boot/extlinux.conf. Slightly off-topic, but: why do you need so many 
loop-devices?

If these loop devices are needed within the DomUs, then it depends how 
these are started. PV domains can accept an "extra=" line for kernel 
parameters in the domU configuration file. Or maybe it's a HVM domain and 
has its own bootloader (pygrub), then the max_loop=32 should be added to 
the kernel command line within that domain.

Or maybe the DomU has "loop" compiled as a module, then it should go into 
the module configuration within that domain.

So many possibilities! :-D

C.
-- 
BOFH excuse #305:

IRQ-problems with the Un-Interruptible-Power-Supply

---

From: Helmut <[email-masked]>
Date: Fri, 2 Aug 2019 11:41:53 +0200

Hello Christian,

thx for your help. My actual config is:

/etc/modprobe.d/loop
        options loop max_loop=32

/etc/modprobe.d/xen
        options loop max_loop=32

/boot/extlinux.conf

NO SUCCESS !!

best regards
Helmut