{"id":961,"date":"2012-01-21T01:18:11","date_gmt":"2012-01-21T00:18:11","guid":{"rendered":"http:\/\/www.stenyak.com\/?p=961"},"modified":"2012-01-21T01:18:11","modified_gmt":"2012-01-21T00:18:11","slug":"awesomemounter-join-plug-n-play-drives-into-a-single-large-directory","status":"publish","type":"post","link":"https:\/\/www.stenyak.com\/?p=961","title":{"rendered":"AwesomeMounter: join plug&#8217;n&#8217;play drives into a single large directory"},"content":{"rendered":"<p>Have you ever run out of space, and decided to <strong>offload<\/strong> some of the bigger files to a second (<em>or third&#8230;<\/em>) disk?\u00a0Sometimes even an <strong>external<\/strong> drive?<br \/>\nAre you tired of having to look around all disks in order to find <em>that<\/em>\u00a0specific file?<\/p>\n<p>Well, you&#8217;re in luck!<br \/>\nBecause <strong>AwesomeMounter<\/strong> is an <em>awesome<\/em> program that will get you rid of all that mess,<strong> without ever needing to know<\/strong> what <a class=\"vt-p\" href=\"http:\/\/en.wikipedia.org\/wiki\/Logical_Volume_Manager_(Linux)\">LVM<\/a>, <a class=\"vt-p\" href=\"http:\/\/en.wikipedia.org\/wiki\/RAID\">RAID<\/a>, or even\u00a0<em><a class=\"vt-p\" href=\"http:\/\/en.wikipedia.org\/wiki\/File_system#Disk_file_systems\">filesystem<\/a><\/em>\u00a0means.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" class=\"size-medium wp-image-964 aligncenter\" style=\"margin-top: 4px; margin-bottom: 4px; border-width: 4px; border-color: black; border-style: solid;\" title=\"AwesomeMounter\" src=\"http:\/\/www.stenyak.com\/wp-content\/uploads\/2012\/01\/awesome-300x187.jpg\" alt=\"\" width=\"300\" height=\"187\" \/><\/p>\n<p>(&#8230;probably!)<\/p>\n<p>AwesomeMounter is <strong>free<\/strong>\u00a0and\u00a0<strong>GPLv3<\/strong>.\u00a0Based on <a class=\"vt-p\" href=\"http:\/\/en.wikipedia.org\/wiki\/Inotify\">inotify<\/a> and <a class=\"vt-p\" href=\"http:\/\/mhddfs.uvw.ru\/\">mhddfs<\/a>\u00a0[<a class=\"vt-p\" href=\"http:\/\/svn.uvw.ru\/mhddfs\/trunk\/README\">en<\/a>], it&#8217;s actually a pretty simple bash script (so if you&#8217;re interested, you can easily tinker with it).<\/p>\n<p>&nbsp;<\/p>\n<h2>What can <strong>AwesomeMounter<\/strong> do?<\/h2>\n<p>Here&#8217;s an example. You&#8217;ve got 3 places where you store music: your Linux home (50 gigs), a Windows partition (100gigs), and an 8 gigs USB pendrive:<\/p>\n<ol>\n<li><code><span style=\"color: #0066ff;\"><strong>\/home\/foo\/music\/<\/strong><\/span><\/code> <span style=\"color: #000000;\">(has reggae and jazz subdirectories)<\/span><\/li>\n<li><code><span style=\"color: #009900;\"><strong>\/mnt\/windows\/data\/mp3\/<\/strong><\/span><\/code> <span style=\"color: #000000;\">(has pop and jazz subdirectories)<\/span><\/li>\n<li><code><span style=\"color: #ff3300;\"><strong>\/media\/pendrive\/songs\/<\/strong><\/span><\/code> <span style=\"color: #000000;\">(has hiphop and electro subdirectories)<\/span><\/li>\n<\/ol>\n<p>And you want all the music in a single place. Namely:<\/p>\n<ul>\n<li><strong><code>\/music\/\u00a0<\/code><\/strong>(will contain all the aforementioned music)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>With AwesomeMounter, you can access music <strong>through the 3 original paths<\/strong>, or<strong> through <code>\/music\/<\/code><\/strong>, like this:<br \/>\n<code><\/code><\/p>\n<ul>\n<li><code><strong><span style=\"color: #cc3300;\">\/m<\/span><span style=\"color: #339900;\">us<\/span><span style=\"color: #0066ff;\">ic<\/span><\/strong><span style=\"color: #0066ff;\">\/<span style=\"color: #000000;\"> (total size: 50+100+8 = <strong>158 gigs<\/strong>!)<\/span><\/span><\/code><\/li>\n<ul>\n<li><code><span style=\"color: #0066ff;\">\/<\/span><strong><span style=\"color: #0066ff;\">reggae<\/span><\/strong><\/code><\/li>\n<li><strong><code><span style=\"color: #339900;\">\/pop<\/span><\/code><\/strong><\/li>\n<li><code><span style=\"color: #0066ff;\">\/<\/span><strong><span style=\"color: #0066ff;\">j<\/span><span style=\"color: #0066ff;\">a<\/span><span style=\"color: #339900;\">zz<\/span><\/strong><\/code><\/li>\n<li><code><span style=\"color: #cc3300;\">\/<\/span><strong><span style=\"color: #cc3300;\">hiphop<\/span><\/strong><\/code><\/li>\n<li><code><span style=\"color: #cc3300;\">\/<\/span><strong><span style=\"color: #cc3300;\">electro<\/span><\/strong><\/code><\/li>\n<\/ul>\n<\/ul>\n<p>How cool is that?<\/p>\n<p>&nbsp;<\/p>\n<h2>Plug-n-Play!<\/h2>\n<p>With AwesomeMounter, you gain the ability to <strong>disconnect <\/strong>(or umount)<strong> any drive at any time<\/strong>.<br \/>\nReciprocally, whenever a previously set-up drive is <strong>connected or mounted again<\/strong> to your system, the data will automatically reappear where the AwesomeMounter config files tells it to.<\/p>\n<p>This makes it <strong>perfect in combination with external drives<\/strong>, such as pendrives, USB hard disks, cellphones, memory cards&#8230;<\/p>\n<p>&nbsp;<\/p>\n<p>Continuing the example: the USB pendrive at <code>\/media\/pendrive\/<\/code>, can be removed as you normally would (e.g.\u00a0<em>right click<\/em> -&gt; <em>unmount drive<\/em>), and \/music\/hiphop and \/music\/electro will <strong>automatically<\/strong> disappear from \/music.<\/p>\n<p>&nbsp;<\/p>\n<h2>Storage balancing!<\/h2>\n<h3>(a.k.a. what happens when I write stuff in there?)<\/h3>\n<p><img loading=\"lazy\" class=\"alignright  wp-image-977\" style=\"margin-top: 4px; margin-bottom: 4px; border-width: 4px; border-color: black; border-style: solid;\" title=\"(c) Peter Riedel\/Rex Features\" src=\"http:\/\/www.stenyak.com\/wp-content\/uploads\/2012\/01\/balancing-217x300.jpg\" alt=\"(c) Peter Riedel\/Rex Features\" width=\"130\" height=\"180\" \/><br \/>\nAny new file you try to write, will automatically be put in the drive with the most free space.<\/p>\n<p>E.g.: If your pendrive is full, data will be stored somewhere else.<\/p>\n<p>&nbsp;<\/p>\n<p>If you <strong>need<\/strong>\u00a0to write stuff to a specific drive, you can bypass this awesome <strong>automatic storage balancing<\/strong>. by\u00a0simply using the corresponding original path at\u00a0<code>\/media\/pendrive\/*<\/code>, instead of the joined path that AwesomeMounter made available to you at <code>\/music\/<\/code>.<\/p>\n<p>&nbsp;<\/p>\n<h2>How do I use it?<\/h2>\n<p>First, copy the script anywhere on your disk, and give it execution permissions.<\/p>\n<p>Then, create a configuration file at ~\/.awesomemounter\/config. Example file:<\/p>\n<pre><span style=\"color: #008000;\">##########################\n# some configured dirs:<\/span>\n\/music \/home\/foo\/music<strong>,<\/strong>\/media\/pendrive\/songs\n\/movies\u00a0\/home\/foo\/videos<strong>,<\/strong>\/media\/bigHDD\n\/downloads \/home\/foo\/incoming<strong>,<\/strong>\/mnt\/windows\/p2p\n<span style=\"color: #008000;\"># you can nest mounts w\/out problems<\/span>\n\/video \/movies<strong>,<\/strong>\/downloads\/series<strong>,<\/strong>\/home\/foo\/docus\n<span style=\"color: #008000;\">##########################<\/span><\/pre>\n<pre><\/pre>\n<p>Then simply run awesomemounter from command line (you may be prompted for root access):<\/p>\n<pre>$ .\/awesomemounter.sh<\/pre>\n<p>That&#8217;s it!<\/p>\n<p>&nbsp;<\/p>\n<h2>Where do I get it?<\/h2>\n<p><a class=\"vt-p\" href=\"https:\/\/github.com\/stenyak\/AwesomeMounter\/blob\/master\/awesomemounter.sh\"><img loading=\"lazy\" class=\"alignleft size-thumbnail wp-image-982\" style=\"border-width: 4px; border-color: black; border-style: solid; margin: 4px;\" title=\"github\" src=\"http:\/\/www.stenyak.com\/wp-content\/uploads\/2012\/01\/github-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a>AwesomeMounter is available at GitHUB:<\/p>\n<p><a class=\"vt-p\" href=\"https:\/\/github.com\/stenyak\/AwesomeMounter\/blob\/master\/awesomemounter.sh\">https:\/\/github.com\/stenyak\/AwesomeMounter<\/a><\/p>\n<p>Don&#8217;t forget to create the config file!<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #800000;\"><strong>DISCLAIMER<\/strong><\/span>: Use at your own risk. If your house burns down because of it, don&#8217;t blame me. Instead, call the firefighters and <em>only\u00a0then\u00a0<\/em>don&#8217;t blame me.<\/p>\n<h2><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever run out of space, and decided to offload some of the bigger files to a second (or third&#8230;) disk?\u00a0Sometimes even an external drive? Are you tired of having to look around all disks in order to find that\u00a0specific file? Well, you&#8217;re in luck! Because AwesomeMounter is an awesome program that will get [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[13],"_links":{"self":[{"href":"https:\/\/www.stenyak.com\/index.php?rest_route=\/wp\/v2\/posts\/961"}],"collection":[{"href":"https:\/\/www.stenyak.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stenyak.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stenyak.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stenyak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=961"}],"version-history":[{"count":0,"href":"https:\/\/www.stenyak.com\/index.php?rest_route=\/wp\/v2\/posts\/961\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stenyak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stenyak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stenyak.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}