On Mon, Mar 16, 2009 at 04:57:07PM -0400, Jeremy Katz wrote: > 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. Yep, you are right. I will handle the specific errno == 28 for this case. > > Jeremy > > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list -- Joel Andres Granados Brno, Czech Republic, Red Hat. _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list