Hide Forgot
Description of problem: several permutations of pvcreate command: create pv which is already created: [root@nott-vds5 ~]# pvcreate /dev/mapper/1IET_00010001 --metadatasi 1m -M 2 Can't initialize physical volume "/dev/mapper/1IET_00010001" of volume group "VGscale" without -ff [root@nott-vds5 ~]# echo $? 5 create pv with wrong device: [root@nott-vds5 ~]# pvcreate /dev/mapper/1IET_00010 Device /dev/mapper/1IET_00010 not found (or ignored by filtering). [root@nott-vds5 ~]# echo $? 5 in case i want to build a script or a login parsing error code i might be in trouble.
We decided in the beginning not to attempt to create and maintain an exhaustive list of failure codes. We have two basic codes - one for a problem parsing or understanding the command line, the other for any other type of real failure. If your script needs to distinguish different failure cases, it needs to check each of them one-by-one itself. 'pvs' helps if you need to check lvm things individually. This isn't something we've any plans to change, I'm afraid.