From: "Stuart D. Gathman" <stuart@bmsi.com>
To: daksh@olemiss.edu,
LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] calculating free capacity from pvdisplay and lvdisplay
Date: Wed, 11 Aug 2010 18:40:22 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.1008111831100.20515@bmsred.bmsi.com> (raw)
In-Reply-To: <AANLkTinnEDV-Vsx3LW9XirpDsN7mPyvphxeLsqYsSp0F@mail.gmail.com>
On Wed, 11 Aug 2010, Daksh Chauhan wrote:
> This is interesting, and I understand your explaination Ray... But,
> how can I figure out how much data is on each PVs??
If by "data" you mean "allocated to LVs", then the free PPs for each PV tells
you the answer.
But perhaps by "data" you mean "allocated to LVs *and* allocated to files
in the (arbitrary) filesystems on those LVs".
This would be difficult (and probably pointless).
1) Create a map for each LV of data blocks in use. Obtaining this map is
filesystem dependent, and very different for each filesystem type.
2) Use the LP->PV mapping for each LV to map in use filesystem blocks to PPs.
3) Count the PPs for each PV, and subtract from the total for each PV to get
the total in use by files in each respective filesystem.
The whole point of LVM is that LVM knows *nothing* about the filesystems
that you put on the LVs. You would not be asking the question unless:
a) You are coming from Sun ZFS, where the "LVM" *does* know about the
filesystems. (The drawback is that you can only ever use the ZFS
filesystem.)
b) You are unclear on the concept. Perhaps the explanation of how
it *could* be accomplished will illuminate. Note especially the point
in step 1 - "the map is filesystem dependent".
--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
next prev parent reply other threads:[~2010-08-11 22:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 22:26 [linux-lvm] calculating free capacity from pvdisplay and lvdisplay Daksh Chauhan
2010-08-11 22:40 ` Stuart D. Gathman [this message]
2010-08-11 23:01 ` Rahul Nabar
2010-08-11 23:56 ` Malahal Naineni
2010-08-12 0:22 ` Rahul Nabar
2010-08-12 0:52 ` Malahal Naineni
-- strict thread matches above, loose matches on Subject: below --
2010-08-11 2:25 Rahul Nabar
2010-08-11 6:10 ` Ray Morris
2010-08-11 17:03 ` Rahul Nabar
2010-08-11 17:19 ` Ray Morris
2010-08-11 8:42 ` Giorgio Bersano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1008111831100.20515@bmsred.bmsi.com \
--to=stuart@bmsi.com \
--cc=daksh@olemiss.edu \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).