Description of problem: "pvcreate /dev/device" at LVM2 ends in "close failed: Bad file descriptor": --- snipp --- # pvcreate /dev/sda /dev/sda: close failed: Bad file descriptor /dev/sda: close failed: Bad file descriptor /dev/sda: close failed: Bad file descriptor /dev/sda: close failed: Bad file descriptor [...endless...] --- snapp --- If I use a partition, for example /dev/sda1, everything works, but even the man page of pvcreate tells: --- snipp --- Example Initialize partition #4 on the third SCSI disk and the entire fifth SCSI disk for later use by LVM: pvcreate /dev/sdc4 /dev/sde --- snapp --- Version-Release number of selected component (if applicable): lvm2-2.00.31-1.0.RHEL4 How reproducible: Everytime, see below. Steps to Reproduce: 1. pvcreate /dev/sda 2. Get "close failed: Bad file descriptor" Actual results: "pvcreate /dev/device" at LVM2 ends up in "close failed: Bad file descriptor". Expected results: "pvcreate /dev/device" without partition specificating should work. Otherwise the man page of pvcreate should be corrected immediately.
If a device /dev/sda is partitioned into /dev/sda1, /dev/sda2 etc. then you *must* only use /dev/sda1, /dev/sda2 etc. for data - never /dev/sda. You either create and use partitions on a device or you don't. If you want to use /dev/sda directly (and lose all the data on the partitions) you must remove the partition table first (e.g. use fdisk to delete all the partitions then write zeros to the first sector of the device). The endless looping was fixed in 2.00.32 (included in RHEL4 update 1).
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-192.html