8 Replies Latest reply: Apr 29, 2012 2:50 AM by Sahar RSS

    add  loop devices

    Sahar
      Hi All,
      i have machine (VM) with oracle linux 5 , kernel : 2.6.18-308.el5 .
      I want to add more loop devices ( the system comes with 0-7 , 8 in total as default) .
      i have added max_loop=16 in both /boot/grub/grub.conf and /etc/modeprob.conf - rebooted the system
      then I run :
      losetup /dev/loop8 /u01/asmdisks/_file_disk_08 - to create the virutal device and I get /dev/loop8: No such device or address

      if I do ls on /dev/loop* i get
      [root@oracle dev]# ls -al loop*
      brw-r----- 1 root disk 7, 0 Apr 25 2012 loop0
      brw-r----- 1 root disk 7, 1 Apr 25 2012 loop1
      brw-r----- 1 root disk 7, 2 Apr 25 2012 loop2
      brw-r----- 1 root disk 7, 3 Apr 25 2012 loop3
      brw-r----- 1 root disk 7, 4 Apr 25 2012 loop4
      brw-r----- 1 root disk 7, 5 Apr 25 2012 loop5
      brw-r----- 1 root disk 7, 6 Apr 25 2012 loop6
      brw-r----- 1 root disk 7, 7 Apr 25 2012 loop7
      brw-r----- 1 root disk 7, 8 Apr 25 2012 loop8

      any idea, someone ?

      by the way if I boot the same machine with the uek kernel - i can use mknod , losetuop to create the loop devices ....
      but I need not to run the uek kernel .
      any advice will be appreciated

      thanks

      Sahar
        • 1. Re: add  loop devices
          Dude!
          There was a very similar thread recently:

          create more than 8 loop devices on 2.63.32-300.10.1-el5uek kernel
          create more than 8  loop devices on 2.63.32-300.10.1-el5uek kernel
          i have added max_loop=16 in both /boot/grub/grub.conf and /etc/modeprob.conf - rebooted the system
          modeprob.conf does probably not apply because loop is build-in and not a kernel module.

          You may have modified grub.conf incorrectly. Post the content to verify.

          What are you actually trying to accomplish, what are you creating loop devices for? If you are using "VM" one normally creates a virtual disk in the "VM" environment.
          • 2. Re: add  loop devices
            Sahar
            Hi Dude,
            thanks for your reply,
            I have seen the thread you referred me to, before I opened this one.
            on the other thread the kernel being used is the uek kernel - which as i mentioned earlier, I can add loop devices on that kernel as well - no problem there .
            however i have switched to the other kernel (see in the grub.conf below) , which i have trouble to add those devices to.
            The reason I have changed the kernel i because there is a problem to create ACFS ( oracle cluster file system ) on Oracle 11.2.0.1 on the "uek" kernel.

            here is the brub,conf :

            # grub.conf generated by anaconda
            #
            # Note that you do not have to rerun grub after making changes to this file
            # NOTICE: You have a /boot partition. This means that
            # all kernel and initrd paths are relative to /boot/, eg.
            # root (hd0,0)
            # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
            # initrd /initrd-version.img
            #boot=/dev/sda
            default=1
            timeout=5
            splashimage=(hd0,0)/grub/splash.xpm.gz
            hiddenmenu
            title Oracle Linux Server (2.6.32-300.10.1.el5uek)
            root (hd0,0)
            kernel /vmlinuz-2.6.32-300.10.1.el5uek ro root=/dev/VolGroup00/LogVol00 rhgb quiet
            initrd /initrd-2.6.32-300.10.1.el5uek.img
            title Oracle Linux Server-base (2.6.18-308.el5)
            root (hd0,0)
            kernel /vmlinuz-2.6.18-308.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet max_loop=16
            initrd /initrd-2.6.18-308.el5.img
            ~

            thanks ,

            Sahar
            • 3. Re: add  loop devices
              Tommyreynolds-Oracle
              Instead of:
              kernel /vmlinuz-2.6.18-308.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet max_loop=16
              try:
              kernel /vmlinuz-2.6.18-308.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet loop.max_loop=16
              If a module is compiled in to the kernel, give its name as a qualifier to identify which module should own the parameter.
              • 4. Re: add  loop devices
                Dude!
                but I need not to run the uek kernel .
                So you actually meant the original RHEL kernel?
                The reason I have changed the kernel i because there is a problem to create ACFS ( oracle cluster file system ) on Oracle 11.2.0.1 on the "uek" kernel.
                Are you using Oracle ASM?

                I guess whether or not you have a problem because of ACFS and ADVM depends on what you are trying to accomplish. For ASM, you don't need it.

                Oracle recommends that you create Oracle data files in Oracle ASM disk groups. Creating Oracle data files on an Oracle ACFS file system is not supported. Oracle ACFS can be used as an option only when Oracle ASM is configured.

                
http://docs.oracle.com/cd/E11882_01/relnotes.112/e23558/toc.htm
Starting with Oracle Database 11.2.0.2, Unbreakable Enterprise Kernel is supported. Oracle ACFS and Oracle ADVM are not supported with the Unbreakable Enterprise Kernel in 11.2.0.2 and earlier releases.

                Edited by: Dude on Apr 25, 2012 7:10 AM
                • 5. Re: add  loop devices
                  Sahar
                  Hן Dude,
                  as I worte earliver I need to run ACFS and ADVM on oracle 11.2.0.1 so I can't use the uek kernel
                  (i need this special setup in order to run some oracle training course which require this setup ).

                  so inrder to create the ASM , ASFS,ADVM etc' i need more than 8 (default ) loop devices .
                  ( I don't want to teak the required setup ) .


                  thanks
                  S.
                  • 6. Re: add  loop devices
                    Sahar
                    Hi Tommy,
                    thanks for you reply.
                    I tried your suggestion but it did not work , even when I added the looop.max_loop=16 ( added the qualifier to the grub.conf) i still can't create more than 8 loop devices :( .


                    how can I know / check that the module is compiled into the kernel or if it is not ?
                    I suspect that there is some issue with that ....

                    some other idea as how to resolve the issue ?

                    thanks



                    S.
                    • 7. Re: add  loop devices
                      Dude!
                      It shouldn't be so difficult.

                      If your loop support has been compiled directly into the kernel (in other words, it is not loaded as a module), you can append the number of loop devices you would like to support in the grub kernel parameter line or at the linux boot prompt.
                      boot: linux max_loop=16

                      If it is a loadable modules:

                      add:
                      options loop max_loop=16

                      /etc/modules.conf: used with 2.4 series kernels.
                      /etc/modprobe.conf: used with 2.6 series kernels.

                      You use "lsmod" to check what modules are loaded.
                      (i need this special setup in order to run some oracle training course which require this setup ).
                      sounds a bit strange, I mean creating more than 8 loop devices seems to be a very unusual request. I'm not sure what the side-affects are or why loop is limited to 8, but there could be a reason for such limit.

                      Btw:
                      http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/sect-Virtualization-Troubleshooting-Loop_device_errors.html

                      Edited by: Dude on Apr 25, 2012 11:04 AM
                      • 8. Re: add  loop devices
                        Sahar
                        Hi Dude,
                        thanks for all your help and sorry for the late response.
                        no matter what I have tried using kernel 2.6.18-308.el5 ( the kernel that was installed originally) , either using the grub.conf or modprobe.conf to add support for more loop devices - nothing helped .

                        finally I have installed kernel version 2.6.18-194.el5 - and in that kernel the loop device not compiled into the the kernel so added the max_loop in modprobe.conf and it "did the trick" - as it should .

                        now I can proceed with the ACFS/ ADVM installations .

                        thank you ! very much for all your help , appreciated .

                        Sahar