1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

devices: Recognise Veritas Dynamic Multipathing

VxDMP doesn't interact very well with udev so always set
  devices/obtain_device_list_from_udev = 0
in lvm.conf on these systems.
This commit is contained in:
Alasdair G Kergon 2017-01-10 22:23:23 +00:00
parent 15e657f110
commit 6a20b22151
3 changed files with 12 additions and 0 deletions

View File

@ -125,6 +125,10 @@ struct dev_types *create_dev_types(const char *proc_dir,
if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8))) if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8)))
dt->emcpower_major = line_maj; dt->emcpower_major = line_maj;
/* Look for Veritas Dynamic Multipathing */
if (!strncmp("VxDMP", line + i, 5) && isspace(*(line + i + 5)))
dt->vxdmp_major = line_maj;
if (!strncmp("loop", line + i, 4) && isspace(*(line + i + 4))) if (!strncmp("loop", line + i, 4) && isspace(*(line + i + 4)))
dt->loop_major = line_maj; dt->loop_major = line_maj;
@ -218,6 +222,9 @@ int dev_subsystem_part_major(struct dev_types *dt, struct device *dev)
if (MAJOR(dev->dev) == dt->power2_major) if (MAJOR(dev->dev) == dt->power2_major)
return 1; return 1;
if (MAJOR(dev->dev) == dt->vxdmp_major)
return 1;
if ((MAJOR(dev->dev) == dt->blkext_major) && if ((MAJOR(dev->dev) == dt->blkext_major) &&
dev_get_primary_dev(dt, dev, &primary_dev) && dev_get_primary_dev(dt, dev, &primary_dev) &&
(MAJOR(primary_dev) == dt->md_major)) (MAJOR(primary_dev) == dt->md_major))
@ -246,6 +253,9 @@ const char *dev_subsystem_name(struct dev_types *dt, struct device *dev)
if (MAJOR(dev->dev) == dt->power2_major) if (MAJOR(dev->dev) == dt->power2_major)
return "POWER2"; return "POWER2";
if (MAJOR(dev->dev) == dt->vxdmp_major)
return "VXDMP";
if (MAJOR(dev->dev) == dt->blkext_major) if (MAJOR(dev->dev) == dt->blkext_major)
return "BLKEXT"; return "BLKEXT";

View File

@ -41,6 +41,7 @@ struct dev_types {
int drbd_major; int drbd_major;
int device_mapper_major; int device_mapper_major;
int emcpower_major; int emcpower_major;
int vxdmp_major;
int power2_major; int power2_major;
int dasd_major; int dasd_major;
int loop_major; int loop_major;

View File

@ -63,5 +63,6 @@ static const dev_known_type_t _dev_known_types[] = {
{"bcache", 1, "bcache block device cache"}, {"bcache", 1, "bcache block device cache"},
{"nvme", 64, "NVM Express"}, {"nvme", 64, "NVM Express"},
{"zvol", 16, "ZFS Zvols"}, {"zvol", 16, "ZFS Zvols"},
{"VxDMP", 16, "Veritas Dynamic Multipathing"},
{"", 0, ""} {"", 0, ""}
}; };