Bug 115197 - Automatic repair does not find swap devices on RAID
Summary: Automatic repair does not find swap devices on RAID
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Installation (show other bugs)
Version: unspecified
Hardware: i686 SuSE Pro 9.3
: P5 - None : Minor
Target Milestone: ---
Assignee: Jiří Suchomel
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-04 07:25 UTC by Krzysztof Lichota
Modified: 2005-09-05 15:17 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Lichota 2005-09-04 07:25:52 UTC
This is report for Suse 9.3 (there is no such component in Bugzilla, so  
reporting for 10.0).  
  
I have run automatic repair from installation CD and during checking disks it  
did not find swap device, which is on RAID (/dev/md4). Next, during filesystem  
check, it tried to check this device (and of course failed).  
 
This is minor issue, automatic repair continues, but unexperienced user might 
think there is something wrong.
Comment 1 Jiří Suchomel 2005-09-05 07:48:32 UTC
Could you please check again with the OpenSUSE 10 beta?
(http://www.opensuse.org/index.php/Download)

If you encounter it also there, don't forget to attach the log files:
http://www.opensuse.org/index.php/Bug_Reporting_FAQ#YaST
Comment 2 Jiří Suchomel 2005-09-05 14:27:16 UTC
btw, swap partition is detected using Storage::GetTargetMap() and
Partitions::fsid_swap check for partition id.
Comment 3 Thomas Fehr 2005-09-05 14:38:34 UTC
If the swap is on a raid the check for Partitions::fsid_swap will fail since
the raid volume doe not have a partition id. For the same reason you would not
be able to detect swap on LVM logical volumes.

For such devices checking for the key "detected_fs" in the parttition map,
having the value `swap would be better. This would also be more robust for 
normal disks since there are disks e.g. on S390 which do not have any valid
partition ids.
Comment 4 Jiří Suchomel 2005-09-05 14:50:57 UTC
So is it sufficient to enhance the code

filter (map p, disk["partitions"]:[], ``(
                !p["delete"]:false &&
                p["fsid"]:0 == Partitions::fsid_swap
);

to this condition:

                !p["delete"]:false &&
                (p["fsid"]:0 == Partitions::fsid_swap ||
                 p["detected_fs"]:nil == `swap)

The detection is in repair/src/OSRSwap.ycp, from line 85
Comment 5 Thomas Fehr 2005-09-05 14:56:36 UTC
Yes, this should work.
Comment 6 Jiří Suchomel 2005-09-05 15:17:36 UTC
fixed version should appear in SL10.0 RC1