{"id":4561,"date":"2015-05-10T10:40:28","date_gmt":"2015-05-10T02:40:28","guid":{"rendered":"http:\/\/vanraspi.dnamer.net\/wordpress\/?p=101"},"modified":"2015-05-10T10:40:28","modified_gmt":"2015-05-10T02:40:28","slug":"%e5%8f%af%e5%86%99%e7%9a%84mount%e7%a7%bb%e5%8a%a8%e7%a1%ac%e7%9b%98","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=4561","title":{"rendered":"\u53ef\u5199\u7684Mount\u79fb\u52a8\u786c\u76d8"},"content":{"rendered":"<p>\u6811\u8393\u6d3e\u4e00\u822c\u81ea\u52a8mount\u65f6\u53ea\u6709\u53ea\u8bfb\u6743\u9650\uff0c \u8fd9\u4f7f\u5f97minidlna1.1.4\u4e5f\u4e0d\u80fd\u6b63\u786e\u5904\u7406\u6807\u7b7e\u3002 \u6211\u4eec\u6709\u5fc5\u8981\u53ef\u5199\u7684\u6302\u8f7d\u79fb\u52a8\u786c\u76d8\u3002<\/p>\n<ol>\n<li>\u9996\u5148\u9700\u8981\u5b89\u88c5\u652f\u6301\u683c\u5f0fntfs-3g\uff1a<code>sudo apt-get install ntfs-3g<\/code><\/li>\n<li>\u7136\u540e\u65b0\u5efa\u6302\u8f7d\u70b9\uff1asudo mkdir \/media\/mnt<\/li>\n<li>\u6700\u540e\u6302\u8f7d\uff1a <code>sudo mount -t ntfs-3g \/dev\/sdax \/media\/mnt<\/code><br \/>\n\u8fd9\u91cc<code>sdax<\/code>\uff0c \u8868\u793a\u79fb\u52a8\u786c\u76d8\u7684\u5206\u533a\u8868\uff0c\u53ef\u4ee5\u7528<code>df<\/code>\u67e5\u770b\u3002\u5982\u679c\u5df2\u7ecf\u6302\u8f7d\uff0c \u53ef\u4ee5\u7528<code>sudo umount \/dev\/sdax<\/code>\u53d6\u6d88\u6302\u8f7d\u3002<\/li>\n<\/ol>\n<h4>\u81ea\u52a8\u8f6c\u6362mp3 tag (\u89e3\u51b3minidlna\u4e71\u7801)<\/h4>\n<ol>\n<li>clone mp3tagiconv: <code>git clone https:\/\/github.com\/cxcxcxcx\/mp3tagiconv.git<\/code>\n<\/li>\n<li>\u5b89\u88c5\u4f9d\u8d56\u5305mutagen (\u5728Ubuntu\u662fpython-mutagen): <code>sudo apt-get install python-mutagen<\/code><\/li>\n<li>\n\u8fd0\u884c\u8f6c\u6362:<code>.\/mp3tagiconv --do-update ~\/downloads\/Torrent_complete\/music\/*\/*.mp3<\/code><br \/>\n\u8fd9\u91cc\u8868\u793a\u8f6c\u6362music\u6240\u6709\u5b50\u76ee\u5f55\u4e0b\u7684mp3 tag, \u4e14\u4e0d\u52a0\u786e\u8ba4.<br \/>\n\u8981\u70b9\u662fmp3\u6587\u4ef6\u8981\u53ef\u5199.\n<\/li>\n<li>\u7136\u540e\u626b\u63cf\u5a92\u4f53\u5e93\u5e76\u91cd\u542fminidlna:<code>sudo minidlnad -R && sudo service minidlna restart<\/code>\n<\/li>\n<\/ol>\n<p>\u53c2\u8003: <\/p>\n<ol>\n<li><a href=\"http:\/\/linux-wiki.cn\/wiki\/zh-hans\/Mp3%E6%A0%87%E7%AD%BE%E4%B9%B1%E7%A0%81%E9%97%AE%E9%A2%98%E5%88%86%E6%9E%90%E4%B8%8E%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88\">Mp3\u6807\u7b7e\u4e71\u7801\u95ee\u9898\u5206\u6790\u4e0e\u89e3\u51b3\u65b9\u6848<\/a>\n<\/li>\n<li><a href=\"https:\/\/github.com\/cxcxcxcx\/mp3tagiconv\">cxcxcxcx\/mp3tagiconv<\/a>\n<\/li>\n<\/ol>\n<h4>\u81ea\u52a8\u6302\u8f7d\u79fb\u52a8\u786c\u76d8(\u53ef\u5199)<\/h4>\n<p>create a new file:<code> sudo vim \/etc\/udev\/rules.d\/10-usbstorage.rules<\/code><\/p>\n<pre>\nKERNEL!=\"sd*\", GOTO=\"media_by_label_auto_mount_end\"\nSUBSYSTEM!=\"block\",GOTO=\"media_by_label_auto_mount_end\"\nIMPORT{program}=\"\/sbin\/blkid -o udev -p %N\"\nENV{ID_FS_TYPE}==\"\", GOTO=\"media_by_label_auto_mount_end\"\nENV{ID_FS_LABEL}!=\"\", ENV{dir_name}=\"%E{ID_FS_LABEL}\"\nENV{ID_FS_LABEL}==\"\", ENV{dir_name}=\"Untitled-%k\"\nACTION==\"add\", ENV{mount_options}=\"relatime,sync\"\nACTION==\"add\", ENV{ID_FS_TYPE}==\"vfat\", ENV{mount_options}=\"iocharset=utf8,umask=000\"\nACTION==\"add\", ENV{ID_FS_TYPE}==\"ntfs\", ENV{mount_options}=\"iocharset=utf8,umask=000\"\nACTION==\"add\", RUN+=\"\/bin\/mkdir -p \/media\/%E{dir_name}\", RUN+=\"\/bin\/mount -o $env{mount_options} \/dev\/%k \/media\/%E{dir_name}\"\n\nACTION==\"remove\", ENV{dir_name}!=\"\", RUN+=\"\/bin\/umount -l \/media\/%E{dir_name}\", RUN+=\"\/bin\/rmdir \/media\/%E{dir_name}\"\nLABEL=\"media_by_label_auto_mount_end\"\n<\/pre>\n<p>Then update udev by:<code>sudo \/etc\/init.d\/udev restart<\/code>\uff0c wait a few minutes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6811\u8393\u6d3e\u4e00\u822c\u81ea\u52a8mount\u65f6\u53ea\u6709\u53ea\u8bfb\u6743\u9650\uff0c \u8fd9\u4f7f\u5f97minidlna1.1.4\u4e5f\u4e0d\u80fd &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=4561\"> <span class=\"screen-reader-text\">\u53ef\u5199\u7684Mount\u79fb\u52a8\u786c\u76d8<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[754],"class_list":["post-4561","post","type-post","status-publish","format-standard","hentry","category-10","tag-754"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/4561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4561"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/4561\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}