Fix LVM-on-RAID probing.
* util/grub-probe.c (probe): Remember which disk was detected as RAID (perhaps an LVM physical volume). Use that disk's raidname rather than that of the top-level disk.
This commit is contained in:
parent
70b405d8f0
commit
9be57a0dad
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-11-26 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
Fix LVM-on-RAID probing.
|
||||
|
||||
* util/grub-probe.c (probe): Remember which disk was detected as
|
||||
RAID (perhaps an LVM physical volume). Use that disk's raidname
|
||||
rather than that of the top-level disk.
|
||||
|
||||
2010-11-25 BVK Chaitanya <bvk.groups@gmail.com>
|
||||
|
||||
Fix cmdline argument quotes for setparams command of menuentry
|
||||
|
|
|
@ -142,6 +142,7 @@ probe (const char *path, char *device_name)
|
|||
int is_raid5 = 0;
|
||||
int is_raid6 = 0;
|
||||
int raid_level;
|
||||
grub_disk_t raid_disk;
|
||||
|
||||
raid_level = probe_raid_level (dev->disk);
|
||||
if (raid_level >= 0)
|
||||
|
@ -149,6 +150,7 @@ probe (const char *path, char *device_name)
|
|||
is_raid = 1;
|
||||
is_raid5 |= (raid_level == 5);
|
||||
is_raid6 |= (raid_level == 6);
|
||||
raid_disk = dev->disk;
|
||||
}
|
||||
|
||||
if ((is_lvm) && (dev->disk->dev->memberlist))
|
||||
|
@ -161,6 +163,7 @@ probe (const char *path, char *device_name)
|
|||
is_raid = 1;
|
||||
is_raid5 |= (raid_level == 5);
|
||||
is_raid6 |= (raid_level == 6);
|
||||
raid_disk = list->disk;
|
||||
}
|
||||
|
||||
tmp = list->next;
|
||||
|
@ -175,8 +178,8 @@ probe (const char *path, char *device_name)
|
|||
printf ("raid5rec ");
|
||||
if (is_raid6)
|
||||
printf ("raid6rec ");
|
||||
if (dev->disk->dev->raidname)
|
||||
printf ("%s ", dev->disk->dev->raidname (dev->disk));
|
||||
if (raid_disk->dev->raidname)
|
||||
printf ("%s ", raid_disk->dev->raidname (raid_disk));
|
||||
}
|
||||
|
||||
if (is_lvm)
|
||||
|
|
Loading…
Reference in a new issue