Skip to content

FAILED: failed to get start and end for /dev/dm-31 in /dev/dm-3 #69

@alittlesir

Description

@alittlesir

First, create a partition for sdb.

sdb 8:16 0 50G 0 disk
├─sdb1 8:17 0 1G 0 part

Then run the following commands:

dmsetup create sdb1-mapper --table "0 2097152 linear /dev/sdb 0"
kpartx -as /dev/mapper/sdb1-mapper
parted --script --machine /dev/mapper/sdb1-mapper unit s print
growpart /dev/mapper/sdb1-mapper 1

When the growpart /dev/mapper/sdb1-mapper 1 command is executed, an error is reported.

[root@openEuler ~]# growpart /dev/mapper/sdb1-mapper 1
FAILED: failed to get start and end for /dev/dm-31 in /dev/dm-3

I think the problem may be that the dm device is incorrectly concatenated. For the sdb1-mapper partition, 1 should be concatenated to the end of sdb1-mapper, instead of dm-3.

[root@openEuler ~]# ll /dev/mapper/
total 0
lrwxrwxrwx. 1 root root 7 May 8 16:24 sdb1-mapper ->../dm-3
lrwxrwxrwx. 1 root root 7 May 8 16:25 sdb1-mapper1 ->../dm-4

Or, is it that the growpart command itself does not support Device Mapper devices?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions