[4.4][backport] Multiple partitions are not supported on a bcache device

Bug #1705493 reported by Dmitrii Shcherbakov
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned
Xenial
Confirmed
Medium
Unassigned

Bug Description

Support for adding partitions on bcache devices only landed in 4.10:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b8c0d911ac5285e6be8967713271a51bdc5a936a

Although it is a small change, it is not backported to any of the xenial kernels and it only exists naturally in 4.10.

➜ ubuntu-xenial git:(master) git tag --contains=b8c0d911ac5285e6be8967713271a51bdc5a936a
Ubuntu-hwe-4.10.0-13.15_16.04.2
Ubuntu-hwe-4.10.0-14.16_16.04.1
Ubuntu-hwe-4.10.0-19.21_16.04.1
Ubuntu-hwe-4.10.0-20.22_16.04.1
Ubuntu-hwe-4.10.0-21.23_16.04.1
Ubuntu-hwe-4.10.0-22.24_16.04.1
Ubuntu-hwe-4.10.0-25.29_16.04.1
Ubuntu-hwe-4.10.0-26.30_16.04.1
Ubuntu-hwe-4.10.0-28.32_16.04.1
Ubuntu-hwe-edge-4.10.0-9.11_16.04.2
Ubuntu-lts-4.10.0-10.12_16.04.1
Ubuntu-lts-4.10.0-11.13_16.04.1
Ubuntu-lts-4.10.0-12.14_16.04.1
Ubuntu-lts-4.10.0-13.15_16.04.1
Ubuntu-lts-4.10.0-7.9_16.04.1
Ubuntu-lts-4.10.0-8.10_16.04.1
Ubuntu-lts-4.10.0-9.11_16.04.1
Ubuntu-lts-4.10.0-9.11_16.04.2

This will prevent usage of multiple partitions on the same device which is the case when data and journal are collocated.

Also, the lack of that feature prevents dmcrypt usage as multiple partitions are created on a device in this case.

Could that be backported to the 4.4 kernel?

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1705493

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Xenial):
status: New → Triaged
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Changed in linux (Ubuntu Xenial):
importance: Undecided → Medium
tags: added: kernel-da-key
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a Xenial test kernel with commit b8c0d911ac528. The test kernel can be downloaded from:

http://kernel.ubuntu.com/~jsalisbury/lp1705493/

Can you test this kernel and see if it resolves this bug?

Thanks in advance!

Changed in linux (Ubuntu Xenial):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Xenial):
status: Triaged → In Progress
Changed in linux (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
Download full text (5.8 KiB)

ubuntu@maas-xenial5:~$ uname -r
4.4.0-87-generic

ubuntu@maas-xenial5:~$ sudo gdisk /dev/bcache0
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.

Command (? for help): ?
b back up GPT data to a file
c change a partition's name
d delete a partition
i show detailed information on a partition
l list known partition types
n add a new partition
o create a new empty GUID partition table (GPT)
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu

Command (? for help): v

No problems found. 134217645 free sectors (64.0 GiB) available in 1
segments, the largest of which is 134217645 (64.0 GiB) in size.

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): p
Disk /dev/bcache0: 134217712 sectors, 64.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E9C6A5F5-65B1-42F7-B59B-8F2A8CD13472
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 134217678
Partitions will be aligned on 2048-sector boundaries
Total free space is 134217645 sectors (64.0 GiB)

Number Start (sector) End (sector) Size Code Name

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-134217678, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-134217678, default = 134217678) or {+-}size{KMGTP}: 50%
Last sector (2048-134217678, default = 134217678) or {+-}size{KMGTP}: 4096M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'

Command (? for help): n
Partition number (2-128, default 2):
First sector (34-134217678, default = 8390656) or {+-}size{KMGTP}:
Last sector (8390656-134217678, default = 134217678) or {+-}size{KMGTP}: +4096M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'

Command (? for help): p
Disk /dev/bcache0: 134217712 sectors, 64.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E9C6A5F5-65B1-42F7-B59B-8F2A8CD13472
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 134217678
Partitions will be aligned on 2048-sector boundaries
Total free space is 117442476 sectors (56.0 GiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 8388608 4.0 GiB 8300 Linux filesystem
   2 8390656 16779263 4.0 GiB 8300 Linux filesystem

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/bcache0.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully...

Read more...

tags: added: verification-done-xenial
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
Ante Karamatić (ivoks)
tags: added: cpe-onsite
removed: cpec
Changed in linux (Ubuntu Xenial):
status: In Progress → Confirmed
Changed in linux (Ubuntu):
status: In Progress → Confirmed
Changed in linux (Ubuntu Xenial):
assignee: Joseph Salisbury (jsalisbury) → nobody
Changed in linux (Ubuntu):
assignee: Joseph Salisbury (jsalisbury) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.