[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH rhel6-branch 2/2] Handle dm-N devices pointed to by /dev/disk/ paths (#605312)



Ack, but this will only work if the device-mapper device is active when
this code gets run, which I'm not sure will be the case except for
mpaths and fwraids. Not much you can do about that, though.

Dave

On Wed, 2010-11-24 at 11:40 -0800, Brian C. Lane wrote:
> Related: rhbz#605312
> ---
>  storage/devicetree.py |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index 728191e..f4e960d 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -2307,6 +2307,11 @@ class DeviceTree(object):
>              if devspec.startswith("/dev/disk/"):
>                  devspec = os.path.realpath(devspec)
>  
> +                if devspec.startswith("/dev/dm-"):
> +                    dm_name = devicelibs.dm.name_from_dm_node(devspec[5:])
> +                    if dm_name:
> +                        devspec = "/dev/mapper/" + dm_name
> +
>              # device path
>              device = self.getDeviceByPath(devspec)
>              if device is None:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]