Comment 1 for bug 1867812

Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: maas 2.7 creates partition when trying to use entire disk as bcache cache device

Here is the same thing on 2.6:

before creating:
http://paste.ubuntu.com/p/7bCDdwwb4p/

creating and result:
2020-03-17-18:52:21 root DEBUG [localhost]: maas root bcache-cache-sets create r448pr cache_device=24
> /home/ubuntu/cpe/foundation/foundationcloudengine/foundationcloudengine/configurenodes.py(447)setup_bcaches()
-> backing_device = bcache["backing_device"]
(Pdb) cache_set
{'cache_device': {'firmware_version': None, 'serial': 'CVMD552400AX400AGN', 'size': 400088457216, 'tags': ['ssd'], 'model': 'INTEL SSDPEDME400G4', 'available_size': 0, 'used_size': 400088457216, 'uuid': None, 'partition_table_type': None, 'id_path': '/dev/disk/by-id/nvme-nvme.8086-43564d44353532343030415834303041474e-494e54454c205353445045444d453430304734-00000001', 'storage_pool': None, 'path': '/dev/disk/by-dname/nvme0n1', 'partitions': [], 'type': 'physical', 'used_for': 'Cache device for cache0', 'block_size': 4096, 'system_id': 'r448pr', 'filesystem': {'fstype': 'bcache-cache', 'label': None, 'uuid': '344c0027-069d-4473-9957-93437754cfa3', 'mount_point': None, 'mount_options': None}, 'name': 'nvme0n1', 'id': 24, 'resource_uri': '/MAAS/api/2.0/nodes/r448pr/blockdevices/24/'}, 'system_id': 'r448pr', 'name': 'cache0', 'id': 1, 'resource_uri': '/MAAS/api/2.0/nodes/r448pr/bcache-cache-set/1/'}

block-devices read shows the cache device is the entire disk and there are no partitions/partition table.
http://paste.ubuntu.com/p/ZH8h2sWTdg/