Sponsored Content
Full Discussion: Getting LV Info
Top Forums Shell Programming and Scripting Getting LV Info Post 302217016 by Daniel Gate on Monday 21st of July 2008 10:09:21 PM
Old 07-21-2008
Getting LV Info

I have this working ksh, and it returns like below:

LOGICAL VOLUME: prod_2048_005 VOLUME GROUP: prod1vg
TYPE: raw WRITE VERIFY: off
PHYSICAL VOLUME: hdisk108 VOLUME GROUP: prod1vg
TOTAL PPs: 1023 (130944 megabytes) VG DESCRIPTORS: 1
USED PPs: 904 (115712 megabytes) MAX REQUEST: 1 megabyte USED DISTRIBUTION: 192..205..204..204..99
FREE PPs: 119 (15232 megabytes) HOT SPARE: no FREE DISTRIBUTION: 13..00..00..00..106

I like to have a horizontal format with additional PP Size info with the header names like below:

i.e.
LV TYPE PV TOTAL USED FREE PP
prod_2048_005 raw hdisk101 1023 904 119 32

for i in `cat temp.txt`
do
for n in `lslv -l $i|cut -d" " -f1|egrep -v "PV|:"`
do
echo `lslv $i|egrep "LOGICAL VOLUME"`
echo `lslv $i|egrep "TYPE"`
echo `lspv $n|egrep "PHYSICAL VOLUME"`
echo `lspv $n|egrep "TOTAL"`
echo `lspv $n|egrep "USED"`
echo `lspv $n|egrep "FREE"`
echo
done
done


Please advise.

thx much
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SU info

from the man page of su: EXAMPLES Example 1: Becoming User bin While Retaining Your Previously Exported Environment To become user bin while retaining your previously exported environment, execute: example% su bin Example 2: Becoming User bin and ... (4 Replies)
Discussion started by: afflack
4 Replies

2. Shell Programming and Scripting

some info on awk please

i know this is a stupid question but...can awk do more than print? can i have it assign a value from a file list to a variable in the script? (1 Reply)
Discussion started by: MadHatter
1 Replies

3. UNIX for Dummies Questions & Answers

Extracting Info

i have a file that contain lines like this 9.4.7.8.5.7.9.0.5.7.1.2.msisdn.sub.cs. 1 IN CNAME SDP01.cs. there are about 50,000 lines like this in the files i want to the extract the digits from the above line like:- 947857905712 OS Solaris9 (3 Replies)
Discussion started by: muneebr
3 Replies

4. Shell Programming and Scripting

Merging info

Hi, pls advise how could we merge contents of lines from 2 different files into 1 file but shares common label continously as in the following example: Thanks in advance...rgds. File1: // line: 0 abc def // line: 1 ghi jkl File2: // line: 0 mno pqr // line: 1 stu vwx End... (3 Replies)
Discussion started by: Manan
3 Replies

5. Solaris

UFSDUMP info

Hi,,,,, My question is : i have to backup a file system of size 92 GB /dev/dsk/c1t1d0s2 135G 92G 41G 70% /data i use the command : ufsdump 0cfu /backup/c1t1d0s2 /dev/rdsk/c1t1d0s2 ...... the output file of the backup is only 2 GB it's normal ?? or i have do a... (0 Replies)
Discussion started by: tt155
0 Replies

6. Shell Programming and Scripting

last logged on info

Hi how can I know the details of when valid system users last logged on? thanks (1 Reply)
Discussion started by: nokia1100
1 Replies

7. Shell Programming and Scripting

Need Info

Hi, I'm a oracle DBA with little knowledge of Unix. I wanted to write some shell scripts which will be helpful for DBA's regular activity. As i'm a new to oracle with unix can any plese tell me what are all the activities can be done throgh Unix Shell Scripts also suggest me how to learn... (1 Reply)
Discussion started by: msgobinathan
1 Replies

8. Forum Support Area for Unregistered Users & Account Problems

Update my info

I hadn't logged on here in several months. I want to update my info, such as the email address that I can be contacted at, but I don't see any links to do that. (1 Reply)
Discussion started by: cleopard
1 Replies

9. UNIX for Dummies Questions & Answers

Some Info.

Hiya all ... i am a newbie to UNIX, Just want to knwo what this command does: /sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' I think, 'grep shows the line with 'inet addr' (which is the 2nd line, displaying the IP Address, Broadcast Address and Subnet Mask) ... Is... (8 Replies)
Discussion started by: ad4m88
8 Replies

10. UNIX for Advanced & Expert Users

Getting machine info in C

I need to find a way to query the OS (on Linux or Unix) to get details about the host machines processor type and the primary hard drive serial number. Is this possible? Thank you for any Guru help you can provide! (2 Replies)
Discussion started by: Pug
2 Replies
GlusterFS(8)							   Gluster Inc. 						      GlusterFS(8)

NAME
GlusterFS - clustered file system SYNOPSIS
glusterfs [options] [mountpoint] DESCRIPTION
GlusterFS is a clustered file system, capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP and interconnect into one large parallel network file system. Storage bricks can be made of any commodity hardware, such as x86-64 server with SATA-II RAID and Infiniband HBA. GlusterFS is fully POSIX compliant file system. On client side, it has dependency on FUSE package, on server side, it works seemlessly on different operating systems. Currently supported on GNU/Linux and Solaris. OPTIONS
Basic options -f, --volfile=VOLUME-FILE File to use as VOLUME-FILE. -l, --log-file=LOGFILE File to use for logging (the default is <INSTALL-DIR>/var/log/glusterfs/<MOUNT-POINT>.log). -L, --log-level=LOGLEVEL Logging severity. Valid options are TRACE, DEBUG, INFO, WARNING, ERROR and CRITICAL (the default is INFO). -s, --volfile-server=SERVER Server to get the volume from. This option overrides --volfile option. --volfile-max-fetch-attempts=MAX-ATTEMPTS Maximum number of connect attempts to server. This option should be provided with --volfile-server option (the default is 1). Advanced options --acl Mount the filesystem with POSIX ACL support. --debug Run in debug mode. This option sets --no-daemon, --log-level to DEBUG, and --log-file to console. --enable-ino32=BOOL Use 32-bit inodes when mounting to workaround application that doesn't support 64-bit inodes. --fopen-keep-cache Do not purge the cache on file open. --mac-compat=BOOL Provide stubs for attributes needed for seamless operation on Macs (the default is off). -N, --no-daemon Run in the foreground. -p, --pid-file=PIDFILE File to use as PID file. --read-only Mount the file system in 'read-only' mode. --selinux Enable SELinux label (extended attributes) support on inodes. -S, --socket-file=SOCKFILE File to use as unix-socket. --volfile-id=KEY Key of the volume file to be fetched from the server. --volfile-server-port=PORT Port number of volfile server. --volfile-server-transport=TRANSPORT Transport type to get volume file from server (the default is tcp). --volume-name=VOLUME-NAME Volume name to be used for MOUNT-POINT (the default is top most volume in VOLUME-FILE). --worm Mount the filesystem in 'worm' mode. --xlator-option=VOLUME-NAME.OPTION=VALUE Add/Override a translator option for a volume with the specified value. Fuse options --attribute-timeout=SECONDS Set attribute timeout to SECONDS for inodes in fuse kernel module (the default is 1). --background-qlen=N Set fuse module's background queue length to N (the default is 64). --congestion-threshold=N Set fuse module's congestion threshold to N (the default is 48). --direct-io-mode=BOOL Enable/Disable the direct-I/O mode in fuse module (the default is enable). --dump-fuse=PATHR Dump fuse traffic to PATH --entry-timeout=SECONDS Set entry timeout to SECONDS in fuse kernel module (the default is 1). --gid-timeout=SECONDS Set auxilary group list timeout to SECONDS for fuse translator (the default is 0). --negative-timeout=SECONDS Set negative timeout to SECONDS in fuse kernel module (the default is 0). --volfile-check Enable strict volume file checking. Miscellaneous Options -?, --help Display this help. --usage Display a short usage message. -V, --version Print the program version. FILES
/var/lib/glusterd/vols/*/*.vol EXAMPLES
mount a volume named foo on server bar with log level DEBUG on mount point /mnt/foo # glusterfs --log-level=DEBUG --volfile-id=foo --volfile-server=bar /mnt/foo SEE ALSO
fusermount(1), mount.glusterfs(8), gluster(8) COPYRIGHT
Copyright(c) 2006-2011 Red Hat, Inc. <http://www.redhat.com> 07 March 2011 Clustered File System GlusterFS(8)
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy