redirect LVM commands to file in Red Hat

I have been trying to create a little script to direct system configuration information to a file, however when I run LVM commands (vgdisplay, lvdisplay...etc) nothing appears in my output file. This is what I currently have in my script:

vgdisplay >> sysinfo.out

everthing else seems to print to the output file ok except these LVM commands, anyone know how I can get these commands to write to the output file. This is on Red Hat Version 5.1.:confused:

---------- Post updated at 11:57 AM ---------- Previous update was at 11:19 AM ----------

OK I found what the problem is here. I have SELinux installed and that is intercepting lvm tying to write to the file. This is what I found in the SELinux Troubleshooting Browser:

SELinux denied access requested by /usr/sbin/lvm. It is not expected that this access is required by /usr/sbin/lvm and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access.

So this can be post can be classed as closed.
:slight_smile: