dbTalk Databases Forums  

Disk blocks to kbytes

sybase.public.ase.linux sybase.public.ase.linux


Discuss Disk blocks to kbytes in the sybase.public.ase.linux forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Germano
 
Posts: n/a

Default Disk blocks to kbytes - 03-08-2005 , 01:13 PM






I think I've asked this question before and I had the formula, but I can't
seem to find it.

How do I convert the number of block on a partition to either kbytes or
Megabytes?

Thanks



Reply With Quote
  #2  
Old   
none
 
Posts: n/a

Default Re: Disk blocks to kbytes - 03-09-2005 , 04:04 AM






Hello,

Try df -h this will print free space in human readable form, e.g. Mb,
Kb, etc....



Germano wrote:
Quote:
I think I've asked this question before and I had the formula, but I can't
seem to find it.

How do I convert the number of block on a partition to either kbytes or
Megabytes?

Thanks



Reply With Quote
  #3  
Old   
Germano
 
Posts: n/a

Default Re: Disk blocks to kbytes - 03-09-2005 , 08:09 AM



The problem is that these are raw devices, I cannot use df on them. I used
fdisk to partition the devices and now I have the output of fdisk with the
number of blocks per partition and I want to know exactly how many kbytes or
megabytes each partition is.

Here's the output of fdisk:

Disk /dev/emcpowera: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/emcpowera1 1 491 3943926 60 Unknown
/dev/emcpowera2 492 982 3943957+ 60 Unknown
/dev/emcpowera3 983 1473 3943957+ 60 Unknown
/dev/emcpowera4 1474 1958 3895762+ 60 Unknown


"none" <""rkoma\"@(none)"> wrote

Quote:
Hello,

Try df -h this will print free space in human readable form, e.g. Mb, Kb,
etc....



Germano wrote:
I think I've asked this question before and I had the formula, but I
can't seem to find it.

How do I convert the number of block on a partition to either kbytes or
Megabytes?

Thanks



Reply With Quote
  #4  
Old   
Emmanuel Cerisier
 
Posts: n/a

Default Re: Disk blocks to kbytes - 03-09-2005 , 10:11 AM



Germano wrote:
[...]
Quote:
Here's the output of fdisk:

Disk /dev/emcpowera: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/emcpowera1 1 491 3943926 60 Unknown
/dev/emcpowera2 492 982 3943957+ 60 Unknown
/dev/emcpowera3 983 1473 3943957+ 60 Unknown
/dev/emcpowera4 1474 1958 3895762+ 60 Unknown
Hello,

1 Block == 1Kbyte

which means each of your devices is around 4Go...


--
Emmanuel.


Reply With Quote
  #5  
Old   
Jeff Tallman
 
Posts: n/a

Default Re: Disk blocks to kbytes - 03-09-2005 , 10:55 PM



Emmanuel Cerisier wrote:
Quote:
Germano wrote:
[...]


Here's the output of fdisk:

Disk /dev/emcpowera: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/emcpowera1 1 491 3943926 60 Unknown
/dev/emcpowera2 492 982 3943957+ 60 Unknown
/dev/emcpowera3 983 1473 3943957+ 60 Unknown
/dev/emcpowera4 1474 1958 3895762+ 60 Unknown


Hello,

1 Block == 1Kbyte

which means each of your devices is around 4Go...


Actually disk blocks used to be 512 bytes at the low level - in fact
this calculation was used in some of the early procs used for converting
pages to blocks - and the 512 in the calculation seems suggest this is
still true. The 1K maybe the inode division level.


Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.