[Box Backup] Block size

Ben Summers boxbackup@fluffy.co.uk
Mon, 31 May 2004 11:39:44 +0100


On 31 May 2004, at 11:27, Andreas Schrafl wrote:

> How do I find out the blocksize for the server config?
>
> /etc/box/raidfile.conf
>
> /usr/local/bin/raidfile-config /etc/box 2048 /raid/0.0 /raid/0.1 
> /raid/0.2
>
> But adjust it for your system. 2048 is the block size. Under BSD with 
> FFS, set this to your filing system's fragment size (most likely an 
> 8th of the block size), otherwise the block size of the filing system, 
> for maximum efficiency.
>
>
> I am using OpenBSD but I'm not sure anymore what blocksize it has on 
> the disk. So this is quite a simple thing but how do I find out this 
> filing system's fragment size (and if it is an 8th of the blocksize 
> how do I find out that?)

Use disklabel ... like this:


# disklabel wd5
# using MBR partition 3: type A6 off 63 (0x3f) size 585938682 
(0x22ecb6fa)
# /dev/rwd5c:
type: ESDI
disk: ESDI/IDE disk
label: Maxtor 5A300J0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 585940320
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
   a:  1048257       63    4.2BSD     2048 16384   328   # (Cyl.    0*- 
1039)
   c: 585940320        0    unused        0     0        # (Cyl.    0 - 
581289)
   e: 584890425  1048320    4.2BSD     2048 16384   328  # (Cyl. 1040 - 
581288*)
                                              |
                                              \- this value

The 'bsize' entry is the block size. This disc has 16k blocks. Most 
modern (ie large) discs will.

As for the 8th of that, it depends on how you formatted it. If you 
specified a different fragment size to newfs, you would know what it 
is. Otherwise, the default is an 8th.

Tip: If you're NOT using raidfile, then the block size doesn't matter 
anyway. And this isn't critical anyway...

>
> Thanks for answering even stupid questions like mine but this backup 
> app seems the onlyone that does almost everything I need.

What else do you need? I have a list of stuff to implement, and new 
entries are always welcome.

Ben