cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with pre/post commands and RALUS

i29internet
Not applicable
I'm having a problem with the pre/post commands when performing a backup of a linux server using RALUS.

Here are my setup details:

Backup server
  • Windows 2003 Server - fully updated
  • Backup Exec for Windows v12 (recently upgraded)
  • Linux client licenses are installed
Client to be backed up
  • RHEL v5
  • Running RALUS from the v12 downloads section
  • Using LVM snapshots to back up a MySQL database
  • One script to create LVM snapshot (pre-command) and one script to release LVM snapshot (post-command)
Here is the process I'm trying to implement:
  1. Run pre-command to do the following
    1. stop MySQL
    2. create LVM snapshot
    3. mount LVM snapshot
    4. start MySQL
  2. Perform backup via RALUS and Backup Exec v12
  3. Run post-command to do the following
    1. stop MySQL
    2. unmount LVM snapshot
    3. release LVM snapshot
    4. restart MySQL
The scripts work great from the command line, and cause no problems no matter how quickly we run them together. But it seems that setting the pre/post commands in Backup Exec cause problems. RALUS properly issued the pre-command, but the post-command fails. This is because the LVM snapshot does not release properly. It will not release properly until we shut down the VRTSralus service...after doing this we are able to use the post-command script via command line to properly release the LVM snapshot.

What seems to be happening is that possibly the RALUS daemon is somehow locking a session that ran the script, and not allowing the scripts to properly release the LVM snapshot. I'm not sure how to track this further, as I don't see any logging from RALUS on the client machine.

Is there anything else I can do to try and troubleshoot this, or is there any past problems with RALUS sort of locking a session?
1 REPLY 1

ConcordConsorti
Level 2

I am having the same problem with about 5 Linux machines, all CentOS 5.2, or RHEL 5.2, 32-bit, on Dell and HP xeon servers (BUExec 12d server on Windows 2003, latest versions). I have been assuming that it was an LVM problem, but following this thread and more tests, it does seem to point to RALUS. I have even moved to making sure the lvm snapshots are readonly.

 

--- file backupexec_pre.sh ---

 #!/bin/sh

/usr/sbin/lvcreate --snapshot -L 1000m -p r -n snap_web /dev/vg_scsi142_2/lv_web
mount -o ro /dev/vg_scsi142_2/snap_web /snapshot/web

----------- END FILE ---------

 

---- file backupexec_post.sh ----

#!/bin/sh

#DEBUG

lsof /snapshot/web > /tmp/lsofweb

 

/bin/umount /dev/vg_scsi142_2/snap_web && \
   /usr/sbin/lvremove -f /dev/vg_scsi142_2/snap_web

---------- END FILE ----------

 

From the command line I can run

# backupexec_pre.sh 

# tar cfz /dev/null /snapshot/web

# backupexec_post.sh

  and it works fine. snap_web gets removed.

 

A simple Backup Exec backup job that runs these 2 scripts, and backs up files modified in the last day, is not able to destroy the snapshot. I need to reboot now to remove the snapshot. After both of these backups (tar and BUE) less than 5% of the 1000m I set aside is used by the snapshot.(/tmp/lsofweb is empty)

 

 

I had tried to run "beremote --log-file-auto &" but I foregrounded it and lost the last half of the logs. However, since beremote was attached to my tty, I saw these message at the end of the backup:

"

File descriptor 5 left open

...

File descriptor 13 left open

  Can't remove open logical volume "snap_web"
"