1. Knowledge Base
  2. Backend Operations

How to modify the backup media block size

This article is for Amanda Enterprise (AE) 

The device BLOCK_SIZE parameter in Amanda configuration files determines the block size for backup images on the storage media (disk, tape, or cloud). This parameter cannot be changed using the Zmanda Management Console (ZMC) for disk or tape.  Media block size may be changed in ZMC when writing to cloud by changing the block size used by the cloud device in the Advanced Options section of the Admin|devices page.

The minimum block size is 32 KB which is the default set by ZMC for backup to disk and tape devices. Optimal device block size for disk or tape is the native block size used by your device, ie. file system or tape drive.

Default device block size for backups written to Amazon S3 is 2 MB (2 mega-bytes). There is no native block size for the Amazon S3 device but a reasonable block size should be selected if changed from the default. A block size that is excessively small should be avoided because this can lead to inefficiencies due to the overhead in starting and finishing each block. Block sizes that are excessively large, 1G for instance, should be carefully considered as Amanda keeps a few blocks in server memory at all times during the operation.

To utilize a block size other than the default 32k block size, the device BLOCK_SIZE property must be set to the desired size:

  1. Change directories to the /etc/zmanda/zmc/zmc_ags/device_profiles directory (in 3.1.5 and earlier it is /etc/zmanda/zmc_aee/device_profiles).
  2. Locate the device configuration profile (.yml file) for which you want to modify the BLOCK_SIZE property. This device configuration file name has the same name as the device name specified in the Zmanda Management Console.
  3. Edit the device profile (.yml file) and locate the device_property_list section:

    3.3.0 and later:device_property_list: LEOM: on
    3.1.5 and earlier:device_property_list: comment: 'http://wiki.zmanda.com/man/amanda-devices.7.html' COMPRESSION_comment: on FSF_comment: off BSF_comment: on
  4. Add (or modify) the BLOCK_SIZE property. This property value is given in bytes if no unit is specified. The following example sets the block size to 8 MB.

    3.3.0 and later:device_property_list: LEOM: on BLOCK_SIZE: 8m
    3.1.5 and earlier:device_property_list: comment: 'http://wiki.zmanda.com/man/amanda-devices.7.html' COMPRESSION_comment: on FSF_comment: off BSF_comment: on BLOCK_SIZE: 8m

Note: Please observe that each indentation is 2 spaces and must be carefully observed.

  1. Reload the Admin -> Backup sets page in the Zmanda Management Console so that the change is applied. In AE 3.0.X, there is a "Regenerate Device Bindings" button at the bottom, left side of the page. In 3.1, there is similarly a "Refresh Table" button at the bottom of the lower table.
  2. Confirm the change with the amadmin command. If your backup set name is Daily, the following output should confirm the change:
     $ amadmin Daily config | grep -i 'DEVICE.PROP.*block-size' DEVICE_PROPERTY "block-size"   "8m"
  3. The device property buffer size should be double this value. For any backup set that uses this ZMC device, edit its amanda.conf file, for instance, /etc/amanda/Daily/amanda.conf, and increase the "device_output_buffer_size" parameter to be at least double your BLOCK_SIZE parameter. Repeat for any other backup sets using this ZMC device. Once the change is made, confirm the change for each backup set using amgetconf (size shown in KB), for instance,
     $ amgetconf Daily device_output_buffer_size 16384