LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-06-2017, 01:08 AM   #16
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465

df is already providing the disk utilization for physical volumes. You can ignore the tmpfs lines because tmpfs reside in RAM and aren't physical volumes.

You seem fundamentally confused about what these physical volumes are.

/dev/sda1 is a primary partition, which is mounted on /boot and has 9% utilization.

/dev/sda2 is an LVM container. It contains two LVM volumes, dm-0 and dm-1. It doesn't directly contain a file system, but it does contain two volumes with little or no space for any other future volumes.

dm-0 is an LVM volume within /dev/sda2, which is mounted on / and has 29% utilization.

dm-1 is an LVM volume within /dev/sda2, which is swap rather than a file system partition. It doesn't have a file system, and it doesn't really have any sense of "disk utilization" the way a file system partition has a sense of "disk utilization". It's more like an extension of RAM. Its utilization is reflected by the output of the "free" command, which reports on memory utilization (including virtual memory). But like RAM, it's not used for persistent storage. If there's a power loss or planned shutdown, the contents of swap are as good as wiped clean, just like RAM.

All of the relevant information is right in front of you, I think that you're just confused by the fact that you're not familiar with how LVM works. LVM volumes need container partitions to "live inside".
 
1 members found this post helpful.
Old 09-06-2017, 01:38 AM   #17
freeac
LQ Newbie
 
Registered: Sep 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
@IsaacKuo
yes i am totally confused
let me explain, here we are using Disk utilization and filesystem utilization seperately. In AIX using

Code:
$lsvg
rootvg
datavg
Code:
$lspv hdisk1
PHYSICAL VOLUME:    hdisk1                   VOLUME GROUP:     datavg
PV IDENTIFIER:      00f65eab7acabb17 VG IDENTIFIER     00f65eab00004c00000001567b60a848
PV STATE:           active
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            512 megabyte(s)          LOGICAL VOLUMES:  4
TOTAL PPs:          899 (460288 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           470 (240640 megabytes)   HOT SPARE:        no
USED PPs:           429 (219648 megabytes)   MAX REQUEST:      256 kilobytes
I am able to get Total PPs,Free PPs and used PPs for hdisk0,hdisk1 using lspv and able to calculate disk utilization.
But in linux i tried like this,

Code:
$pvdisplay /dev/sda2
 --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup
  PV Size               15.51 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              3970
  Free PE               0
  Allocated PE          3970
Using this not able to understand Disk size,used space, Free space.
using "df" we are already calculating filesystem utilization. now i need to calculate disk utilization.
 
Old 09-06-2017, 06:16 AM   #18
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
It seems that PP's in AIX are the equivalent of PE's in LVM. So, it seems to be right there:

PE Size is 4MiB (the default size, and there's no reason to change this with LVM2).
Total number of PEs is 3970.
Free number of PEs is 0.
Allocated number of PEs is 3970.

I think that the basic problem is that you're using lingo which is specific to AIX and expecting us (who are mostly unfamiliar with AIX) to be using the same lingo. Well, we're used to using Linux lingo. So there's some friction there. Not all Unix-like operating systems use all of the same language for various things. This particularly applies to file systems.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check and use unpartitioned space of Hard disk in linux. nhsarvaiya Linux - Hardware 11 03-13-2024 06:39 AM
LXer: Quick guide for Linux check disk space LXer Syndicated Linux News 0 04-25-2017 01:01 PM
[SOLVED] what is a logical partitions and group partitions and how to check disk space on a partition ITareliteralyMyInitials Linux - Newbie 10 02-08-2016 11:19 AM
How to check disk space in linux of remote server ? rockstar05 Linux - Server 10 08-28-2013 08:33 AM
[SOLVED] No space to create more partitions, but there is free space anon091 Linux - Newbie 35 10-31-2012 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:31 PM.

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
Open Source Consulting | Domain Registration