{"id":408,"date":"2014-02-27T21:59:35","date_gmt":"2014-02-27T12:59:35","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=408"},"modified":"2014-02-27T21:59:35","modified_gmt":"2014-02-27T12:59:35","slug":"linux_how_to_check_disk","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2014\/02\/27\/linux_how_to_check_disk\/","title":{"rendered":"Linux \u306eDisk \u78ba\u8a8d\u65b9\u6cd5"},"content":{"rendered":"<p>Linux \u30de\u30b7\u30f3\u306bSD Card \u3084 USB \u30e1\u30e2\u30ea\u7b49\u3092\u8907\u6570\u63a5\u7d9a\u3057\u305f\u6642\u306a\u3069\u306b\u3069\u308c\u304c\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u308f\u304b\u3089\u306a\u304f\u306a\u3063\u305f\u6642\u306a\u3069\u306b\u5f79\u7acb\u3061\u305d\u3046\u306a\u78ba\u8a8d\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n(\/dev\/sda\u2026 \u3068\u304b \/dev\/mmcblk0\u2026 \u3068\u304b)<\/p>\n<h1>dmesg<\/h1>\n<p>\u3088\u304f dmesg \u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre><code>% dmesg\n  :\n[378481.925145] usb 4-1.2: new high-speed USB device number 7 using ehci-pci\n[378482.022988] usb 4-1.2: New USB device found, idVendor=056e, idProduct=6009\n[378482.022991] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3\n[378482.022993] usb 4-1.2: Product: MF-HDU2\n[378482.022994] usb 4-1.2: Manufacturer: ELECOM\n[378482.022995] usb 4-1.2: SerialNumber: 0708C20C90C7B761\n[378482.023271] usb-storage 4-1.2:1.0: USB Mass Storage device detected\n[378482.023343] scsi9 : usb-storage 4-1.2:1.0\n[378483.083291] scsi 9:0:0:0: Direct-Access     ELECOM   MF-HDU2          PMAP PQ: 0 ANSI: 4\n[378483.083655] sd 9:0:0:0: Attached scsi generic sg2 type 0\n[378484.049829] sd 9:0:0:0: [sdc] 62554112 512-byte logical blocks: (32.0 GB\/29.8 GiB)\n[378484.052425] sd 9:0:0:0: [sdc] Write Protect is off\n[378484.052427] sd 9:0:0:0: [sdc] Mode Sense: 23 00 00 00\n[378484.055034] sd 9:0:0:0: [sdc] No Caching mode page found\n[378484.055037] sd 9:0:0:0: [sdc] Assuming drive cache: write through\n[378484.064057] sd 9:0:0:0: [sdc] No Caching mode page found\n[378484.064060] sd 9:0:0:0: [sdc] Assuming drive cache: write through\n[378484.096077]  sdc: sdc1\n[378484.103442] sd 9:0:0:0: [sdc] No Caching mode page found\n[378484.103449] sd 9:0:0:0: [sdc] Assuming drive cache: write through\n[378484.103454] sd 9:0:0:0: [sdc] Attached SCSI removable disk\n<\/code><\/pre>\n<p>ELECOM MF-HDU2 \u304c \/dev\/sdc \u3068\u3057\u3066\u8a8d\u8b58\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3057\u304b\u3057\u3001\u3053\u308c\u3060\u3068\u753b\u9762\u304b\u3089\u6d41\u308c\u305f\u308a\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u5148\u306b\u523a\u3057\u305f\u304b\u304c\u5224\u3089\u306a\u304f\u306a\u308b\u3068\u3044\u3063\u305f\u3093umount \u3057\u3066\u63a5\u7d9a\u3057\u306a\u304a\u3057\u3092\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<h1>\/dev\/disk\/by-id<\/h1>\n<p>\u3053\u3093\u306a\u3068\u304d \/dev\/disk\/by-id \u3092\u898b\u308b\u3068\u5224\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u203budev \u4f9d\u5b58<\/p>\n<pre><code>% ls -lA \/dev\/disk\/by-id\n\u5408\u8a08 0\nlrwxrwxrwx 1 root root  9  2\u6708 23 02:42 ata-INTEL_SSDSA2CW600G3_CVPR1206005W600FGN -&gt; ..\/..\/sda\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 ata-INTEL_SSDSA2CW600G3_CVPR1206005W600FGN-part1 -&gt; ..\/..\/sda1\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 ata-INTEL_SSDSA2CW600G3_CVPR1206005W600FGN-part2 -&gt; ..\/..\/sda2\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 ata-INTEL_SSDSA2CW600G3_CVPR1206005W600FGN-part5 -&gt; ..\/..\/sda5\nlrwxrwxrwx 1 root root  9  2\u6708 26 03:53 ata-ST9500420ASG_5VJ79GDX -&gt; ..\/..\/sdb\nlrwxrwxrwx 1 root root 10  2\u6708 23 05:05 dm-name-luks-3baf2c17-3b18-44ee-9547-cb87b88a80ab -&gt; ..\/..\/dm-3\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 dm-name-sdb5_crypt -&gt; ..\/..\/dm-0\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 dm-name-x220-root -&gt; ..\/..\/dm-1\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 dm-name-x220-swap_1 -&gt; ..\/..\/dm-2\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 dm-uuid-CRYPT-LUKS1-1b4bc14d71604ab5b3db2096a7f61be0-sdb5_crypt -&gt; ..\/..\/dm-0\nlrwxrwxrwx 1 root root 10  2\u6708 23 05:05 dm-uuid-CRYPT-LUKS1-3baf2c173b1844ee9547cb87b88a80ab-luks-3baf2c17-3b18-44ee-9547-cb87b88a80ab -&gt; ..\/..\/dm-3\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 dm-uuid-LVM-L9AiiS7dZRu2WvjdUirxz9fS4OIIqRpKmuJecuwuh7tfiQxUbaGcvv9ppr7WhxZP -&gt; ..\/..\/dm-2\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 dm-uuid-LVM-L9AiiS7dZRu2WvjdUirxz9fS4OIIqRpKxnaP2Gj6PtwuddX1iXfyTQq0hxGbi6o3 -&gt; ..\/..\/dm-1\nlrwxrwxrwx 1 root root 13  2\u6708 26 05:07 memstick-SD16G_0xd39a5655 -&gt; ..\/..\/mmcblk0\nlrwxrwxrwx 1 root root 15  2\u6708 26 05:07 memstick-SD16G_0xd39a5655-part1 -&gt; ..\/..\/mmcblk0p1\nlrwxrwxrwx 1 root root  9  2\u6708 23 02:42 scsi-SATA_INTEL_SSDSA2CW60CVPR1206005W600FGN -&gt; ..\/..\/sda\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 scsi-SATA_INTEL_SSDSA2CW60CVPR1206005W600FGN-part1 -&gt; ..\/..\/sda1\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 scsi-SATA_INTEL_SSDSA2CW60CVPR1206005W600FGN-part2 -&gt; ..\/..\/sda2\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 scsi-SATA_INTEL_SSDSA2CW60CVPR1206005W600FGN-part5 -&gt; ..\/..\/sda5\nlrwxrwxrwx 1 root root  9  2\u6708 26 03:53 scsi-SST9500420ASG_FEDCBA9876543210 -&gt; ..\/..\/sdb\nlrwxrwxrwx 1 root root  9  2\u6708 27 20:52 usb-ELECOM_MF-HDU2_0708C20C90C7B761-0:0 -&gt; ..\/..\/sdc\nlrwxrwxrwx 1 root root 10  2\u6708 27 20:52 usb-ELECOM_MF-HDU2_0708C20C90C7B761-0:0-part1 -&gt; ..\/..\/sdc1\nlrwxrwxrwx 1 root root  9  2\u6708 26 03:53 wwn-0x5000c5002998a599 -&gt; ..\/..\/sdb\nlrwxrwxrwx 1 root root  9  2\u6708 23 02:42 wwn-0x500151795957940c -&gt; ..\/..\/sda\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 wwn-0x500151795957940c-part1 -&gt; ..\/..\/sda1\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 wwn-0x500151795957940c-part2 -&gt; ..\/..\/sda2\nlrwxrwxrwx 1 root root 10  2\u6708 23 02:42 wwn-0x500151795957940c-part5 -&gt; ..\/..\/sda5\n<\/code><\/pre>\n<p>USB \u63a5\u7d9a\u306e\u30c7\u30d0\u30a4\u30b9\u3060\u3051\u306a\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u3059\u3063\u304d\u308a\u3057\u307e\u3059\u306d\u3002<\/p>\n<pre><code>% ls -l \/dev\/disk\/by-id\/usb*\nlrwxrwxrwx 1 root root  9  2\u6708 27 20:52 \/dev\/disk\/by-id\/usb-ELECOM_MF-HDU2_0708C20C90C7B761-0:0 -&gt; ..\/..\/sdc\nlrwxrwxrwx 1 root root 10  2\u6708 27 20:52 \/dev\/disk\/by-id\/usb-ELECOM_MF-HDU2_0708C20C90C7B761-0:0-part1 -&gt; ..\/..\/sdc1\n<\/code><\/pre>\n<p>\/dev\/disk \u306e\u4e0b\u306b\u306f\u4ed6\u306b\u3082 by-label  by-path  by-uuid \u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u4f55\u304b\u306e\u5f79\u306b\u7acb\u3064\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li>by-label \u30dc\u30ea\u30e5\u30fc\u30e0\u30e9\u30d9\u30eb\u306e\u30c7\u30d0\u30a4\u30b9<\/li>\n<li>by-path  \u30c7\u30d0\u30a4\u30b9\u540d(&lt;\u30d1\u30b9ID>-<WWPN>:<LUN>-&lt;\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3>)<\/li>\n<li>by-uuid  \u30c7\u30d0\u30a4\u30b9\u306euuid \u8868\u793a<\/li>\n<\/ul>\n<p><iframe src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=B00DGMU4VY&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n<p><iframe src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=B0045ICK0Q&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n<p><iframe src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=B004EQ4OZS&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux \u30de\u30b7\u30f3\u306bSD Card \u3084 USB \u30e1\u30e2\u30ea\u7b49\u3092\u8907\u6570\u63a5\u7d9a\u3057\u305f\u6642\u306a\u3069\u306b\u3069\u308c\u304c\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u308f\u304b\u3089\u306a\u304f\u306a\u3063\u305f\u6642\u306a\u3069\u306b\u5f79\u7acb\u3061\u305d\u3046\u306a\u78ba\u8a8d\u65b9\u6cd5\u3067\u3059\u3002 (\/dev\/sda\u2026 \u3068\u304b \/dev\/mmcblk0\u2026 \u3068\u304b) dme [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6],"tags":[275],"class_list":["post-408","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=408"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/408\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}