Converting Blocks to megabytes and gigabytes. | Unix Linux Forums | AIX

  Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Converting Blocks to megabytes and gigabytes.

AIX


Tags
aix, unix

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-05-2009
jfd7000 jfd7000 is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 19 October 2009, 7:01 PM EDT
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Converting Blocks to megabytes and gigabytes.

Sorry for the simple question.

I am new to Unix and Unix AIX.

I increased a file system the other day but cheated and used a conversion calculator.

Could you good people tell me the best way to increase a file system that is in 512 byte blocks.

Say the file system is 100mb and I wanted to increase to 200mb how would I work this out?

Thanks for your help
Sponsored Links
    #2  
Old 10-05-2009
faruk faruk is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 17 December 2009, 12:06 AM EST
Posts: 55
Thanks: 0
Thanked 1 Time in 1 Post
Hi,


Code:
the file system is 100mb and I wanted to increase to 200mb

The Filesystem can be increased according to your PP size of the vg. You can increase any file system size by multiple of your PP size.

For eg: if your PP size is 256Mb and you try to increase the file system size by 200Mb the file system will be increased by 256Mb only.

HTH.
Sponsored Links
    #3  
Old 10-06-2009
garethr garethr is offline
Registered User
 
Join Date: May 2009
Last Activity: 17 April 2012, 11:28 AM EDT
Location: England
Posts: 97
Thanks: 0
Thanked 2 Times in 1 Post
bc can be useful:

E.g. Number of blocks in 100MB:


Code:
# echo "(100*1024*1024)/512" | bc
204800

    #4  
Old 10-06-2009
jfd7000 jfd7000 is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 19 October 2009, 7:01 PM EDT
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Why do you multiply the value by 1024 then 1024 again?

100*1024*1024?

Say the block size was 1024000 or 500mb if I wanted to add 100mb would I just add 204800 to 1024000?
Sponsored Links
    #5  
Old 10-07-2009
garethr garethr is offline
Registered User
 
Join Date: May 2009
Last Activity: 17 April 2012, 11:28 AM EDT
Location: England
Posts: 97
Thanks: 0
Thanked 2 Times in 1 Post
1024 = 1k
1024*1024 = 1M
100*1024*1024 = 100M

512 bytes in a block.
So, number of blocks in 100M = (100*1024*1024)/512
Sponsored Links
    #6  
Old 10-07-2009
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 30 August 2014, 7:45 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 4,204
Thanks: 44
Thanked 800 Times in 631 Posts
For reference you might want to read this thread and maybe this thread.

I hope this helps.

bakunin
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shell script to convert file_size from bytes to megabytes a1_win Shell Programming and Scripting 3 08-06-2009 04:33 PM
Extract sequence blocks solli Shell Programming and Scripting 7 03-26-2009 11:38 PM
Sorting blocks of data alfredo123 Shell Programming and Scripting 8 07-05-2007 10:53 AM
Delete blocks with no data.. mgirinath Shell Programming and Scripting 1 01-28-2006 05:33 PM



All times are GMT -4. The time now is 12:14 PM.