On Monday, March 16 2009, Joel Granados Moreno said: > +def zeroLvmMetadata(device): > + """ This dds from byte 513 to 200Mb+513 of the disk. > + > + We assume that lvm has nothing to do with the first 512 bytes. > + We assume that 200Mb is enough. My tests failed with 100Mb for > + some unknown reason. > + """ > + try: > + fd = os.open(device, os.O_WRONLY) > + os.lseek(fd, 513, os.SEEK_SET) > + for i in range(200): > + os.write(fd, "\0"*1024) > + os.close(fd) > + except: > + raise LVMError("Falied to zero LVM data on %s." % device) While maybe not a common case, this will traceback if the disk/partition is < 200 megs in size. Jeremy _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list