linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wishlist Item :: One Subvol in Multiple Places
@ 2014-10-14 22:25 Robert White
  2014-10-15 11:30 ` Austin S Hemmelgarn
  0 siblings, 1 reply; 3+ messages in thread
From: Robert White @ 2014-10-14 22:25 UTC (permalink / raw)
  To: linux-btrfs

I've got no idea if this is possible given the current storage layout, 
but it would be Really Nice™ if there were a way to have a single 
subvolume exist in more than one place in hirearchy. I know this can be 
faked via mount tricks (bind or use of subvol=), but having it be a real 
thing would be preferable.

For example, if I have two or more distributions on a computer or want 
to switch between 32bit and 64bit environments frequently, but I want to 
use the same /home (which is its own subvolume anyway) it would be nice 
if the native layout could be permuted such that /__System_32/home and 
/__System_64/home were the actual same subvolume.

The mechanism, were it possible, would be something like "btrfs 
subvolume link /existing/path /new/path" (or "bind" instead of "link")

I've got no idea if the directory structure would allow for this, but if 
it would it would simplify several things (for me anyway) if the file 
system layout represented the runtime layout.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Wishlist Item :: One Subvol in Multiple Places
  2014-10-14 22:25 Wishlist Item :: One Subvol in Multiple Places Robert White
@ 2014-10-15 11:30 ` Austin S Hemmelgarn
  2014-10-15 19:07   ` Robert White
  0 siblings, 1 reply; 3+ messages in thread
From: Austin S Hemmelgarn @ 2014-10-15 11:30 UTC (permalink / raw)
  To: Robert White, linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

On 2014-10-14 18:25, Robert White wrote:
> I've got no idea if this is possible given the current storage layout,
> but it would be Really Nice™ if there were a way to have a single
> subvolume exist in more than one place in hirearchy. I know this can be
> faked via mount tricks (bind or use of subvol=), but having it be a real
> thing would be preferable.
>
> For example, if I have two or more distributions on a computer or want
> to switch between 32bit and 64bit environments frequently, but I want to
> use the same /home (which is its own subvolume anyway) it would be nice
> if the native layout could be permuted such that /__System_32/home and
> /__System_64/home were the actual same subvolume.
>
> The mechanism, were it possible, would be something like "btrfs
> subvolume link /existing/path /new/path" (or "bind" instead of "link")
>
> I've got no idea if the directory structure would allow for this, but if
> it would it would simplify several things (for me anyway) if the file
> system layout represented the runtime layout.
This probably won't be implemented, for the same reason that most modern 
unix systems disallow hardlinks to directories; namely, it results in 
ambiguity regarding resolution of the .. directory entry.
The better solution would be to put /home in a separate top-level 
sub-volume, and then mount that in each location.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2455 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Wishlist Item :: One Subvol in Multiple Places
  2014-10-15 11:30 ` Austin S Hemmelgarn
@ 2014-10-15 19:07   ` Robert White
  0 siblings, 0 replies; 3+ messages in thread
From: Robert White @ 2014-10-15 19:07 UTC (permalink / raw)
  To: linux-btrfs

On 10/15/2014 04:30 AM, Austin S Hemmelgarn wrote:
> On 2014-10-14 18:25, Robert White wrote:
>> I've got no idea if this is possible given the current storage layout,
>> but it would be Really Nice™ if there were a way to have a single
>> subvolume exist in more than one place in hirearchy. I know this can be
>> faked via mount tricks (bind or use of subvol=), but having it be a real
>> thing would be preferable.
>>
>> For example, if I have two or more distributions on a computer or want
>> to switch between 32bit and 64bit environments frequently, but I want to
>> use the same /home (which is its own subvolume anyway) it would be nice
>> if the native layout could be permuted such that /__System_32/home and
>> /__System_64/home were the actual same subvolume.
>>
>> The mechanism, were it possible, would be something like "btrfs
>> subvolume link /existing/path /new/path" (or "bind" instead of "link")
>>
>> I've got no idea if the directory structure would allow for this, but if
>> it would it would simplify several things (for me anyway) if the file
>> system layout represented the runtime layout.
> This probably won't be implemented, for the same reason that most modern
> unix systems disallow hardlinks to directories; namely, it results in
> ambiguity regarding resolution of the .. directory entry.
> The better solution would be to put /home in a separate top-level
> sub-volume, and then mount that in each location.

Oh. Duh. I knew that...

Some days the brain, you know... 8-)

--Rob.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-15 19:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 22:25 Wishlist Item :: One Subvol in Multiple Places Robert White
2014-10-15 11:30 ` Austin S Hemmelgarn
2014-10-15 19:07   ` Robert White

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).