Ubuntu 20.04.3 LTS 上的主要编号为 259

Ubuntu 20.04.3 LTS 上的主要编号为 259

如果我执行lsblk -p命令,则输出如下:

NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
/dev/loop0         7:0    0  99,4M  1 loop /snap/core/11606
/dev/loop1         7:1    0     4K  1 loop /snap/bare/5
/dev/loop2         7:2    0  55,5M  1 loop /snap/core18/1988
/dev/loop3         7:3    0   219M  1 loop /snap/gnome-3-34-1804/66
/dev/loop4         7:4    0   219M  1 loop /snap/gnome-3-34-1804/72
/dev/loop5         7:5    0  99,3M  1 loop /snap/core/11743
/dev/loop6         7:6    0  55,4M  1 loop /snap/core18/2128
/dev/loop7         7:7    0 131,6M  1 loop /snap/docker/796
/dev/loop8         7:8    0 242,4M  1 loop /snap/gnome-3-38-2004/76
/dev/loop9         7:9    0    51M  1 loop /snap/snap-store/547
/dev/loop10        7:10   0  32,3M  1 loop /snap/snapd/13170
/dev/loop11        7:11   0   165M  1 loop /snap/postman/144
/dev/loop12        7:12   0  32,3M  1 loop /snap/snapd/12883
/dev/loop13        7:13   0  65,1M  1 loop /snap/gtk-common-themes/1515
/dev/loop14        7:14   0  88,1M  1 loop /snap/remmina/5028
/dev/loop15        7:15   0 102,3M  1 loop /snap/remmina/5070
/dev/loop16        7:16   0    51M  1 loop /snap/snap-store/518
/dev/loop17        7:17   0  65,2M  1 loop /snap/gtk-common-themes/1519
/dev/loop18        7:18   0  10,9M  1 loop /snap/ncspot/141
/dev/loop19        7:19   0 168,1M  1 loop /snap/postman/147
/dev/loop20        7:20   0  61,8M  1 loop /snap/core20/1081
/dev/loop21        7:21   0   4,5M  1 loop /snap/spt/275
/dev/nvme0n1     259:0    0   477G  0 disk 
├─/dev/nvme0n1p1 259:1    0   300M  0 part /boot/efi
├─/dev/nvme0n1p2 259:2    0   128M  0 part 
├─/dev/nvme0n1p3 259:3    0 312,1G  0 part 
├─/dev/nvme0n1p4 259:4    0   900M  0 part 
├─/dev/nvme0n1p5 259:5    0    17G  0 part 
├─/dev/nvme0n1p6 259:6    0   9,6G  0 part /home
├─/dev/nvme0n1p7 259:7    0   3,8G  0 part [SWAP]
└─/dev/nvme0n1p8 259:8    0 111,8G  0 part /

文章提到列中的数字MAJ:MIN是内核用来内部识别设备的数字,第一个数字指定设备类型(例如,8 用于 SCSI 磁盘)。此外,这个问题的答案之一是unix stack exchange提到了这一点参考显示两列,左列(即 1 个块、2 个字符、2 个块等),右列显示描述(即内存设备、RAM 磁盘等)。

lsblk -p上面的输出来看,我的主编号是 7 和 259。这是什么意思?我从中发现的唯一数字是 259 和 7文档仅限此文字:

259 block   Block Extended Major
            Used dynamically to hold additional partition minor
            numbers and allow large numbers of partitions per device



7 char  Virtual console capture devices
          0 = /dev/vcs      Current vc text (glyph) contents
          1 = /dev/vcs1     tty1 text (glyph) contents
            ...
         63 = /dev/vcs63    tty63 text (glyph) contents
         64 = /dev/vcsu     Current vc text (unicode) contents
        65 = /dev/vcsu1     tty1 text (unicode) contents
            ...
        127 = /dev/vcsu63   tty63 text (unicode) contents
        128 = /dev/vcsa     Current vc text/attribute (glyph) contents
        129 = /dev/vcsa1    tty1 text/attribute (glyph) contents
            ...
        191 = /dev/vcsa63   tty63 text/attribute (glyph) contents

        NOTE: These devices permit both read and write access.

相关内容