[linux-lvm] vgcreate with many disks

Mark Haverkamp markh at osdl.org
Tue Feb 22 18:34:26 UTC 2005


We've been working with lvm and many iscsi disks (4142 disks).  We tried
to create a volume group of 256 of these disks and ended up killing it
after 90 minutes.  We added some printfs in the code and found that it
was taking about 45 seconds per disk to add it to the volume group and
that lvmcache_label_scan was the problem in this section of code in
_pv_read:
	if (!memlock()) {
		lvmcache_label_scan(fmt->cmd, 1);

		if (info->vginfo && info->vginfo->vgname &&
		    *info->vginfo->vgname &&
		    _get_pv_from_vg(info->fmt, info->vginfo->vgname,
				    info->dev->pvid, pv)) {
			return 1;
		}
	}


As an experiment, we changed the full_scan variable to 0 and now we can
create the volume group in about 1.5 minutes.  What is the reason for
specifying the full scan at this point?

Thanks,
Mark.

-- 
Mark Haverkamp <markh at osdl.org>




More information about the linux-lvm mailing list