[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-06-02 Thread Ɓukasz Zemczak
Sponsored for groovy. Please give me a sign if anything else is needed!

** Changed in: initramfs-tools-devices (Ubuntu)
   Status: New => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-06-02 Thread Woodrow Shen
** Description changed:

- It's a special case that we may need to convert rootfs from ext4 to
+ [Impact]
+ 
+  * It's a special case that we may need to convert rootfs from ext4 to
  btrfs, and we have to resize btrfs inside initramfs as well.
+ 
+ [Test Case]
+ 
+  * Use ubuntu-image to create a classic image
+  * Make sure initramfs-tools-devices installed
+  * Use btrfs-convert to re-format btrfs from ext4 writable
+ 
+ [Regression Potential]
+ 
+  * It should be low risk
+ 
+ [Other Info]
+ None

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-05-28 Thread Alfonso Sanchez-Beato
@Woodrow thanks for your changes - you are right the binaries are
already included by hooks from dependencies.

LGTM from my side - although I cannot review formally apparently :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Re: [Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-05-28 Thread Woodrow Shen
Hi Alfonso,

On Thu, May 28, 2020 at 4:20 PM Alfonso Sanchez-Beato <
1881...@bugs.launchpad.net> wrote:

> Some comments on the debdiff:
>
> Use
> blkid -s TYPE "$writable_part" -o value
> instead of
> blkid -s TYPE "$writable_part" | awk '{print $2}' | grep -o '".*"' | tr -d
> '"'
>
I've revised it accordingly.


> No need to redirect to >>$LOGFILE in resize_filesystem() which is
> already redirected when called. Also, you should not redirect to
> /dev/kmsg - I guess that was for debugging purposes.
>
Revised this as well.


> Is it really necessary to mount the partition to find out the filesystem
> usage?
> "btrfs filesystem show" apparently can work on devices according to [1].
> But it also looks like btrfs commands are mostly used with mounted systems,
> so it is fine if you want to keep things like that.
>
> Yeap, thanks for improving this. I also found out the original command
will have a potential bug as I should not cut the specific length for
space. I've changed this for one line only.

Finally, you will need to use copy_exec for btrfs and blkid to the
> fixtrtc hook to get them included in the initramfs (although maybe blkid
> comes from busybox in this case, not sure).
>
> From my observation, btrfs-progs has a hook
(/usr/share/initramfs-tools/hooks/btrfs) to include btrfs related binaries.
I think it should be fine here.
blkid is indeed included by udev's hook as udev is also one of dependencies
for initramfs-tools-core.

Thanks,
Woodrow

Otherwise, looks good to me.
>
> [1] https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-filesystem
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1881074
>
> Title:
>   Support btrfs when writable is converted to btrfs
>
> Status in initramfs-tools-devices package in Ubuntu:
>   New
>
> Bug description:
>   It's a special case that we may need to convert rootfs from ext4 to
>   btrfs, and we have to resize btrfs inside initramfs as well.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions
>


-- 
Woodrow Shen
Software Engineer, Canonical ltd.
Devices Enablement | OEM Enablement, Taipei

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-05-28 Thread Woodrow Shen
Revised the patch according to suggestions, thanks.

** Patch added: "debdiff.patch"
   
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+attachment/537/+files/debdiff.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-05-28 Thread Ubuntu Foundations Team Bug Bot
The attachment "debdiff.patch" seems to be a debdiff.  The ubuntu-
sponsors team has been subscribed to the bug report so that they can
review and hopefully sponsor the debdiff.  If the attachment isn't a
patch, please remove the "patch" flag from the attachment, remove the
"patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe
the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issue please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-05-28 Thread Alfonso Sanchez-Beato
Some comments on the debdiff:

Use
blkid -s TYPE "$writable_part" -o value
instead of
blkid -s TYPE "$writable_part" | awk '{print $2}' | grep -o '".*"' | tr -d '"'

No need to redirect to >>$LOGFILE in resize_filesystem() which is
already redirected when called. Also, you should not redirect to
/dev/kmsg - I guess that was for debugging purposes.

Is it really necessary to mount the partition to find out the filesystem usage?
"btrfs filesystem show" apparently can work on devices according to [1]. But it 
also looks like btrfs commands are mostly used with mounted systems, so it is 
fine if you want to keep things like that.

Finally, you will need to use copy_exec for btrfs and blkid to the
fixtrtc hook to get them included in the initramfs (although maybe blkid
comes from busybox in this case, not sure).

Otherwise, looks good to me.

[1] https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-filesystem

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1881074] Re: Support btrfs when writable is converted to btrfs

2020-05-28 Thread Woodrow Shen
** Patch added: "debdiff.patch"
   
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+attachment/5377723/+files/debdiff.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881074

Title:
  Support btrfs when writable is converted to btrfs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-devices/+bug/1881074/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs