Need to audit LV's - need some command help


 
Thread Tools Search this Thread
Operating Systems AIX Need to audit LV's - need some command help
# 1  
Old 09-04-2008
Need to audit LV's - need some command help

I need to run a DC wide audit of some oracle filesystems to ensure their all on SAN. In linux its pretty easy since its LVM device structure includes the VG for which that lv is part of (/dev/VGFOO/lv-bar). As such I can just run mount and do some greping to get the needed info.

SO my question is in AIX is there any way to get a list of all mount points, what lv/device is mounted to that point and what vg that device is in......all in one line.

the closest I have come to this is "/usr/sbin/lsvg -o|/usr/sbin/lsvg -i -l" but that only gives me a vg on top.
# 2  
Old 09-05-2008
Maybe this is what you like:

Code:
lsvg -o| lsvg -i -l| awk '/.*\:$/ {vg=$0; next } $1 !~ /.*:$/ && $0 !~ /^LV NAME/ {print vg, $0}'

# 3  
Old 09-08-2008
Quote:
Originally Posted by zaxxon
Maybe this is what you like:

Code:
lsvg -o| lsvg -i -l| awk '/.*\:$/ {vg=$0; next } $1 !~ /.*:$/ && $0 !~ /^LV NAME/ {print vg, $0}'


...I see the power of awk is strong with you!

and yes this did the trick, thanks a million.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Audit details

Hi All , I'm a fresher and don't have much knowledge on scripting. I want to extract log details like count of rows inserted , job start time and end time from Datastage log and want to insert into table. Can you please me in this (2 Replies)
Discussion started by: Srikavya_manda
2 Replies

2. Shell Programming and Scripting

Help to create audit log while firing 'rm' command

Hi, I would like to get the audit log with username, directory and the date whenever user fires 'rm' command anywhere in the file locations. Is there any possibility to capture the 'rm' command and its parameters from any environment by the single function ? Please advise me. ... (4 Replies)
Discussion started by: Joviac
4 Replies

3. Solaris

how to configure a audit in global zone that will audit all the zone

Hi everyone, how i can configure a single audit service in the global zone for all zones, on solaris BSM. I will be glad to hear back from you. Thanks and Regards (3 Replies)
Discussion started by: ladondo
3 Replies

4. AIX

When AIX audit start, How to set the /audit/stream.out file size ?

Dear All When I start the AIX(6100-06)audit subsystem. the log will save in /audit/stream.out (or /audit/trail), but in default when /audit/stream.out to grow up to 150MB. It will replace the original /audit/stream.out (or /audit/trail). Then the /audit/stream.out become empty and... (2 Replies)
Discussion started by: nnnnnnine
2 Replies

5. UNIX for Advanced & Expert Users

Audit connect

Hi, I would like to audit a connection of a specific account to HPUX and LINUX redhat O.S I need audit the IP address of the client machine , and the date&time the connection to the server has been done. Is it possible ? Thanks (1 Reply)
Discussion started by: yoavbe
1 Replies

6. UNIX for Dummies Questions & Answers

Audit Control

Hi, AUDITD is reporting the following in the logs: type=AVC msg=audit(1260289801.448:70566): avc: denied { read write } for pid=18495 comm="postdrop" path="socket:" dev=sockfs ino=12414105 scontext=root:system_r:postfix_postdrop_t:s0-s0:c0.c1023 tcontext=system_u:system_r:rpm_t:s0... (1 Reply)
Discussion started by: mojoman
1 Replies

7. Solaris

audit in solaris 10

can you please share what you use to audit what files are deleted, when files are deleted and who deleted them? thx (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

8. Solaris

audit in solaris

How do I know that audit is enabled in soalris. in AIX 'audit query' command gives me the info whether auditing is on or not. Raghav (1 Reply)
Discussion started by: raghavender_sri
1 Replies

9. Cybersecurity

Enabling C2 audit

hey guys, im going to enable C2 auditing on a sun box, i know how to do it, but im just wondering if there are any issues or problems that i may run into. this will be my first major change (since i have to reset the box) since i joined this company and i dont really wanna kill their servers, so... (2 Replies)
Discussion started by: roguekitton
2 Replies

10. Red Hat

server audit

Hi all.. I need to perform an audit on my servers (ranging form mdk to redhat, knoppix...). I know there exists somewhere a script that could get me back the info i want.. I've googled around, and haven't found anything interesting.. Anyone have some thing i could investigate? Thanx ... (5 Replies)
Discussion started by: penguin-friend
5 Replies
Login or Register to Ask a Question