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.
ubuntu@maas-xenial5:~$ sudo partprobe
ubuntu@maas-xenial5:~$ Jul 24 09:01:01 maas-xenial5 kernel: bcache:
register_bcache() error opening /dev/sdc: device already registered
Jul 24 09:01:01 maas-xenial5 kernel: bcache: register_bcache() error opening
/dev/sdb: device already registered
Jul 24 09:01:02 maas-xenial5 kernel: bcache: register_bcache() error opening
/dev/sdb: device already registered
Jul 24 09:01:02 maas-xenial5 kernel: bcache: register_bcache() error opening
/dev/sdb: device already registered
Jul 24 09:01:02 maas-xenial5 kernel: bcache: register_bcache() error opening
/dev/sdc: device already registered
Jul 24 09:01:02 maas-xenial5 kernel: bcache: register_bcache() error opening
/dev/sdc: device already registered
ubuntu@maas-xenial5:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
└─sda1 8:1 0 64G 0 part /
sdb 8:16 0 64G 0 disk
└─bcache0 251:0 0 64G 0 disk
sdc 8:32 0 64G 0 disk
└─bcache0 251:0 0 64G 0 disk
sdd 8:48 0 64G 0 disk
# rebooted + checked on an old kernel
ubuntu@maas-xenial5:~$ sudo reboot
...
ubuntu@maas-xenial5:~$ uname -a
Linux maas-xenial5 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@maas-xenial5:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
└─sda1 8:1 0 64G 0 part /
sdb 8:16 0 64G 0 disk
└─bcache0 251:0 0 64G 0 disk
sdc 8:32 0 64G 0 disk
└─bcache0 251:0 0 64G 0 disk
sdd 8:48 0 64G 0 disk
# rebooted to a patched kernel - signatures are properly parsed and partitions
are discovered
ubuntu@maas-xenial5:~$ uname -ar
Linux maas-xenial5 4.4.0-83-generic #106~lp1705493 SMP Thu Jul 20 14:11:29 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@maas-xenial5:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
└─sda1 8:1 0 64G 0 part /
sdb 8:16 0 64G 0 disk
└─bcache0 251:0 0 64G 0 disk
├─bcache0p1 251:1 0 4G 0 part
└─bcache0p2 251:2 0 4G 0 part
sdc 8:32 0 64G 0 disk
└─bcache0 251:0 0 64G 0 disk
├─bcache0p1 251:1 0 4G 0 part
└─bcache0p2 251:2 0 4G 0 part
sdd 8:48 0 64G 0 disk
Checked writes of random data just in case:
ubuntu@maas-xenial5:~$ sudo dd bs=1M count=100 if=/dev/urandom of=/dev/bcache0p1
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 8.10654 s, 12.9 MB/s
ubuntu@maas-xenial5:~$ sudo dd bs=1M count=100 if=/dev/urandom of=/dev/bcache0p2
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 7.6106 s, 13.8 MB/s
** Tags added: verification-done-xenial
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1705493
Title:
[4.4][backport] Multiple partitions are not supported on a bcache
device
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1705493/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs