xe sr-create type=ext results in backend failure












0















I'm trying to create an ext based storage repository:



xe sr-create content-type="local SR" 
host-uuid=c7030a1f-15e3-7e7d-2932-b30200a15917 type=ext
device-config-device=/dev/sdb1
shared=false name-label="Local File SR"


Results in:



There was an SR backend failure.
status: non-zero exit
stdout:
stderr: Traceback (most recent call last):
File "/usr/lib/xcp/sm/EXTSR", line 320, in <module>
SRCommand.run(EXTSR, DRIVER_INFO)
File "/usr/lib/xcp/sm/SRCommand.py", line 263, in run
ret = cmd.run(sr)
File "/usr/lib/xcp/sm/SRCommand.py", line 94, in run
return self._run_locked(sr)
File "/usr/lib/xcp/sm/SRCommand.py", line 131, in _run_locked
return self._run(sr, target)
File "/usr/lib/xcp/sm/SRCommand.py", line 214, in _run
return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
File "/usr/lib/xcp/sm/EXTSR", line 225, in create
util.pread2(cmd)
File "/usr/lib/xcp/sm/util.py", line 177, in pread2
return pread(cmdlist, quiet = quiet)
File "/usr/lib/xcp/sm/util.py", line 164, in pread
(rc,stdout,stderr) = doexec(cmdlist_for_exec)
File "/usr/lib/xcp/sm/util.py", line 129, in doexec
proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=Tru
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory









