Operating System - HP-UX
1832857 Members
3414 Online
110047 Solutions
New Discussion

Re: Blocksize - where can I find it ? (how) can I change it?

 
Michael Bluemm
Frequent Advisor

Blocksize - where can I find it ? (how) can I change it?

Hi,
I've got 2 (nearly) identical systems under 10.20.
But, when I do the "du"-command, I wonder, because one tells me the blocksize of 512 Byte, the other's blocksize is 4K.
- In which system-file is blocksize defined?
- can I change it, so that both computers have the same size (f.e. 512 B or 1K), or is this impossible?
Thanks for help,
Michael
... still trying ...
5 REPLIES 5
linuxfan
Honored Contributor

Re: Blocksize - where can I find it ? (how) can I change it?

Hi Michael,


Do a "fstype -v /dev/vg??/lv??"

The f_frsize indicates the block size

Did you try du with -kxs option

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
linuxfan
Honored Contributor

Re: Blocksize - where can I find it ? (how) can I change it?

Hi Michael,

Found an interesting thread,

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf592e7e60861d511abcd0090277a778c,00.html

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Marcin Wicinski
Trusted Contributor

Re: Blocksize - where can I find it ? (how) can I change it?

Hi,

HFS:

f_bsize block size
f_frsize fragment size

VxFS:

f_bsize largest possible block size
f_frsize actual block size

You can indicate required block size while file system creating:

newfs -o bsize=n,

n is the block size, in bytes, for files on the
file system and represents the smallest amount of disk space that will be allocated to a file. n must be a power of 2 selected from the range 1024 to 8192.The default is 1024 bytes.

See man pages for mkfs_vxfs, mkfs_hfs.

Later,


Marcin Wicinski
Varghese Mathew
Trusted Contributor

Re: Blocksize - where can I find it ? (how) can I change it?

Hi,

u can use the above commands for verifying the fs type, by the way you can specify the block size for file system only when you create the file system.

For vxfs FS you can use :

#mkfs -F vxfs -b 8192 /dev/vgXX/lvname

Where in HFS it is fragment, u can use:
#mkfs -F hfs -o fragsize xxxx /dev/vgxx/lvname

Hope this helps..
Cheers !!!
MAthew


Hope this helps..
Cheers !!!
Klaus Crusius
Trusted Contributor

Re: Blocksize - where can I find it ? (how) can I change it?


The du command (without options) always reports the sizes in "blocks" of 512 bytes, don't confuse with the file system block size.
Ther is the -k switch if you want to see kilobytes. I can only guess that you are using different programs if you call du on both machines. Can you verify this "whence -v du" and compare the binaries you are actually executing.

Klaus
There is a live before death!