Why can't I open these device nodes?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















[root@archlinux xtricman]# ls -l /dev/pts
total 0
crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
[root@archlinux xtricman]# ls -l /mnt
total 12
brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
drwx------ 2 root root 12288 Feb 24 19:12 lost+found
[root@archlinux xtricman]# exec 6<>/dev/pts/0
[root@archlinux xtricman]# exec 7<>/mnt/dev_node
bash: /mnt/dev_node: No such device or address
[root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
bash: /mnt/dev_node_c: Input/output error


/dev/pts is the mount point of a devpts, /mnt is the mount point of an ext4.



I want to know, since both the three device nodes(/dev/pts/0,/mnt/dev_node,/mnt/dev_node_c) all have the same major and minor number, why can I only open the /dev/pts/0 but not the other two?



Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?










share|improve this question


























    2















    [root@archlinux xtricman]# ls -l /dev/pts
    total 0
    crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
    c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
    [root@archlinux xtricman]# ls -l /mnt
    total 12
    brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
    crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
    drwx------ 2 root root 12288 Feb 24 19:12 lost+found
    [root@archlinux xtricman]# exec 6<>/dev/pts/0
    [root@archlinux xtricman]# exec 7<>/mnt/dev_node
    bash: /mnt/dev_node: No such device or address
    [root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
    bash: /mnt/dev_node_c: Input/output error


    /dev/pts is the mount point of a devpts, /mnt is the mount point of an ext4.



    I want to know, since both the three device nodes(/dev/pts/0,/mnt/dev_node,/mnt/dev_node_c) all have the same major and minor number, why can I only open the /dev/pts/0 but not the other two?



    Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?










    share|improve this question
























      2












      2








      2


      1






      [root@archlinux xtricman]# ls -l /dev/pts
      total 0
      crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
      c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
      [root@archlinux xtricman]# ls -l /mnt
      total 12
      brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
      crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
      drwx------ 2 root root 12288 Feb 24 19:12 lost+found
      [root@archlinux xtricman]# exec 6<>/dev/pts/0
      [root@archlinux xtricman]# exec 7<>/mnt/dev_node
      bash: /mnt/dev_node: No such device or address
      [root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
      bash: /mnt/dev_node_c: Input/output error


      /dev/pts is the mount point of a devpts, /mnt is the mount point of an ext4.



      I want to know, since both the three device nodes(/dev/pts/0,/mnt/dev_node,/mnt/dev_node_c) all have the same major and minor number, why can I only open the /dev/pts/0 but not the other two?



      Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?










      share|improve this question














      [root@archlinux xtricman]# ls -l /dev/pts
      total 0
      crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0
      c--------- 1 root root 5, 2 Feb 24 19:10 ptmx
      [root@archlinux xtricman]# ls -l /mnt
      total 12
      brw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node
      crw-r--r-- 1 root root 136, 0 Feb 24 19:17 dev_node_c
      drwx------ 2 root root 12288 Feb 24 19:12 lost+found
      [root@archlinux xtricman]# exec 6<>/dev/pts/0
      [root@archlinux xtricman]# exec 7<>/mnt/dev_node
      bash: /mnt/dev_node: No such device or address
      [root@archlinux xtricman]# exec 7<>/mnt/dev_node_c
      bash: /mnt/dev_node_c: Input/output error


      /dev/pts is the mount point of a devpts, /mnt is the mount point of an ext4.



      I want to know, since both the three device nodes(/dev/pts/0,/mnt/dev_node,/mnt/dev_node_c) all have the same major and minor number, why can I only open the /dev/pts/0 but not the other two?



      Even if I can understand that a block device of (major=136,minor=0) doesn't exist, what does the "Input/output error" of character device (major=136,minor=0) mean? Why do I get this error?







      linux terminal devices special-characters






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 24 at 11:34









      炸鱼薯条德里克炸鱼薯条德里克

      5981316




      5981316




















          1 Answer
          1






          active

          oldest

          votes


















          1














          Well, dev_node is a block device (the b at the start of the line in the ls output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.



          Documentation/admin-guide/devices.txt in the Linux kernel source tells what it is:



           136 block Mylex DAC960 PCI RAID controller; ninth controller
          0 = /dev/rd/c8d0 First disk, whole disk


          You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address seems an appropriate response.



          dev_node_c though looks to be the same as your /dev/pts/0. But the device nodes in /dev/pts are automatically generated, there's a special virtual filesystem (devpts) for it. It's shown in the output of mount, as usual:



          devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) 


          I tested that, and indeed copying a device node from there /dev/pts/15 to another filesystem doesn't work. Also, mounting another copy of devpts seems to create a clean instance, the pseudo ttys in /dev/pts aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts filesystem, and so the nodes don't work at all outside of it.






          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%2f502671%2fwhy-cant-i-open-these-device-nodes%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









            1














            Well, dev_node is a block device (the b at the start of the line in the ls output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.



            Documentation/admin-guide/devices.txt in the Linux kernel source tells what it is:



             136 block Mylex DAC960 PCI RAID controller; ninth controller
            0 = /dev/rd/c8d0 First disk, whole disk


            You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address seems an appropriate response.



            dev_node_c though looks to be the same as your /dev/pts/0. But the device nodes in /dev/pts are automatically generated, there's a special virtual filesystem (devpts) for it. It's shown in the output of mount, as usual:



            devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) 


            I tested that, and indeed copying a device node from there /dev/pts/15 to another filesystem doesn't work. Also, mounting another copy of devpts seems to create a clean instance, the pseudo ttys in /dev/pts aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts filesystem, and so the nodes don't work at all outside of it.






            share|improve this answer



























              1














              Well, dev_node is a block device (the b at the start of the line in the ls output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.



              Documentation/admin-guide/devices.txt in the Linux kernel source tells what it is:



               136 block Mylex DAC960 PCI RAID controller; ninth controller
              0 = /dev/rd/c8d0 First disk, whole disk


              You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address seems an appropriate response.



              dev_node_c though looks to be the same as your /dev/pts/0. But the device nodes in /dev/pts are automatically generated, there's a special virtual filesystem (devpts) for it. It's shown in the output of mount, as usual:



              devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) 


              I tested that, and indeed copying a device node from there /dev/pts/15 to another filesystem doesn't work. Also, mounting another copy of devpts seems to create a clean instance, the pseudo ttys in /dev/pts aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts filesystem, and so the nodes don't work at all outside of it.






              share|improve this answer

























                1












                1








                1







                Well, dev_node is a block device (the b at the start of the line in the ls output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.



                Documentation/admin-guide/devices.txt in the Linux kernel source tells what it is:



                 136 block Mylex DAC960 PCI RAID controller; ninth controller
                0 = /dev/rd/c8d0 First disk, whole disk


                You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address seems an appropriate response.



                dev_node_c though looks to be the same as your /dev/pts/0. But the device nodes in /dev/pts are automatically generated, there's a special virtual filesystem (devpts) for it. It's shown in the output of mount, as usual:



                devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) 


                I tested that, and indeed copying a device node from there /dev/pts/15 to another filesystem doesn't work. Also, mounting another copy of devpts seems to create a clean instance, the pseudo ttys in /dev/pts aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts filesystem, and so the nodes don't work at all outside of it.






                share|improve this answer













                Well, dev_node is a block device (the b at the start of the line in the ls output tells this), so it's not at all the same as the others. It just happens to have the same major number, but the numbers are not related between block devices and character devices.



                Documentation/admin-guide/devices.txt in the Linux kernel source tells what it is:



                 136 block Mylex DAC960 PCI RAID controller; ninth controller
                0 = /dev/rd/c8d0 First disk, whole disk


                You probably don't have a Mylex RAID controller, let alone nine of them, so No such device or address seems an appropriate response.



                dev_node_c though looks to be the same as your /dev/pts/0. But the device nodes in /dev/pts are automatically generated, there's a special virtual filesystem (devpts) for it. It's shown in the output of mount, as usual:



                devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) 


                I tested that, and indeed copying a device node from there /dev/pts/15 to another filesystem doesn't work. Also, mounting another copy of devpts seems to create a clean instance, the pseudo ttys in /dev/pts aren't visible in the other copy. So it may indeed be that the pseudo tty nodes are tied to that particular instance of the devpts filesystem, and so the nodes don't work at all outside of it.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 24 at 14:09









                ilkkachuilkkachu

                62.2k10103179




                62.2k10103179



























                    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%2f502671%2fwhy-cant-i-open-these-device-nodes%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 check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?