Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore disk size of multipath slave in 205_compare_disk.sh #1624

Merged

Conversation

schabrolles
Copy link
Member

@schabrolles schabrolles commented Dec 5, 2017

@jsmeix, as explain directly in
#1596 (comment)
I got the following small bug ...

RESCUE rear-rhel-142:~ # rear -D recover
Relax-and-Recover 2.2 / Git
Using log file: /var/log/rear/rear-rear-rhel-142.log
Running workflow recover within the ReaR rescue/recovery system
Starting required daemons for NFS: RPC portmapper (portmap or rpcbind) and rpc.statd if available.
Started RPC portmapper 'rpcbind'.
RPC portmapper 'rpcbind' available.
Started rpc.statd.
RPC status rpc.statd available.
Started rpc.idmapd.
Using backup archive '/tmp/rear.xAzGbMuWwaH3TfJ/outputfs/rear-rhel-142/backup.tar.gz'
Calculating backup archive size
Backup archive size is 1003M	/tmp/rear.xAzGbMuWwaH3TfJ/outputfs/rear-rhel-142/backup.tar.gz (compressed)
Setting up multipathing
Activating multipath
multipath activated
Listing multipath device found
mpatha	(253, 0)
Comparing disks
Ambiguous possible target disks need manual configuration (more than one with same size found)
Switching to manual disk layout configuration
Using /dev/mapper/mpatha (same name and same size) for recreating /dev/mapper/mpatha
Current disk mapping table (source -> target):
    /dev/mapper/mpatha /dev/mapper/mpatha
UserInput -I LAYOUT_MIGRATION_CONFIRM_MAPPINGS needed in /usr/share/rear/layout/prepare/default/300_map_disks.sh line 211
Confirm or edit the disk mapping
1) Confirm disk mapping and continue 'rear recover'
2) Edit disk mapping (/var/lib/rear/layout/disk_mappings)
3) Use Relax-and-Recover shell and return back to here
4) Abort 'rear recover'
(default '1' timeout 10 seconds)

/dev/mapper/maptha is the original device (means NO MIGRATION)
but I think the change you introduced in 1e3b0d9 produce this bug:
Ambiguous possible target disks need manual configuration (more than one with same size found)

I think the reason is the fact all disk size are put into the replacement_hardware_disk_sizes array; even the disk which are slaves of a multipathed device.

extract from my disklayout.conf

multipath /dev/mapper/mpatha 53687091200 /dev/sda,/dev/sdb,/dev/sdc,/dev/sdd,/dev/sde,/dev/sdf,/dev/sdg,/dev/sdh

In the example above, sda, sdb, sdc, sdd, sde, sdf, sdg, sdh are different PATH to the same disk device. mpatha .... So, in the current code, their sized will be stored several times .... Which conduct to the following message: (more than one with same size found) and require a User interaction even if only one multipath device (SAN LUN) is presented to the system.

This PR avoid to add device size into the |replacement_hardware_disk_sizes` array if they are a multipath slave.

@schabrolles schabrolles self-assigned this Dec 5, 2017
@schabrolles schabrolles added the minor bug An alternative or workaround exists label Dec 5, 2017
@schabrolles schabrolles added this to the ReaR v2.3 milestone Dec 5, 2017
@schabrolles
Copy link
Member Author

@jsmeix
Seems to work now, but I still have a strange message printed (I don't know if it is normal)

UserInput -I DISK_LAYOUT_PROCEED_RECOVERY needed in /usr/share/rear/layout/prepare/default/250_compare_disks.sh line 146

Copy link
Member

@jsmeix jsmeix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schabrolles
many thanks for your multipath testing
that reveals such shortcomings and
even more thanks for your clearly documented fix
so that I can "just merge" it.

@jsmeix jsmeix merged commit af2541c into rear:master Dec 6, 2017
@jsmeix
Copy link
Member

jsmeix commented Dec 6, 2017

@schabrolles
regarding the "UserInput ... needed" message in
#1624 (comment)
In debug mode ('-d' or '-D') and only in that mode
it is intentional so that the user can see what UserInput ID
value each particular UserInput call has because otherwise
the user would have to dig in the code and find the right
UserInput function call before he could specify a predefined
UserInput value, see the UserInput() function description
comments in lib/_input-output-functions.sh and the
USER_INPUT_user_input_ID variables description
in default.conf

@schabrolles schabrolles deleted the do_not_compare_disk_size_with-multipath_slave branch December 6, 2017 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants