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
LVSCAN(8)						      System Manager's Manual							 LVSCAN(8)

NAME
lvscan - scan (all disks) for Logical Volumes SYNOPSIS
lvscan [-a|--all] [-b|--blockdevice] [-d|--debug] [-h|--help] [--ignorelockingfailure] [-P|--partial] [-v|--verbose] DESCRIPTION
lvscan scans all known volume groups or all supported LVM block devices in the system for defined Logical Volumes. The output consists of one line for each Logical Volume indicating whether or not it is active, a snapshot or origin, the size of the device and its allocation policy. Use lvs(8) or lvdisplay(8) to obtain more-comprehensive information about the Logical Volumes. OPTIONS
See lvm for common options. --all Include information in the output about internal Logical Volumes that are components of normally-accessible Logical Volumes, such as mirrors, but which are not independently accessible (e.g. not mountable). For example, after creating a mirror using 'lvcreate -m1 --mirrorlog disk', this option will reveal three internal Logical Volumes, with suffixes mimage_0, mimage_1, and mlog. -b, --blockdevice This option is now ignored. Instead, use lvs(8) or lvdisplay(8) to obtain the device number. SEE ALSO
lvm(8), lvcreate(8), lvdisplay(8) lvs(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) LVSCAN(8)