share|improve this question



























    0















    I'm trying to create an ext based storage repository:



    xe sr-create content-type="local SR" 
    host-uuid=c7030a1f-15e3-7e7d-2932-b30200a15917 type=ext
    device-config-device=/dev/sdb1
    shared=false name-label="Local File SR"


    Results in:



    There was an SR backend failure.
    status: non-zero exit
    stdout:
    stderr: Traceback (most recent call last):
    File "/usr/lib/xcp/sm/EXTSR", line 320, in <module>
    SRCommand.run(EXTSR, DRIVER_INFO)
    File "/usr/lib/xcp/sm/SRCommand.py", line 263, in run
    ret = cmd.run(sr)
    File "/usr/lib/xcp/sm/SRCommand.py", line 94, in run
    return self._run_locked(sr)
    File "/usr/lib/xcp/sm/SRCommand.py", line 131, in _run_locked
    return self._run(sr, target)
    File "/usr/lib/xcp/sm/SRCommand.py", line 214, in _run
    return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
    File "/usr/lib/xcp/sm/EXTSR", line 225, in create
    util.pread2(cmd)
    File "/usr/lib/xcp/sm/util.py", line 177, in pread2
    return pread(cmdlist, quiet = quiet)
    File "/usr/lib/xcp/sm/util.py", line 164, in pread
    (rc,stdout,stderr) = doexec(cmdlist_for_exec)
    File "/usr/lib/xcp/sm/util.py", line 129, in doexec
    proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=Tru
    File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory









    share|improve this question

























      0












      0








      0








      I'm trying to create an ext based storage repository:



      xe sr-create content-type="local SR" 
      host-uuid=c7030a1f-15e3-7e7d-2932-b30200a15917 type=ext
      device-config-device=/dev/sdb1
      shared=false name-label="Local File SR"


      Results in:



      There was an SR backend failure.
      status: non-zero exit
      stdout:
      stderr: Traceback (most recent call last):
      File "/usr/lib/xcp/sm/EXTSR", line 320, in <module>
      SRCommand.run(EXTSR, DRIVER_INFO)
      File "/usr/lib/xcp/sm/SRCommand.py", line 263, in run
      ret = cmd.run(sr)
      File "/usr/lib/xcp/sm/SRCommand.py", line 94, in run
      return self._run_locked(sr)
      File "/usr/lib/xcp/sm/SRCommand.py", line 131, in _run_locked
      return self._run(sr, target)
      File "/usr/lib/xcp/sm/SRCommand.py", line 214, in _run
      return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
      File "/usr/lib/xcp/sm/EXTSR", line 225, in create
      util.pread2(cmd)
      File "/usr/lib/xcp/sm/util.py", line 177, in pread2
      return pread(cmdlist, quiet = quiet)
      File "/usr/lib/xcp/sm/util.py", line 164, in pread
      (rc,stdout,stderr) = doexec(cmdlist_for_exec)
      File "/usr/lib/xcp/sm/util.py", line 129, in doexec
      proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=Tru
      File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
      errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
      raise child_exception
      OSError: [Errno 2] No such file or directory









      share|improve this question














      I'm trying to create an ext based storage repository:



      xe sr-create content-type="local SR" 
      host-uuid=c7030a1f-15e3-7e7d-2932-b30200a15917 type=ext
      device-config-device=/dev/sdb1
      shared=false name-label="Local File SR"


      Results in:



      There was an SR backend failure.
      status: non-zero exit
      stdout:
      stderr: Traceback (most recent call last):
      File "/usr/lib/xcp/sm/EXTSR", line 320, in <module>
      SRCommand.run(EXTSR, DRIVER_INFO)
      File "/usr/lib/xcp/sm/SRCommand.py", line 263, in run
      ret = cmd.run(sr)
      File "/usr/lib/xcp/sm/SRCommand.py", line 94, in run
      return self._run_locked(sr)
      File "/usr/lib/xcp/sm/SRCommand.py", line 131, in _run_locked
      return self._run(sr, target)
      File "/usr/lib/xcp/sm/SRCommand.py", line 214, in _run
      return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
      File "/usr/lib/xcp/sm/EXTSR", line 225, in create
      util.pread2(cmd)
      File "/usr/lib/xcp/sm/util.py", line 177, in pread2
      return pread(cmdlist, quiet = quiet)
      File "/usr/lib/xcp/sm/util.py", line 164, in pread
      (rc,stdout,stderr) = doexec(cmdlist_for_exec)
      File "/usr/lib/xcp/sm/util.py", line 129, in doexec
      proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=Tru
      File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
      errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
      raise child_exception
      OSError: [Errno 2] No such file or directory






      xen debian






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 11 '14 at 17:12









      Chris SnowChris Snow

      1,82831529




      1,82831529






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Editing util.py



          vi /usr/lib/xcp/sm/util.py


          and adding a print debug output statement:



          def doexec(args, inputtext=None):
          """Execute a subprocess, then return its return code, stdout and stderr"""
          print ', '.join(args) # Added print statement for debugging
          proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=True)
          (stdout,stderr) = proc.communicate(inputtext)
          rc = proc.returncode
          return (rc,stdout,stderr)


          returned this output when running the sr-create command:



          stdout: sginfo, -s, /dev/sdb1
          /lib/udev/scsi_id, -g, -s, /block/sdb
          /sbin/vgs, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
          dd, if=/dev/zero, of=/dev/sdb1, bs=1M, count=100, oflag=direct
          /sbin/pvs, /dev/sdb1
          pvcreate, --metadatasize, 10M, /dev/sdb1
          vgcreate, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a, /dev/sdb1
          /sbin/lvdisplay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
          /sbin/vgs, --noheadings, --nosuffix, --units, b, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
          lvcreate, -n, 0cee01cd-3f10-9c28-8a0f-dec270e7f37a, -L, 1012, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
          lvchange, -ay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
          mkfs.ext3, -F, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
          /lib/udev/scsi_id, -g, -s, /block/sdb


          From this I could see that lvm tools are being used by sr-create.





          Problem Solved



          These tools were missing on my system. Installing apt-get install lvm2 resolved the issue for me.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f114742%2fxe-sr-create-type-ext-results-in-backend-failure%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Editing util.py



            vi /usr/lib/xcp/sm/util.py


            and adding a print debug output statement:



            def doexec(args, inputtext=None):
            """Execute a subprocess, then return its return code, stdout and stderr"""
            print ', '.join(args) # Added print statement for debugging
            proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=True)
            (stdout,stderr) = proc.communicate(inputtext)
            rc = proc.returncode
            return (rc,stdout,stderr)


            returned this output when running the sr-create command:



            stdout: sginfo, -s, /dev/sdb1
            /lib/udev/scsi_id, -g, -s, /block/sdb
            /sbin/vgs, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
            dd, if=/dev/zero, of=/dev/sdb1, bs=1M, count=100, oflag=direct
            /sbin/pvs, /dev/sdb1
            pvcreate, --metadatasize, 10M, /dev/sdb1
            vgcreate, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a, /dev/sdb1
            /sbin/lvdisplay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
            /sbin/vgs, --noheadings, --nosuffix, --units, b, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
            lvcreate, -n, 0cee01cd-3f10-9c28-8a0f-dec270e7f37a, -L, 1012, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
            lvchange, -ay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
            mkfs.ext3, -F, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
            /lib/udev/scsi_id, -g, -s, /block/sdb


            From this I could see that lvm tools are being used by sr-create.





            Problem Solved



            These tools were missing on my system. Installing apt-get install lvm2 resolved the issue for me.






            share|improve this answer




























              0














              Editing util.py



              vi /usr/lib/xcp/sm/util.py


              and adding a print debug output statement:



              def doexec(args, inputtext=None):
              """Execute a subprocess, then return its return code, stdout and stderr"""
              print ', '.join(args) # Added print statement for debugging
              proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=True)
              (stdout,stderr) = proc.communicate(inputtext)
              rc = proc.returncode
              return (rc,stdout,stderr)


              returned this output when running the sr-create command:



              stdout: sginfo, -s, /dev/sdb1
              /lib/udev/scsi_id, -g, -s, /block/sdb
              /sbin/vgs, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
              dd, if=/dev/zero, of=/dev/sdb1, bs=1M, count=100, oflag=direct
              /sbin/pvs, /dev/sdb1
              pvcreate, --metadatasize, 10M, /dev/sdb1
              vgcreate, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a, /dev/sdb1
              /sbin/lvdisplay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
              /sbin/vgs, --noheadings, --nosuffix, --units, b, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
              lvcreate, -n, 0cee01cd-3f10-9c28-8a0f-dec270e7f37a, -L, 1012, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
              lvchange, -ay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
              mkfs.ext3, -F, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
              /lib/udev/scsi_id, -g, -s, /block/sdb


              From this I could see that lvm tools are being used by sr-create.





              Problem Solved



              These tools were missing on my system. Installing apt-get install lvm2 resolved the issue for me.






              share|improve this answer


























                0












                0








                0







                Editing util.py



                vi /usr/lib/xcp/sm/util.py


                and adding a print debug output statement:



                def doexec(args, inputtext=None):
                """Execute a subprocess, then return its return code, stdout and stderr"""
                print ', '.join(args) # Added print statement for debugging
                proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=True)
                (stdout,stderr) = proc.communicate(inputtext)
                rc = proc.returncode
                return (rc,stdout,stderr)


                returned this output when running the sr-create command:



                stdout: sginfo, -s, /dev/sdb1
                /lib/udev/scsi_id, -g, -s, /block/sdb
                /sbin/vgs, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                dd, if=/dev/zero, of=/dev/sdb1, bs=1M, count=100, oflag=direct
                /sbin/pvs, /dev/sdb1
                pvcreate, --metadatasize, 10M, /dev/sdb1
                vgcreate, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a, /dev/sdb1
                /sbin/lvdisplay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                /sbin/vgs, --noheadings, --nosuffix, --units, b, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                lvcreate, -n, 0cee01cd-3f10-9c28-8a0f-dec270e7f37a, -L, 1012, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                lvchange, -ay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                mkfs.ext3, -F, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                /lib/udev/scsi_id, -g, -s, /block/sdb


                From this I could see that lvm tools are being used by sr-create.





                Problem Solved



                These tools were missing on my system. Installing apt-get install lvm2 resolved the issue for me.






                share|improve this answer













                Editing util.py



                vi /usr/lib/xcp/sm/util.py


                and adding a print debug output statement:



                def doexec(args, inputtext=None):
                """Execute a subprocess, then return its return code, stdout and stderr"""
                print ', '.join(args) # Added print statement for debugging
                proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=True)
                (stdout,stderr) = proc.communicate(inputtext)
                rc = proc.returncode
                return (rc,stdout,stderr)


                returned this output when running the sr-create command:



                stdout: sginfo, -s, /dev/sdb1
                /lib/udev/scsi_id, -g, -s, /block/sdb
                /sbin/vgs, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                dd, if=/dev/zero, of=/dev/sdb1, bs=1M, count=100, oflag=direct
                /sbin/pvs, /dev/sdb1
                pvcreate, --metadatasize, 10M, /dev/sdb1
                vgcreate, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a, /dev/sdb1
                /sbin/lvdisplay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                /sbin/vgs, --noheadings, --nosuffix, --units, b, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                lvcreate, -n, 0cee01cd-3f10-9c28-8a0f-dec270e7f37a, -L, 1012, XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                lvchange, -ay, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                mkfs.ext3, -F, /dev/XSLocalEXT-0cee01cd-3f10-9c28-8a0f-dec270e7f37a/0cee01cd-3f10-9c28-8a0f-dec270e7f37a
                /lib/udev/scsi_id, -g, -s, /block/sdb


                From this I could see that lvm tools are being used by sr-create.





                Problem Solved



                These tools were missing on my system. Installing apt-get install lvm2 resolved the issue for me.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 11 '14 at 17:12









                Chris SnowChris Snow

                1,82831529




                1,82831529






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f114742%2fxe-sr-create-type-ext-results-in-backend-failure%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                    is 'sed' thread safe

                    How to make a Squid Proxy server?