redirect LVM commands to file in Red Hat


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting redirect LVM commands to file in Red Hat
# 1  
Old 04-22-2010
Bug 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.Smilie

---------- 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.
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Listing strings from file using awr Linux Red Hat

Hi experts, I have a file "salida_test" containing (in repetitive way): Point ID 1.750251 Point Name >BRI_4L_SA2__INT Interruptor 33kV Parque Industrial < value 2 Time of last value update (ascii): >03/07/17 11:11:14.596 ART< TLQ 0000000c00004000 station #79 ... (6 Replies)
Discussion started by: carlino70
6 Replies

2. Red Hat

LVM Red Hat clustering

hello, I' m trying to create a Filesystem on server with the clustering solution. This is my first experience with cluster on Redhat6. Please help! (4 Replies)
Discussion started by: linux_4_all
4 Replies

3. Red Hat

Difference b/n AIX & Red Hat Linux Commands

Hi All, The scripts developed in AIX can be executed in Red Hat Linux too? Because, we are migrating OS from AIX to LINUX. Will there be any differences in commands? Thanks in advance!!! Regards, U (2 Replies)
Discussion started by: unme
2 Replies

4. Shell Programming and Scripting

Directory / File changes on CIFS share mounted on Red Hat Linux

I have a requirement to copy the changed file on CIFS share mounted on Red Hat Linux to a remote FTP/SFTP server. I tried inotify-tools, but this didn't track the modified files. Has anyone tried incron or any other suggestion? (1 Reply)
Discussion started by: SupeAlok
1 Replies

5. UNIX for Dummies Questions & Answers

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ?

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ? (2 Replies)
Discussion started by: ahmedamer12
2 Replies

6. Red Hat

where can find the good image file of red hat

I have failed many times on install red hat in virtual machine, can anybody provide the good image file of red hat? (3 Replies)
Discussion started by: wulaishiwo
3 Replies

7. Homework & Coursework Questions

File transfer from Red Hat Linux to Windows 7

My assignment is to use C++ to generate a table of values for the U.S. standard atmosphere, when data at sea level are given, which i have done perfectly. Now, i am attempting to create a matlab script to read and plot the data. I forgot to put my table of data on my thumb drive yesterday, and... (4 Replies)
Discussion started by: ds7202
4 Replies

8. UNIX for Dummies Questions & Answers

unix commands in linux-red hat

hi, can i have a unix like environment where i can do things like chmod, shell scripts and etc.. in redhat instead of the GUI that redhat ofters? (4 Replies)
Discussion started by: yls177
4 Replies

9. UNIX for Dummies Questions & Answers

Location of defaultrouter file in Red Hat

Where is the file containing the default router in Red Hat 7.0? (4 Replies)
Discussion started by: 98_1LE
4 Replies
Login or Register to Ask a Question
LVMETAD(8)						      System Manager's Manual							LVMETAD(8)

NAME
lvmetad - LVM metadata cache daemon SYNOPSIS
lvmetad [-l {all|wire|debug}] [-p pidfile_path] [-s socket_path] [-f] [-h] [-V] [-?] DESCRIPTION
lvmetad is a metadata caching daemon for LVM. The daemon receives notifications from udev rules (which must be installed for LVM to work correctly when lvmetad is in use). Through these notifications, lvmetad has an up-to-date and consistent image of the volume groups avail- able in the system. By default, lvmetad, even if running, is not used by LVM. See lvm.conf(5). OPTIONS
To run the daemon in a test environment both the pidfile_path and the socket_path should be changed from the defaults. -f Don't fork, but run in the foreground. -h, -? Show help information. -l {all|wire|debug} Select the type of log messages to generate. Messages are logged by syslog. Additionally, when -f is given they are also sent to standard error. Since release 2.02.98, there are two classes of messages: wire and debug. Selecting 'all' supplies both and is equivalent to a comma-separated list -l wire,debug. Prior to release 2.02.98, repeating -d from 1 to 3 times, viz. -d, -dd, -ddd, increased the detail of messages. -p pidfile_path Path to the pidfile. This overrides both the built-in default (#DEFAULT_PID_DIR#/lvmetad.pid) and the environment variable LVM_LVMETAD_PIDFILE. This file is used to prevent more than one instance of the daemon running simultaneously. -s socket_path Path to the socket file. This overrides both the built-in default (/run/lvm/lvmetad.socket) and the environment variable LVM_LVMETAD_SOCKET. To communicate successfully with lvmetad, all LVM2 processes should use the same socket path. -V Display the version of lvmetad daemon. ENVIRONMENT VARIABLES
LVM_LVMETAD_PIDFILE Path for the pid file. LVM_LVMETAD_SOCKET Path for the socket file. SEE ALSO
lvm(8), lvm.conf(5) Red Hat Inc LVM TOOLS 2.02.105(2)-RHEL7 (2014-03-26) LVMETAD(8)