SERVERware 3 Backup Host


Introduction


In order to provide fault-tolerant storage, SERVERware relies on a mirrored pair of storage servers.


Even with storage servers in mirror configuration, if data is corrupted (or deleted) on the primary

server, the mirroring process copies corrupted (or deletes) data on the secondary server. The result is

a data loss on both servers and in this case, the data can be recovered only from the backup server.


Given that the storage mirror by definition and purpose is not a backup, it is very important to have

a dedicated Backup Host. That way you can fully make use of the SERVERware built-in backup feature

to protect the data of hosted VPSs in the event of a disaster.


Setup storage pool for backup host


Log on to the backup host using ssh.

We need to create a BACKUP pool from the physical disk drives on the system.

To find out the name of the block devices use this command:

~# ls -lah /dev/disk/by-id
..
lrwxrwxrwx 1 root root   9 Pro 14 22:38 ata-ST31000520AS_5VX0BZPV -> ../../sdb
lrwxrwxrwx 1 root root   9 Pro 14 22:38 ata-ST31000520AS_5VX0BZPV -> ../../sdc
..


When we have names of the drives we want to use for storage, we can start creating a pool.

To create a pool from the available disks, use this command:

~# zpool create BACKUP mirror /dev/<device-1-name> /dev/<device-2-name>


IMPORTANT: Hard drives used for backup in mirror mode must be identical.

To see the status of the new pool use:

# zpool status BACKUP
  pool: BACKUP
 state: ONLINE
  scan: resilvered 728M in 0h0m with 0 errors on Tue Dec  6 16:13:09 2016
config:
        NAME                            STATE     READ WRITE CKSUM
        BACKUP                         ONLINE       0     0     0
          mirror-0                     ONLINE       0     0     0
            ata-ST31000520AS_5VX0BZPV  ONLINE       0     0     0
            ata-ST31000520AS_5VX0BZPV  ONLINE       0     0     0
         
errors: No known data errors


We have finished creating the new pool for storage.

For the BACKUP pool to be active after system restart, we have to import zpool at system startup. To do this we have to add an import function in the startup script.

We need to add a new file inside a folder:

/etc/local.d/


All scripts in the folder /etc/local.d/ with the suffix .start will be executed at boot time. Create a new file with any name you like and the suffix ".start"

<file-name>.start 


Edit the file and add next line inside.

zpool import BACKUP


Save the file and make it executable with the command:

~# chmod +x <file-name>.start


This concludes the procedure of setting up a backup storage host.