|
|
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="icon" href="/public/logo.png">
- <link rel="stylesheet" href="/public/style.css">
- <title>🗄️ Mounting BTRFS subvolumes | Hacks.Wiki - A wikiful of hacks</title>
- <link href="/+/feed.rss" rel="alternate" title="Hacks.Wiki - A wikiful of hacks" type="application/rss+xml"><link href='https://hacks.wiki/+/activitypub/@hacks' rel='alternate' type='application/activity+json'><link rel="stylesheet" href="public/custom.css"><link rel="manifest" href="/manifest.json">
- <meta property="og:site_name" content="Hacks.Wiki - A wikiful of hacks" />
- <meta property="og:title" content="Mounting BTRFS subvolumes" />
- <meta property="og:description" content="If you have installed GNU/Linux with BTRFS as the filesystem, chances are that your OS installer has used sub-volumes for the root , home and other mount points. You can verify this by mounting the a" />
- <meta property="og:image" content="" />
- <meta property="og:url" content="https://hacks.wiki/Mounting%20BTRFS%20subvolumes" />
- <meta property="og:type" content="website" />
-
- <meta name="twitter:title" content="Mounting BTRFS subvolumes" />
- <meta name="twitter:description" content="If you have installed GNU/Linux with BTRFS as the filesystem, chances are that your OS installer has used sub-volumes for the root , home and other mount points. You can verify this by mounting the a" />
- <meta name="twitter:image" content="" />
- <meta name="twitter:card" content="summary_large_image" />
- <meta name="twitter:creator" content="abhasabhinav" />
- <meta name="twitter:site" content="abhasabhinav" />
- <meta name="twitter:image:alt" content="Mounting BTRFS subvolumes" />
-
- </head>
- <body>
-
-
-
-
-
-
-
-
-
-
- <div class="container is-max-desktop px-3" dir="auto" style="margin-bottom: 50vh;">
- <div class="columns pt-5">
- <div class="column">
- <a class="icon-text title is-5 pt-2" href="/">
- <span class="icon"><img alt="logo" src="/public/logo.png"/></span>
- <span>Hacks.Wiki - A wikiful of hacks</span>
- </a>
- </div>
-
-
-
-
- </div>
-
- <div dir="auto" class="title is-1 has-text-weight-bold">🗄️ Mounting BTRFS subvolumes</div>
-
- <div class="content">
-
-
- <div class="columns subtitle is-size-7">
-
-
- <div class="column">
- <span class="icon-text">
-
- <span class="icon"> <i class="fa-solid fa-clock"></i> </span>
- <span>Monday 27 February 2023</span>
-
- <span class="icon"> <i class="fa-solid fa-code-branch"></i> </span>
- <span>2 versions</span>
-
- </span>
- </div>
-
-
-
-
- </div>
-
- <div class="view">
-
- <p dir="auto">If you have installed GNU/Linux with BTRFS as the filesystem, chances are that your OS installer has used <strong>sub-volumes</strong> for the <code>root</code>, <code>home</code> and other mount points. 🗄️</p>
- <p dir="auto">You can verify this by mounting the actual root filesystem device and listing its contents:</p>
- <pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1</span><span><span style="color:#6272a4"># ls -l /mnt/</span>
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2</span><span>total <span style="color:#bd93f9">0</span>
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">204</span> Feb <span style="color:#bd93f9">22</span> 13:28 @
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">180</span> Feb <span style="color:#bd93f9">22</span> 14:29 @cache
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">10</span> Dec <span style="color:#bd93f9">2</span> 10:52 @home
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">6</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">482</span> Feb <span style="color:#bd93f9">26</span> 00:00 @log
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">7</span><span>drwxr-x--- <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">350</span> Feb <span style="color:#bd93f9">23</span> 15:40 @root
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">8</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">14</span> Oct <span style="color:#bd93f9">19</span> 07:42 @srv
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">9</span><span>drwxrwxrwt <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">1576</span> Feb <span style="color:#bd93f9">27</span> 17:18 @tmp
- </span></span></code></pre><p dir="auto">Here <code>@</code>, <code>@home</code>, <code>@log</code> etc. are the BTRFS sub-volumes. <code>@</code> is the OS root sub-volume. You can mount by giving the <code>-osubvol=@</code> option to the mount command:</p>
- <pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;"><code><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 1</span><span><span style="color:#6272a4"># mount -osubvol=@ /dev/dm-0 /mnt/</span>
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 2</span><span><span style="color:#6272a4"># ls -l /mnt/</span>
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 3</span><span>total <span style="color:#bd93f9">24</span>
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 4</span><span>lrwxrwxrwx <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">7</span> Feb <span style="color:#bd93f9">1</span> 02:21 bin -> usr/bin
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 5</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">208</span> Feb <span style="color:#bd93f9">22</span> 13:30 boot
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 6</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">8</span> Oct <span style="color:#bd93f9">20</span> 18:39 dev
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 7</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">5018</span> Feb <span style="color:#bd93f9">25</span> 10:56 etc
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 8</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">0</span> Dec <span style="color:#bd93f9">2</span> 10:48 home
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 9</span><span>lrwxrwxrwx <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">7</span> Feb <span style="color:#bd93f9">1</span> 02:21 lib -> usr/lib
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">10</span><span>lrwxrwxrwx <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">7</span> Feb <span style="color:#bd93f9">1</span> 02:21 lib64 -> usr/lib
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">11</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">22</span> Dec <span style="color:#bd93f9">16</span> 13:00 mnt
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">12</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">214</span> Feb <span style="color:#bd93f9">23</span> 15:50 opt
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">13</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">0</span> Dec <span style="color:#bd93f9">2</span> 10:48 proc
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">14</span><span>drwxr-xr-x <span style="color:#bd93f9">1</span> root root <span style="color:#bd93f9">66</span> Oct <span style="color:#bd93f9">20</span> 18:47 root
- </span></span><span style="display:flex;"><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">15</span><span> .... .... ....
- </span></span></code></pre><p dir="auto"><a href="/+/tag/linux" class="tag is-info is-light">#linux</a> <a href="/+/tag/btrfs" class="tag is-info is-light">#btrfs</a> <a href="/+/tag/systemrescue" class="tag is-info is-light">#systemrescue</a> <a href="/+/tag/filesystem" class="tag is-info is-light">#filesystem</a></p>
-
-
- <h1> Backlinks </h1>
- <ul>
-
- <li>
- <a href="/Migrate%20from%20UEFI%20to%20%28Legacy%29%20BIOS" dir="auto">🔁 Migrate from UEFI to (Legacy) BIOS</a> <time class="has-text-grey is-size-7">Tuesday 28 February 2023</time>
- </li>
-
- </ul>
-
-
-
- <h1> See Also </h1>
- <ul>
-
- <li>
- <a href="/Chromebox-Audio" dir="auto">🎧 Chromebox-Audio</a> <time class="has-text-grey is-size-7">Monday 27 February 2023</time>
- </li>
-
- </ul>
-
-
-
- </div>
-
-
-
-
- </div>
-
-
-
- <footer class="mt-6 p-3 py-5">
- <hr/>
-
- <nav class="breadcrumb has-bullet-separator">
- <ul>
-
-
- <li>
- <a href="/+/tags" class="icon-text has-text-grey-dark">
- <span class="icon">
-
- <i class="fa-solid fa-tags"></i>
- </span>
- <span>Hashtags</span>
- </a>
- </li>
-
-
-
- <li>
- <a href="/+/recent" class="icon-text has-text-grey-dark">
- <span class="icon">
-
- <i class="fa-solid fa-clock-rotate-left"></i>
- </span>
- <span>Recent</span>
- </a>
- </li>
-
-
-
- <li>
- <a href="/+/feed.rss" class="icon-text has-text-grey-dark">
- <span class="icon">
-
- <i class="fa-solid fa-rss"></i>
- </span>
- <span>RSS</span>
- </a>
- </li>
-
-
-
- <li>
- <a href="/Home" class="icon-text has-text-grey-dark">
- <span class="icon">
-
- 🏡
- </span>
- <span>Home</span>
- </a>
- </li>
-
-
- </ul>
- </nav>
-
- </footer>
-
-
- </div>
- </body>
- </html>
-
|