Red Hat Bugzilla – Bug 1196319
Backport the dm-switch target to RHEL 6
Last modified: 2015-07-22 04:42:46 EDT
Created attachment 995272 [details] The patch that backports dm-switch
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Test it this way: 1) Create several logical volumes with the same size, for example: LV VG Attr LSize switch-0 vg1 -wi-a----- 1,00g switch-1 vg1 -wi-a----- 1,00g switch-2 vg1 -wi-a----- 1,00g 2) Load the switch target that uses these volumes: dmsetup create switch --table "0 2097152 switch 3 31 0 /dev/vg1/switch-0 0 /dev/vg1/switch-1 0 /dev/vg1/switch-2 0" (3 is the number of volumes; 31 is the region size in sectors, you can put any value there) 3) Load something into the mapping table, use several commands "dmsetup message switch 0 set_region_mappings..." The syntax of the command is in the file Documentation/device-mapper/switch.txt. You can load whatever you want into the table, and remember what have you loaded. 4) Create a filesystem on the switch device /dev/mapper/switch 5) Mount the filesystem, copy some data to the filesytem, unmount it. 6) Unload the switch target: dmsetup remove switch 7) Repeat the steps 2), 3), 5) (in step 3, load the same mapping table as you did before) 8) Check the filesystem with fsck, then mount it and verify that the data is intact
Correction - step 7) should be "Repeat the steps 2), 3)" - you don't need to copy data to the filesystem because it's already there.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-1272.html