{"id":3834,"date":"2019-07-21T23:46:44","date_gmt":"2019-07-21T15:46:44","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3834"},"modified":"2019-07-25T23:04:04","modified_gmt":"2019-07-25T15:04:04","slug":"blockdev","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/blockdev","title":{"rendered":"blockdev\u547d\u4ee4 – \u8c03\u7528\u533a\u5757\u8bbe\u5907\u63a7\u5236\u7a0b\u5e8f"},"content":{"rendered":"\n
\u5b9e\u7528\u7a0b\u5e8fblockdev\u5141\u8bb8\u4ece\u547d\u4ee4\u884c\u8c03\u7528block\u8bbe\u5907ioctl\uff0c \u4ee5\u5b9e\u73b0\u5bf9\u8bbe\u5907\u7684\u63a7\u5236 \u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>blockdev [\u53c2\u6570] [\u8bbe\u5907]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u8bbe\u7f6e\u8bbe\u5907\u4e3a\u53ea\u8bfb\uff1a <\/p>\n\n\n\n \u8bfb\u53d6\u8bbe\u5907\u662f\u5426\u4e3a\u53ea\u8bfb\uff1a <\/p>\n\n\n\n \u8bbe\u7f6e\u8bbe\u522b\u4e3a\u53ef\u8bfb\u5199\uff1a <\/p>\n\n\n\n \u5b9e\u7528\u7a0b\u5e8fblockdev\u5141\u8bb8\u4ece\u547d\u4ee4\u884c\u8c03\u7528block\u8bbe\u5907ioctl\uff0c \u4ee5\u5b9e\u73b0\u5bf9\u8bbe\u5907\u7684\u63a7\u5236 \u3002 \u8bed\u6cd5\u683c\u5f0f\uff1abloc […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3834"}],"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=3834"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3834\/revisions"}],"predecessor-version":[{"id":4225,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3834\/revisions\/4225"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-q<\/td> \u5b89\u9759\u6a21\u5f0f<\/td><\/tr> -v<\/td> \u8be6\u7ec6\u4fe1\u606f\u6a21\u5f0f<\/td><\/tr> --setro<\/td> \u53ea\u8bfb<\/td><\/tr> --setrw<\/td> \u53ea\u5199<\/td><\/tr> --getro<\/td> \u6253\u5370\u53ea\u8bfb\u72b6\u6001\uff0c\u201c1\u201d\u8868\u793a\u53ea\u8bfb\uff0c\u201c0\u201d\u8868\u793a\u975e\u53ea\u8bfb<\/td><\/tr> --getss<\/td> \u6253\u5370\u6247\u533a\u5927\u5c0f\u3002\u901a\u5e38\u4e3a521<\/td><\/tr> --flushbufs<\/td> \u5237\u65b0\u7f13\u51b2\u533a<\/td><\/tr> --rereadpt<\/td> \u91cd\u65b0\u8bfb\u53d6\u5206\u533a\u8868<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# blockdev --setro \/dev\/hda4<\/pre>\n\n\n\n
[root@linuxcool ~]# blockdev --getro \/dev\/hda4<\/pre>\n\n\n\n
[root@linuxcool ~]# blockdev --setrw \/dev\/hda4<\/pre>\n","protected":false},"excerpt":{"rendered":"