On 11/20/2012 03:41 PM, Richard W.M. Jones wrote: > In fact the problem case is where you try to wipe a device which > contains a volume groups and a logical volume; note the LVs don't > contain filesystems, and nothing is mounted. Well there is a problem. While you can wipe part table, kernel will reload it and destroy all obsolete partitions. There should not be problem if it contains lvm, only if it contains active LVs mapped. If there are active device-mapper devices (either created by kpartx, lvm, crypt, ...) you will lost metadata and cannot remove them using standard tools, you are forced to do it with dmsetup later. So wipe part table is fine, but not if partition is mounted or mapped... You should remove mapping first. And --force here should be used as a last resort - why not deactivate mapped device on top first? It should not be big problem (I think someone wrote this using lsblk --inverse). Using force in this situation just creates problem later. (I am not against the patch, it should have --force option but it should be used very carefully.) > libguestfs: trace: lvcreate_free "LV" "VG" 100 > libguestfs: trace: lvcreate_free = 0 > libguestfs: trace: wipefs "/dev/sda" > libguestfs: trace: wipefs = -1 (error) IMHO lvcreate implicitly activates device. Try lvcreate -a n ! Milan -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html