[dm-devel] thin metadata raw backup

Ilya Basin basinilya at gmail.com
Thu Jul 2 13:22:21 UTC 2015


Hello.

Can you help me with creating pool metadata backups (raw, not xml)? I
wanted to simply use `dd if=/dev/mapper/vg_xxx-pool_tmeta`, but the
copies are always dirty on a heavily loaded machine.

Running `thin_check device` prints no error.

Silly attempt:

    [root at oktest-stage-db-1 ~]# dmsetup message /dev/mapper/vg_oktestdb1-pool 0 "reserve_metadata_snap"
    device-mapper: message ioctl on vg_oktestdb1-pool failed: Invalid argument
    Command failed

`dmsetup suspend` didn't help too:

    [root at oktest-stage-db-1 ~]# dev=/dev/mapper/vg_oktestdb1-pool_tmeta
    [root at oktest-stage-db-1 ~]# (
    > dd bs=8192 if="$dev" status=none of=/dev/null
    > dmsetup suspend "$dev"
    > dd bs=8192 if="$dev" status=none of=test1
    > dmsetup resume "$dev"
    > )
    [root at oktest-stage-db-1 ~]# thin_check test1
    examining superblock
    examining devices tree
    examining mapping tree
      thin device 29 is missing mappings [911084, 941316]
        the last key of the previous leaf was 932618 and the first key of this leaf is 912369the last key of the previous leaf was 932618 and the first key of this leaf is 913257the last key of the previous leaf was 932618 and the first key of this leaf is 913401the last key of the previous leaf was 932618 and the first key of this leaf is 919481

        




More information about the dm-devel mailing list