1752781 Members
5957 Online
108789 Solutions
New Discussion юеВ

Re: Writing to disk

 
SOLVED
Go to solution
Dan Bonham
Advisor

Writing to disk

I need to find out what is the smallest size block that is written to disk. That is the default size, we are running 11.0.

TIA

Rusty
12 REPLIES 12
Joseph C. Denman
Honored Contributor
Solution

Re: Writing to disk

I believe 1K block size is the default. To find out what yours is, do this:

fstyp -v /dev/vg01/lvol1

#note the f_bsize

...jcd...
If I had only read the instructions first??
Dan Bonham
Advisor

Re: Writing to disk


Mine reports 8192 for f_bsize.
so, even if I have a smaller file that 8k, it will still take up 8k on the disk.

is that true?

Rusty
James R. Ferguson
Acclaimed Contributor

Re: Writing to disk

Hi Rusty;

Knowledge Base doucment #1100330242 notes that for VxFS filesystems, 'v_bsize' represents the largest possible block size which is 8K. 'f_bsize' (at returned too, with 'fstyp -v') is known as the "fragment size" but represents the actual block size (usually 1K).

In point of fact, if you create a small file ('echo x > /tmp/smallfile') and then do a 'du /tmp/smallfile', you will note that the size of the file is "2" 512-byte blocks, or 1K.

Regards!

...JRF...
Dan Bonham
Advisor

Re: Writing to disk

James,
here is the output from my fstyp command. I do not see a v_size.

vxfs
version: 3
f_bsize: 8192
f_frsize: 1024
f_blocks: 512000
f_bfree: 309341
f_bavail: 309341
f_files: 8192
f_ffree: 1073792296
f_favail: 1073792296
f_fsid: 1073741828
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 6
f_size: 512000

Which on is telling me the smalles size that is written to disk.

thanks,

Rusty
linuxfan
Honored Contributor

Re: Writing to disk

Hi Rusty,

what James meant f_frsize (fragment size)

Here is the document James was talking about

/Begin/
To determine the current block size for the vxfs file system:

fstyp -v /dev/vg00/lvol#

For example:

# fstyp -v /dev/vg00/lvol1

f_bsize: 8192

Note: The f_bsize parameter reports the block size for the vxfs
file system.


To determine the current block size for the hfs file system:

tunefs -v /dev/vg00/rlvol# | grep bsize

For example:

# tunefs -v /dev/vg00/rlvol4 | grep bsize

sbsize 2048 cgsize 2048 cgoffset 24 cgmask 0xfffffff8
bsize 8192 bshift 13 bmask 0xffffe000

Here is an example of how HFS and VxFS actually interpret these fields:

Field HFS Value for VxFS
----- --- --------------
f_bsize block size (8K) largest possible block size (8K)
f_frsize fragment size (1K) actual block size (usually 1K)

/End/


So the the smallest block size you can write is 1K (1024)

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sridhar Bhaskarla
Honored Contributor

Re: Writing to disk

Your smallest size is your f_frsize. 8K is the max I/O can can be produced on the system.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James R. Ferguson
Acclaimed Contributor

Re: Writing to disk

Hi (again) Rusty:

Ah, I just can't type! The value from 'fstyp -v' that I was referring to is 'f_frsize'. You should see it immediately below 'f_bsize'.

Regards!

...JRF...
Dan Bonham
Advisor

Re: Writing to disk

Thanks guys for your help.

I have a good understanding now.

Does anybody happen to know how to find the same information (block and fragment) on an AIX box?

Thanks again,

Rusty
Bill Hassell
Honored Contributor

Re: Writing to disk

Another way to locate the block and frag sizes is to use: df -g /mount_point

Or you can use the latest version of bdfmegs which now has a -v option to show block/frag size, filesystem type and whether it supports largefiles. This script always produces 1-line per mountpoint regardless of length. Download a copy from:

ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/coolscripts/

Note the ftp:, not http. Also, for IE 5.0 users, there is a bug which causes a hang when looking at ftp sites. Change the "Enable folder view in FTP" to disabled (Tools-> Internet-> Advanced)

Or use plain old ftp to the hprc machine, login is contrib, pw=9unsupp8


Bill Hassell, sysadmin