Bacula-users

Re: [Bacula-users] Bacula backup problems

2011-09-09 05:23:18
Subject: Re: [Bacula-users] Bacula backup problems
From: Stefan Muenkner <stefan.muenkner AT mx.uni-saarland DOT de>
To: bacula-users AT lists.sourceforge DOT net, r.klomp AT aashq DOT nl
Date: Fri, 09 Sep 2011 10:12:32 +0200
On 09/06/2011 02:18 PM, René Klomp wrote:
> Pre_backup:sh
> 
> #!/bin/bash
> 
> #scst_lv1 hangt aan de Terminal Server (192.168.32.241)
> #scst_lv2 hangt aan de Exchange Server (192.168.32.231)
> #scst_lv3 hangt aan de File Server     (192.168.32.230)
> #scst_lv4 hangt aan de Alure Server    (192.168.32.232)
> 
> sudo /usr/sbin/lvcreate -L40G -s -n scst_lv1-snap /dev/backup_vg/scst_lv1
> sudo /usr/sbin/lvcreate -L40G -s -n scst_lv2-snap /dev/backup_vg/scst_lv2
> sudo /usr/sbin/lvcreate -L40G -s -n scst_lv3-snap /dev/backup_vg/scst_lv3
> sudo /usr/sbin/lvcreate -L40G -s -n scst_lv4-snap /dev/backup_vg/scst_lv4
> 
> # Mount de snapshot (mooiste is als deze even groot is als het origineel, 
> dan kan er eigenlijk niets mis gaan
> 
> sudo /bin/mount -t ntfs -o loop,ro,offset=$(( 63*512 )) 
> /dev/mapper/backup_vg-scst_lv1--snap /backupmnts/SCSTDISC1
> sudo /bin/mount -t ntfs -o loop,ro,offset=$(( 63*512 )) 
> /dev/mapper/backup_vg-scst_lv2--snap /backupmnts/SCSTDISC2
> sudo /bin/mount -t ntfs -o loop,ro,offset=$(( 63*512 )) 
> /dev/mapper/backup_vg-scst_lv3--snap /backupmnts/SCSTDISC3
> sudo /bin/mount -t ntfs -o loop,ro,offset=$(( 63*512 )) 
> /dev/mapper/backup_vg-scst_lv4--snap /backupmnts/SCSTDISC4
> 
> exit 0
> 

The above script silently assumes that the snapshots are not already
existing _and_ are not mounted - both prerequisites cannot be relied upon
since unmounting  and destroying the snapshots happens somewhere else (and
can fail for any reason)

Call the person on holiday to fix this - it looks like this is probably
the main part of the problem

<---snip-snap--->


> 
> 
> [root@localhost ~]# vgdisplay
>   /dev/loop0: read failed after 0 of 2048 at 0: Input/output error

Above is the same error message you get down there vvvvvvvvvvvvvvvvvvv
<--snip-snap->

> 01-Sep 08:00 backup.localdomain-dir JobId 167: BeforeJob:   /dev/loop0: 
> read failed after 0 of 4096 at 0: Input/output error
> 01-Sep 08:00 backup.localdomain-dir JobId 167: BeforeJob:   Logical volume 
> "scst_lv4-snap" already exists in volume group "backup_vg"
> 01-Sep 08:00 backup.localdomain-dir JobId 167: BeforeJob: mount: could not 
> find any free loop device
> 01-Sep 08:00 backup.localdomain-dir JobId 167: BeforeJob: mount: could not 
> find any free loop device

and the other error messages point in the direction of my above comment re
Pre_backup.sh simply assuming that the snapshots are non existent and not
mounted.

The /dev/loop0 could be related to all this or might have nothing to do
with it.


> [...]
> Judging from those "lv", "vg" and "snap" bits, it appears that Bacula
> is configured to make backups using "LVM snapshots" [1].
> Supposedly that /etc/bacula/pre_backup.sh script is responsible for
> creation of a snapshot for one or more LVM logical volumes (they hold
> filesystems) and mounting them somewhere for the Bacula to back up.
> 
> So without the in-depth details about how this is implemented, it's
> impossible to tell anything further.
> Bacula itself has nothing to do with this.
> 
> In theory, you could provide the director's config file, the contents
> of that "pre_backup.sh" script and the output of running
> # vgdisplay
> and
> # lvdisplay
> so we could try to figure out how it's supposed to work and how to
> fix the situation, but I'd rather call that person out from their
> holidays.
> 
> 1. http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29
> 

Best regards,
  Stefan


-- 
this is an empty signature :-)

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>