1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

o check for orphaned pv's when reading

This commit is contained in:
Joe Thornber 2001-10-10 12:28:10 +00:00
parent 88835ab641
commit 4d468cffcd

View File

@ -240,6 +240,12 @@ struct disk_list *read_pv(struct device *dev, struct pool *mem,
goto bad; goto bad;
} }
/*
* is it an orphan ?
*/
if (data->pv.vg_name == '\0')
return 1;
if (vg_name && strcmp(vg_name, data->pv.vg_name)) { if (vg_name && strcmp(vg_name, data->pv.vg_name)) {
log_info("%s is not a member of the vg '%s'", log_info("%s is not a member of the vg '%s'",
dev->name, vg_name); dev->name, vg_name);