{"id":414,"date":"2019-04-27T11:52:00","date_gmt":"2019-04-27T03:52:00","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=414"},"modified":"2022-05-06T17:43:09","modified_gmt":"2022-05-06T09:43:09","slug":"lsblk","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lsblk","title":{"rendered":"lsblk\u547d\u4ee4 – \u67e5\u770b\u7cfb\u7edf\u7684\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5"},"content":{"rendered":"\n

lsblk\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dlist block\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf\u7684\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>lsblk [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-a <\/td>\u663e\u793a\u6240\u6709\u8bbe\u5907 <\/td><\/tr>
-b <\/td>\u4ee5\u5b57\u8282\u5355\u4f4d\u663e\u793a\u8bbe\u5907\u5927\u5c0f <\/td><\/tr>
-d <\/td>\u4e0d\u663e\u793a slaves \u6216 holders <\/td><\/tr>
-e <\/td>\u6392\u9664\u8bbe\u5907 <\/td><\/tr>
-f <\/td>\u663e\u793a\u6587\u4ef6\u7cfb\u7edf\u4fe1\u606f <\/td><\/tr>
-h <\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f <\/td><\/tr>
-i <\/td>\u4ec5\u4f7f\u7528\u5b57\u7b26<\/td><\/tr>
-m <\/td>\u663e\u793a\u6743\u9650\u4fe1\u606f <\/td><\/tr>
-l <\/td>\u4f7f\u7528\u5217\u8868\u683c\u5f0f\u663e\u793a <\/td><\/tr>
-n <\/td>\u4e0d\u663e\u793a\u6807\u9898 <\/td><\/tr>
-o <\/td>\u8f93\u51fa\u5217 <\/td><\/tr>
-P <\/td>\u4f7f\u7528key=”value”\u683c\u5f0f\u663e\u793a <\/td><\/tr>
-r <\/td> \u4f7f\u7528\u539f\u59cb\u683c\u5f0f\u663e\u793a <\/td><\/tr>
-t <\/td>\u663e\u793a\u62d3\u6251\u7ed3\u6784\u4fe1\u606f <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong>
<\/p>\n\n\n\n

\u663e\u793a\u7cfb\u7edf\u4e2d\u6240\u6709\u78c1\u76d8\u8bbe\u5907\u7684\u4f7f\u7528\u60c5\u51b5\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lsblk -a<\/strong>\r\nNAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT\r\nsda             8:0    0   20G  0 disk \r\n\u251c\u2500sda1          8:1    0    1G  0 part \/boot\r\n\u2514\u2500sda2          8:2    0   19G  0 part \r\n  \u251c\u2500rhel-root 253:0    0   17G  0 lvm  \/\r\n  \u2514\u2500rhel-swap 253:1    0    2G  0 lvm  [SWAP]\r\nsr0            11:0    1  6.6G  0 rom  \/media\/cdrom\r<\/pre>\n\n\n\n

\u663e\u793a\u7cfb\u7edf\u4e2d\u78c1\u76d8\u8bbe\u5907\u7684\u5f52\u5c5e\u53ca\u6743\u9650\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lsblk -m<\/strong>\r\nNAME           SIZE OWNER GROUP MODE\r\nsda             20G root  disk  brw-rw----\r\n\u251c\u2500sda1           1G root  disk  brw-rw----\r\n\u2514\u2500sda2          19G root  disk  brw-rw----\r\n  \u251c\u2500rhel-root   17G root  disk  brw-rw----\r\n  \u2514\u2500rhel-swap    2G root  disk  brw-rw----\r\nsr0            6.6G root  cdrom brw-rw----\r<\/pre>\n\n\n\n

\u663e\u793a\u7cfb\u7edf\u4e2d\u6240\u6709SCSI\u7c7b\u578b\u7684\u78c1\u76d8\u8bbe\u5907\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lsblk -S<\/strong>\r\nNAME HCTL       TYPE VENDOR   MODEL             REV TRAN\r\nsda  2:0:0:0    disk ATA      VMware Virtual S 0001 sata\r\nsr0  3:0:0:0    rom  NECVMWar VMware SATA CD01 1.00 sata\r<\/pre>\n\n\n\n

\u4ee5\u5217\u8868\u683c\u5f0f\u663e\u793a\u78c1\u76d8\u8bbe\u5907\u4fe1\u606f\uff0c\u5e76\u4e14\u4e0d\u663e\u793a\u6807\u9898\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lsblk -nl<\/strong>\r\nsda         8:0    0   20G  0 disk \r\nsda1        8:1    0    1G  0 part \/boot\r\nsda2        8:2    0   19G  0 part \r\nsr0        11:0    1  6.6G  0 rom  \/media\/cdrom\r\nrhel-root 253:0    0   17G  0 lvm  \/\r\nrhel-swap 253:1    0    2G  0 lvm  [SWAP]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

lsblk\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dlist block\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u7cfb\u7edf\u7684\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5\u3002 \u8bed\u6cd5\u683c\u5f0f\uff1al […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/414"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=414"}],"version-history":[{"count":24,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/414\/revisions"}],"predecessor-version":[{"id":9331,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/414\/revisions\/9331"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}