Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source and Destination relative to block device [Feature Request] #17

Open
flungo opened this issue Jan 26, 2016 · 2 comments
Open

Source and Destination relative to block device [Feature Request] #17

flungo opened this issue Jan 26, 2016 · 2 comments

Comments

@flungo
Copy link

flungo commented Jan 26, 2016

I am not sure if this is something that would be considered useful, or within the scope of this project but I would like to see the ability to reference locations relative to the root of block devices so that it can be used on unmounted disks.

The format for a location would be:

[btrfs://]<block dev>//<path relative to root of block dev>/[snapshot]

In terms of implementation, it would probably require the mounting of the block device to a temporary location (that is unmounted and deleted once the operation is completed).

I have implemented this using a wrapper script for my dockerisation of ButterSink and this works for my purposes. Please take a look at the bash script for the rough pseudo code of what would be implemented bearing in mind that:

  • You would want to mount to a temporary location (not /mnt/<block dev> as I do) as unlike in a docker container where I can guarantee that /mnt/<block dev> is not being used, when running on the host the same cannot be said when running on a host machine.
  • I haven't implemented unmounting as everything will become unmounted at the end of the lifetime of the container.

If you think the feature would be useful but don't have the time to make the changes, I can do this and send a PR and if not, I understand that this is probably a very niche scenario.

@AmesCornish
Copy link
Owner

That is an interesting feature request that I haven't gotten before. I don't have time to implement myself, but I'd be happy to get a PR. One implementation note -- I'd rather not overload the btrfs: scheme for this, I'm afraid it could be confusing to users. I'd prefer something like:

[dev://]<block dev>//<path relative to root of block dev>/[snapshot]

Btw, very cool that you've dockerized buttersink! If you'd like, I'll add a link in the ReadMe the next time I do an update.

@flungo
Copy link
Author

flungo commented Feb 1, 2016

Okay, I will have a look into doing that when I get time. It's mostly useful for using in the dockerised version, but I am sure one could find other uses.

With regards to linking it in the README, that would be great, but I would say it would be best if I do a little more testing with it first. It will be really useful for production systems running an OS like CoreOS where installing python is made difficult as it breaks the design of CoreOS that everything (other than the core) should be containerised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants