LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2014, 06:13 AM   #1
rameshbolaram
LQ Newbie
 
Registered: Nov 2014
Posts: 1

Rep: Reputation: Disabled
How to get only free space value in pvs


we are working on a script which should run/execute only if the PV (LVM) free space is greater than 100GB.
how can i make my script to understand the number of free space in run it.

PVS output:

PV VG Fmt Attr PSize PFree
/dev/sda3 VG-934c50cb-2251-cc09-28de-d9ddb6e5b252 lvm2 a- 457.75G 329.48G
 
Old 11-12-2014, 03:48 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,926

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by rameshbolaram View Post
we are working on a script which should run/execute only if the PV (LVM) free space is greater than 100GB.
how can i make my script to understand the number of free space in run it.

PVS output:

PV VG Fmt Attr PSize PFree
/dev/sda3 VG-934c50cb-2251-cc09-28de-d9ddb6e5b252 lvm2 a- 457.75G 329.48G
There are several ways...so why don't you post your script, and show us what YOU have written/tried so far, and tell us where you're stuck. You can easily pipe that command through sed (to strip away the first header line), and awk (to print JUST the last value).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 01:57 PM
No more free space! df 99.9%, du 29% usage - missing free space ? Topper_BG Linux - General 14 02-08-2012 03:40 PM
Help removing free space to create Raw free space nightmare55 Linux - Newbie 11 10-01-2009 04:07 AM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 09:21 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 06:10 AM


All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration