Re: [PATCH rhel6-branch] Resolve /dev/disk/ devices during rescue (#605312)

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/02/2010 05:01 AM, Steffen Maier wrote:
> Assuming the path attribute of an element of DeviceTree._devices is
> always a real path under /dev and getDeviceByPath should only always
> search for such real path, i.e. not resolve symlinks itself
> (but then again below is the only caller of getDeviceByPath currently),
> and you tested this succesfully, it looks good to me.
> I wonder, if there could be other cases besides /dev/disk/ that would
> need similar treatment. Maybe always retrieve realpath unconditionally?
> 

I'm not familiar enough with the storage system to know what all the
possible cases are. In this specific case everything under /dev/disk is
a symlink to a real device so I think it is safest to do it like this
for now.

I'd also like to see what dlehman has to say about it.

Thanks,

Brian

> On 07/31/2010 12:25 AM, Brian C. Lane wrote:
>> Convert symlinks in /dev/disk/ to their real paths before trying to
>> resolve them when mounting the disks for rescue.
>>
>> Resolves: rhbz#605312
>> ---
>>  storage/devicetree.py |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/storage/devicetree.py b/storage/devicetree.py
>> index a077e93..28f0dea 100644
>> --- a/storage/devicetree.py
>> +++ b/storage/devicetree.py
>> @@ -2278,6 +2278,9 @@ class DeviceTree(object):
>>              if device is None:
>>                  log.error("failed to resolve device %s" % devspec)
>>          elif devspec.startswith("/dev/"):
>> +            if devspec.startswith("/dev/disk/"):
>> +                devspec = os.path.realpath(devspec)
>> +
>>              # device path
>>              device = self.getDeviceByPath(devspec)
>>              if device is None:
> 
> 
> Steffen
> 
> Linux on System z Development
> 
> IBM Deutschland Research & Development GmbH
> Vorsitzender des Aufsichtsrats: Martin Jetter
> Geschäftsführung: Dirk Wittkopp
> Sitz der Gesellschaft: Böblingen
> Registergericht: Amtsgericht Stuttgart, HRB 243294
> 
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


- -- 
Brian C. Lane <bcl@xxxxxxxxxx>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Remember Lexington Green!

iQEVAwUBTFbdxhF+jBaO/jp/AQLuEQf6A3XZ3DhrofprMqFzwAUBAeU3C8r2qrek
tlqMRzHEQYvnZG+s5DpicDdJP77dGZYsEWaQM4NyS6Vfct3tX00lS7X8hoc8kLZs
KJV7Cz1UTNR63GBXwdZrlwibl3in42tOhG90UiyHTSi87hA9P2AMiApCcZFasGT7
ByDeaSboYd5ab//9iIAhjAbzB0dPov88qIHU+hIgy8yyZsMeSeuUmK2Xzxp6XPU8
9eMQcQ2KQmO0wxrtkSuE3kFFjYwzsAgreY0LwqYUIygjdAcH5/11+TOuFsKkwaDX
XvaR8lS4DUIT3XoND6Kej55tg93tTJvAjZJI86QEociWa/iROYrdCg==
=Vbg7
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux