[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Max number of loop devices OR "efficient search of Debian documentation"



On Sun, May 18, 2014 at 11:35 AM, Filip <filip@fbvnet.be> wrote:
> On Sun, 18 May 2014 15:15:34 +0000 (UTC)
> Curt <curty@free.fr> wrote:
>> On 2014-05-18, Richard Owlett <rowlett@cloud85.net> wrote:
>>>
>>> My current instance is attempting to modify the max number of
>>> loop devices. One pellet of Google buckshot reminded me that it
>>> can be reset for the next re-boot under /etc/modprobe.d . But I
>>> want to reset it on the fly.
>>
>> I'm reading you can *add* another loop device on the fly
>> with the mknod command:
>>
>> mknod -m 660 /dev/loop8 b 7 8
>
> You can create devices nodes with that in the filesystem, but they will
> not work unless they also exist in the kernel.

The kernel knows about a mknod-created loop device once you use losetup.


# ls1 /dev/loop*
/dev/loop0
/dev/loop1
/dev/loop2
/dev/loop3
/dev/loop4
/dev/loop5
/dev/loop6
/dev/loop7
/dev/loop-control

# mknod -m 660 /dev/loop99 b 7 99

# ls1 /dev/loop*
/dev/loop0
/dev/loop1
/dev/loop2
/dev/loop3
/dev/loop4
/dev/loop5
/dev/loop6
/dev/loop7
/dev/loop99
/dev/loop-control

# find /sys -name loop99

# losetup /dev/loop99 disk.img

# find /sys -name loop99
/sys/devices/virtual/block/loop99
/sys/block/loop99
/sys/class/block/loop99


Reply to: