All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] btrfs filesystem image as subvolume
@ 2019-01-21 20:57 Gervais, Francois
  2019-01-23  9:26 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Gervais, Francois @ 2019-01-21 20:57 UTC (permalink / raw)
  To: buildroot

Hi,

I tried the btrfs filesystem image and it works fine however in my
use-case I'd like to have only the subvolume and not the whole btrfs
filesystem.

Basically the output of "btrfs send".

I'd first like to make sure this is not possible today and discuss some
high level guidelines you would like me to follow when I implement
the feature.

Should I add a sub-option to the "btrfs root filesystem" menu?
Should if have it's own "Filesystem images" entry?

Thank you

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

* [Buildroot] btrfs filesystem image as subvolume
  2019-01-21 20:57 [Buildroot] btrfs filesystem image as subvolume Gervais, Francois
@ 2019-01-23  9:26 ` Peter Korsgaard
  2019-01-23  9:44   ` Robert Heywood
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2019-01-23  9:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Gervais," == Gervais, Francois <FGervais@distech-controls.com> writes:

Hi,

 > Hi,
 > I tried the btrfs filesystem image and it works fine however in my
 > use-case I'd like to have only the subvolume and not the whole btrfs
 > filesystem.

 > Basically the output of "btrfs send".

 > I'd first like to make sure this is not possible today and discuss some
 > high level guidelines you would like me to follow when I implement
 > the feature.

 > Should I add a sub-option to the "btrfs root filesystem" menu?
 > Should if have it's own "Filesystem images" entry?

Adding Robert who contributed the btrfs support. Robert, any feedback on
this?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] btrfs filesystem image as subvolume
  2019-01-23  9:26 ` Peter Korsgaard
@ 2019-01-23  9:44   ` Robert Heywood
  2019-01-23 13:51     ` Gervais, Francois
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Heywood @ 2019-01-23  9:44 UTC (permalink / raw)
  To: buildroot

Hi all.

I wanted the same kind of functionality, but found that mkfs.btrfs doesn't 
support much more than dumping the files into the root of the filesystem.
As a workaround, I made a script that mounts the filesystem, creates the 
subvolume and uses btrfs-send to create the stream.

Sadly it requires root access, so it's not something that can be added to 
buildroot. However, you're welcome to use the script if you want :)

https://github.com/robjh/buildroot-dev/blob/robjh-tmpfiles/robjh/make_btrfs_stream.sh

run it from your buildroot directory with sudo.
It'll produce ./output/images/os.btrfss, which you can use with btrfs-receive.

You might also want to look at this script, which uses the os.btrfss file to 
create a btrfs filesystem on a flash drive, with my desired layout. and with 
compression enabled;

https://github.com/robjh/buildroot-dev/blob/robjh-tmpfiles/robjh/prep_sd.sh

I hope this helps.

kind regards, rob.

On 23/01/2019 09:26, Peter Korsgaard wrote:
>>>>>> "Gervais," == Gervais, Francois <FGervais@distech-controls.com> writes:
> 
> Hi,
> 
>   > Hi,
>   > I tried the btrfs filesystem image and it works fine however in my
>   > use-case I'd like to have only the subvolume and not the whole btrfs
>   > filesystem.
> 
>   > Basically the output of "btrfs send".
> 
>   > I'd first like to make sure this is not possible today and discuss some
>   > high level guidelines you would like me to follow when I implement
>   > the feature.
> 
>   > Should I add a sub-option to the "btrfs root filesystem" menu?
>   > Should if have it's own "Filesystem images" entry?
> 
> Adding Robert who contributed the btrfs support. Robert, any feedback on
> this?
> 

-- 
Robert Heywood, Codethink Ltd.
<blink>Privacy policy; https://www.codethink.co.uk/privacy.html</blink>

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

* [Buildroot] btrfs filesystem image as subvolume
  2019-01-23  9:44   ` Robert Heywood
@ 2019-01-23 13:51     ` Gervais, Francois
  0 siblings, 0 replies; 4+ messages in thread
From: Gervais, Francois @ 2019-01-23 13:51 UTC (permalink / raw)
  To: buildroot

Thanks a lot for your input Robert,


Too bad, I didn't think about this superuser limitation. It would have been a really useful buildroot output.


In that case, I will give your script a try.


Thank you

________________________________
From: Robert Heywood <robert.heywood@codethink.co.uk>
Sent: January 23, 2019 4:44:42 AM
To: Peter Korsgaard; Gervais, Francois
Cc: buildroot at busybox.net
Subject: Re: btrfs filesystem image as subvolume

Hi all.

I wanted the same kind of functionality, but found that mkfs.btrfs doesn't
support much more than dumping the files into the root of the filesystem.
As a workaround, I made a script that mounts the filesystem, creates the
subvolume and uses btrfs-send to create the stream.

Sadly it requires root access, so it's not something that can be added to
buildroot. However, you're welcome to use the script if you want :)

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_robjh_buildroot-2Ddev_blob_robjh-2Dtmpfiles_robjh_make-5Fbtrfs-5Fstream.sh&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=3V9oKBq7rxLqcrf3JIBDk22u4pP_IDTOFoffRmPieMw&e=

run it from your buildroot directory with sudo.
It'll produce ./output/images/os.btrfss, which you can use with btrfs-receive.

You might also want to look at this script, which uses the os.btrfss file to
create a btrfs filesystem on a flash drive, with my desired layout. and with
compression enabled;

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_robjh_buildroot-2Ddev_blob_robjh-2Dtmpfiles_robjh_prep-5Fsd.sh&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=IZuvvxl42Wylzoav0LmUMJfs0aKv8VB5n1CV8b2Y600&e=

I hope this helps.

kind regards, rob.

On 23/01/2019 09:26, Peter Korsgaard wrote:
>>>>>> "Gervais," == Gervais, Francois <FGervais@distech-controls.com> writes:
>
> Hi,
>
>   > Hi,
>   > I tried the btrfs filesystem image and it works fine however in my
>   > use-case I'd like to have only the subvolume and not the whole btrfs
>   > filesystem.
>
>   > Basically the output of "btrfs send".
>
>   > I'd first like to make sure this is not possible today and discuss some
>   > high level guidelines you would like me to follow when I implement
>   > the feature.
>
>   > Should I add a sub-option to the "btrfs root filesystem" menu?
>   > Should if have it's own "Filesystem images" entry?
>
> Adding Robert who contributed the btrfs support. Robert, any feedback on
> this?
>

--
Robert Heywood, Codethink Ltd.
<blink>Privacy policy; https://urldefense.proofpoint.com/v2/url?u=https-3A__www.codethink.co.uk_privacy.html&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=G3HxHlWbpios6mQS7YUj_ICsYvxAzbjryvMxyUQ7Mso&m=RdpATESXfxVKQQJznVe_7qw6k-ANfDtCrwJT0MhIFsA&s=-U9tssz2CxIl9yle9dhShM-tx-Zg8OEGzG77dUgcF1U&e=</blink>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190123/39dae9fc/attachment.html>

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

end of thread, other threads:[~2019-01-23 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 20:57 [Buildroot] btrfs filesystem image as subvolume Gervais, Francois
2019-01-23  9:26 ` Peter Korsgaard
2019-01-23  9:44   ` Robert Heywood
2019-01-23 13:51     ` Gervais, Francois

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.