LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-23-2012, 10:16 AM   #1
Wojk
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Rep: Reputation: Disabled
Resize LVM to EXACT size


So after some searching around these forums I didn't find an answer that I was looking for.

My question is simple, when resizing (or creating) a Linux Logical Volume, how can I get the partition to be an EXACT amount.

Here is what I am talking about:


[root@tuxedo /]# lvscan
ACTIVE '/dev/vg_test/lv_test' [800.00 MiB] inherit

I want my LV to be 800MB. Which it says it is. Here's an output of my df -h

/dev/mapper/vg_test-lv_test
786M 34M 714M 5% /test

No matter what I do, I cannot get my partition to be exactly 800 like desired. Can anyone help?
 
Old 10-23-2012, 11:04 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
All file systems have some overhead which is why the volume size differs from the output of df. You can try increasing the LV size by the overhead percentage which may get to the desired 800M. There filesystem parameters that can be tweaked like journal size if using ext3/4 that can change overhead size.

Is there any reason why you want exactly 800M.


http://rwmj.wordpress.com/2009/11/08...data-overhead/

Last edited by michaelk; 10-23-2012 at 11:08 AM.
 
Old 10-23-2012, 11:13 AM   #3
Wojk
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thank you for the reply.

The only reason I was looking for an exact number is because I will be taking the RHCSA exam here on the 9th of next month, and one of the objectives is to resize an LVM to a desired amount.

I figured on the test it would need to be the exact amount they request?
 
Old 10-23-2012, 12:46 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I do not know but would guess it is volume size vs filesystem size.
 
Old 10-23-2012, 01:03 PM   #5
Wojk
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
I think that would make sense.

Thank you again!
 
  


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 change window size ... to an exact number Skaperen Linux - Desktop 8 05-04-2012 10:14 PM
creating logical volume of exact specified size devkpict Linux - Software 1 07-16-2009 03:59 AM
deleting file by exact size drpaudel Linux - Newbie 1 04-02-2008 03:56 AM
LVM Resize - After logical resize, FS size does not match physical size. spectra Linux - Software 6 11-01-2006 11:28 AM
Can't recognize my exact harddisk size ! ericmacau Linux - Hardware 2 09-23-2003 05:07 AM

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

All times are GMT -5. The time now is 10:43 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