Re: Can I create a new fileystem, using Read-only Seed device, to change the ownership of the files in the seed device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One use case for "cloned" workspaces or "seeded" workspaces, is "prebuilt workspaces" for very large builds.

What would it take to add this capability to the btrfs roadmap? This would be very usefull.

Our use case is as following
   1. Our fully built software build workspaces can be 800GB+
   2. We have a nightly build that builds the whole workspace 800GB, done by a generic user "buildusr"
   3. We then snapshot that workspace with btrfs snapshotting capability.
   3. We want the developer, "sarvi", to be able to clone from that snapshot and be able to incremental software build and development in the cloned workspace or the seeded filesystem/workspace.

Problem: 
All the content, files, directories in the cloned workspace are still owned by "buildusr" and not "sarvi", which causes my builds to fail with permission problems.
Is there anything in btrfs that can help. 
For that matter any of the open source filesystems support seeding or snapshot/cloning that you might be aware of.

So far the only filesystem that seems have the capability map/change the file ownership as part of the clone operation is Netapp. 
And unfortunately that isn’t open source and wont serve our purpose.
 
Thanks,
Sarvi
Occam’s Razor Rules

On 4/30/20, 11:56 AM, "Chris Murphy" <lists@xxxxxxxxxxxxxxxxx> wrote:

    On Thu, Apr 30, 2020 at 12:44 PM Saravanan Shanmugham (sarvi)
    <sarvi@xxxxxxxxx> wrote:
    >
    > I have a problem that needs solving and I am trying to understand if BTRFS can solve it.
    >
    > I have diskimage(currently using ext4).  And I am considering btrfs for,
    > Lets call this filesystemA
    > This contains a software build tree done by userA and hence all files are owned by userA
    >
    > I want an almost instantaneous way to create or copy or clone or seed a new filesystem or directory tree filesystem B, with all the content in filesystem A but is owned by userB
    >
    > Question:
    > 1. if I created fileSystemA in btrfs and used it as a seed device in creating filesystem B, What file ownership does the filesystem B have?
    
    You mean unix owner and group? It will still be userA. The only thing
    that changes when making a sprout file system is the volume and device
    UUIDs.
    
    > 2. Can that be changed to userB with any option.
    
    Yes, you can use chown. The seed is not changed, just the sprout (the
    read write device).
    
    
    > 3. What happens when userB tries to modify a fileX on filesystemB that was seeded with filesystemA and has fileX owned by userA
    
    userB needs permission to make the change, unix owner or group or ACL,
    same as any file.
    
    
    > 3. I understand btrfs supports snapshots and clones. Does the cloned volume and all its files keep the original owners as in the original volume/snapshot, or can it be specified as part of the cloning process.
    
    It's unchanged, you can change it before or after removing the seed device.
    
    
    
    -- 
    Chris Murphy
    





[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux