{"id":4269,"date":"2012-12-25T10:04:28","date_gmt":"2012-12-25T02:04:28","guid":{"rendered":"http:\/\/jpuyy.com\/?p=4269"},"modified":"2014-05-12T17:24:31","modified_gmt":"2014-05-12T09:24:31","slug":"mount-umount-usage","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=4269","title":{"rendered":"mount,umount\u7528\u6cd5"},"content":{"rendered":"<p>\u547d\u4ee4\u683c\u5f0f\uff1a<\/p>\n<p>mount -a \uff0c\u4f1a\u628a\/etc\/fstab\u5217\u51fa\u7684\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d<\/p>\n<p>mount -t \u7c7b\u578b -o \u6302\u63a5\u65b9\u5f0f \u6e90\u8def\u5f84 \u76ee\u6807\u8def\u5f84<\/p>\n<p>-t \u8be6\u7ec6\u9009\u9879:<\/p>\n<p>\u5149\u76d8\u6216\u5149\u76d8\u955c\u50cf\uff1aiso9660<br \/>\nDOS fat16\u6587\u4ef6\u7cfb\u7edf\uff1amsdos<br \/>\nWindows 9x fat32\u6587\u4ef6\u7cfb\u7edf\uff1avfat<br \/>\nWindows NT ntfs\u6587\u4ef6\u7cfb\u7edf\uff1antfs<br \/>\nMount Windows\u6587\u4ef6\u7f51\u7edc\u5171\u4eab\uff1asmbfs\uff08\u9700\u5185\u6838\u652f\u6301\uff09\u63a8\u8350cifs<br \/>\nUNIX(LINUX) \u6587\u4ef6\u7f51\u7edc\u5171\u4eab\uff1anfs<\/p>\n<p>-o \u8be6\u7ec6\u9009\u9879:<\/p>\n<p>loop \uff1a\u7528\u6765\u628a\u4e00\u4e2a\u6587\u4ef6\u5f53\u6210\u786c\u76d8\u5206\u533a\u6302\u63a5\u4e0a\u7cfb\u7edf<br \/>\nro \uff1a\u91c7\u7528\u53ea\u8bfb\u65b9\u5f0f\u6302\u63a5\u8bbe\u5907<br \/>\nrw \uff1a\u91c7\u7528\u8bfb\u5199\u65b9\u5f0f\u6302\u63a5\u8bbe\u5907<br \/>\niocharset \uff1a\u6307\u5b9a\u8bbf\u95ee\u6587\u4ef6\u7cfb\u7edf\u6240\u7528\u5b57\u7b26\u96c6,\u4f8b\u5982iocharset=utf8<br \/>\nremount \uff1a\u91cd\u65b0\u6302\u8f7d\uff08\u76f8\u5f53\u4e8eumount\u518dmount\uff09,\u540e\u9762\u53ef\u63a5\u5177\u4f53\u8def\u5f84<br \/>\nnoatime: \u4ee5\u4e0d\u66f4\u65b0access time\u7684\u65b9\u5f0f\u6302\u8f7d\uff0c\u5728\u6587\u4ef6\u6570\u76ee\u8fc7\u591a\u6ce8\u91cd\u6027\u80fd\u800c\u4e0d\u6ce8\u91cdaccess time\u65f6\u4f7f\u7528\uff0c\u6548\u679c\u597d\u3002<\/p>\n<p>\u4f7f\u7528\u5b9e\u4f8b:<\/p>\n<p>\u6302\u8f7dwindows\u6587\u4ef6\u5171\u4eab<\/p>\n<pre>mount -t smbfs -o username=admin,password=123456 \/\/192.168.1.2\/c$ \/mnt\/samba\r\n mount -t cifs -o username=xxx,password=xxx \/\/IP\/sharename \/mnt\/dirname<\/pre>\n<p>\u6302\u8f7dLinux\u6587\u4ef6nfs\u5171\u4eab<\/p>\n<pre>mount -t nfs -o rw 192.168.1.2:\/usr\/www \/usr\/www<\/pre>\n<p>\u6302\u8f7dntfs\u683c\u5f0fUSB\u79fb\u52a8\u786c\u76d8<\/p>\n<pre>mount -t ntfs \/dev\/sdc1 \/root\/usb<\/pre>\n<p>\u6302\u8f7dCDROM<\/p>\n<pre>mount \/dev\/cdrom \/home\/cd<\/pre>\n<p>\u5355\u7528\u6237\u6a21\u5f0f\u91cd\u65b0\u6302\u8f7d\u6839\u5206\u533a<\/p>\n<pre>mount -o remount,rw \/<\/pre>\n<p>umount\u547d\u4ee4\u7528\u4e8e\u89e3\u6302\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\uff0c\u4e4b\u524d\u6302\u8f7d\u7684\u54ea\u5c31\u89e3\u6302\u54ea\uff0c\u4e00\u822c\u8981\u9000\u51fa\u5bf9\u5e94\u76ee\u5f55\u4e14\u4e0d\u518d\u4f7f\u7528\uff0c\u5426\u5219\u4f1a\u63d0\u793a \u00a0umount: \/mnt\/iso: device is busy.<\/p>\n<p>umount [-f] directory \uff0c\u5982\u679c\u6587\u4ef6\u7cfb\u7edf\u6b63\u5728\u4f7f\u7528\u65f6\u4f1a\u65e0\u6cd5\u89e3\u6302\uff0c\u53ef\u4f7f\u7528-f\uff0c\u5f3a\u5236\u89e3\u6302<\/p>\n<p>\u53d6\u6d88\u6302\u8f7d<\/p>\n<pre>umount \/dev\/cdrom \/home\/cd<\/pre>\n<p>iso\u76f8\u5173<\/p>\n<p>\u6302\u8f7diso\u955c\u50cf<\/p>\n<pre>mkdir -p \/mnt\/iso\r\nmount -o loop -t iso9660 XenServer-6.1-install-cd.iso \/mnt\/iso<\/pre>\n<p>\u5236\u4f5c\u5149\u76d8\u955c\u50cf<\/p>\n<p>\u5f53cdrom\u6709\u5149\u76d8\u65f6<\/p>\n<pre>cp \/dev\/cdrom ~\/mydisk.iso<\/pre>\n<p>\u5236\u4f5c\u6307\u5b9a\u76ee\u5f55\/root\/dir\u7684\u955c\u50cf<\/p>\n<pre>mkisofs -r -J -V iso-real-name -o \/usr\/mydisk.iso \/root\/dir<\/pre>\n<p>\u9ad8\u7ea7\u4f8b\u5b50<\/p>\n<p>mount -o bind\u6216mount &#8211;bind<\/p>\n<p>\u4e00\u76d8mount\u90fd\u662f\u6302\u8f7d\u8bbe\u5907\u6587\u4ef6\uff0c\u4f7f\u7528mount -o bind\u53ef\u4ee5\u628a\u76ee\u5f55\uff0c\u6587\u4ef6\u6302\u8f7d\u5230\u53e6\u4e00\u4e2a\u76ee\u5f55\uff0c\u6587\u4ef6<\/p>\n<p>\u5982\u628a\/tmp\/hosts\u6587\u4ef6\u6302\u8f7d\u5230\/etc\/hosts<\/p>\n<p>touch \/tmp\/hosts<\/p>\n<p>\u8fd9\u65f6\/tmp\/hosts\u662f\u7a7a\u7684\uff0c\u5f53\u5c06\/tmp\/hosts\u6302\u8f7d\u5230\/etc\/hosts\u540e\uff0c\u6ce8\u610f\u987a\u5e8f<\/p>\n<p>mount -o bind \/tmp\/hosts \/etc\/hosts<\/p>\n<p>\u4f7f\u7528mount\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5230\/tmp\/hosts on \/etc\/hosts type none (rw,bind)<\/p>\n<p>\u53d1\u73b0\/tmp\/hosts\u4e0e\/etc\/hosts\u90fd\u662f\u7a7a\u7684\u4e86\uff0c\u5f53umount \/tmp\/hosts\u4e4b\u540e\uff0c\u53c8\u6062\u590d\u6210\u539f\u6765\u7684\/etc\/hosts\u3002\u8fd9\u6837\u53ef\u4ee5\u968f\u4fbf\u522b\u4eba\u7528\/etc\/hosts\uff0c\u5f53\u522b\u4eba\u7528\u5b8c\u4e4b\u540e\uff0cumount\u5c31\u80fd\u5207\u6362\u8fc7\u6765\u3002<\/p>\n<p>mount -o bind\u53c2\u8003\uff1a<a href=\"http:\/\/nvd11.blog.163.com\/blog\/static\/2000183122012720113256766\/\">http:\/\/nvd11.blog.163.com\/blog\/static\/2000183122012720113256766\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u547d\u4ee4\u683c\u5f0f\uff1a mount -a \uff0c\u4f1a\u628a\/etc\/fstab\u5217\u51fa\u7684\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d mount -t \u7c7b\u578b -o \u6302\u63a5\u65b9\u5f0f \u6e90\u8def\u5f84 \u76ee\u6807\u8def\u5f84 -t \u8be6\u7ec6\u9009\u9879: \u5149\u76d8\u6216\u5149\u76d8\u955c\u50cf\uff1aiso9660 DOS fat16\u6587\u4ef6\u7cfb\u7edf\uff1amsdos Windows 9x fat32\u6587\u4ef6\u7cfb\u7edf\uff1avfat Windows NT ntfs\u6587\u4ef6\u7cfb\u7edf\uff1antfs Mount Windows\u6587\u4ef6\u7f51\u7edc\u5171\u4eab\uff1asmbfs\uff08\u9700\u5185\u6838\u652f\u6301\uff09\u63a8\u8350cifs UNIX(LINUX) \u6587\u4ef6\u7f51\u7edc\u5171\u4eab\uff1anfs -o \u8be6\u7ec6\u9009\u9879: loop \uff1a\u7528\u6765\u628a\u4e00\u4e2a\u6587\u4ef6\u5f53\u6210\u786c\u76d8\u5206\u533a\u6302\u63a5\u4e0a\u7cfb\u7edf ro \uff1a\u91c7\u7528\u53ea\u8bfb\u65b9\u5f0f\u6302\u63a5\u8bbe\u5907 rw \uff1a\u91c7\u7528\u8bfb\u5199\u65b9\u5f0f\u6302\u63a5\u8bbe\u5907 iocharset \uff1a\u6307\u5b9a\u8bbf\u95ee\u6587\u4ef6\u7cfb\u7edf\u6240\u7528\u5b57\u7b26\u96c6,\u4f8b\u5982iocharset=utf8 remount \uff1a\u91cd\u65b0\u6302\u8f7d\uff08\u76f8\u5f53\u4e8eumount\u518dmount\uff09,\u540e\u9762\u53ef\u63a5\u5177\u4f53\u8def\u5f84 noatime: \u4ee5\u4e0d\u66f4\u65b0access time\u7684\u65b9\u5f0f\u6302\u8f7d\uff0c\u5728\u6587\u4ef6\u6570\u76ee\u8fc7\u591a\u6ce8\u91cd\u6027\u80fd\u800c\u4e0d\u6ce8\u91cdaccess time\u65f6\u4f7f\u7528\uff0c\u6548\u679c\u597d\u3002 \u4f7f\u7528\u5b9e\u4f8b: \u6302\u8f7dwindows\u6587\u4ef6\u5171\u4eab mount -t smbfs -o username=admin,password=123456 \/\/192.168.1.2\/c$ \/mnt\/samba mount -t cifs -o [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8],"tags":[],"class_list":["post-4269","post","type-post","status-publish","format-standard","hentry","category-life","category-linux"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4269"}],"version-history":[{"count":20,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4269\/revisions"}],"predecessor-version":[{"id":6299,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4269\/revisions\/6299"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}