PDA

View Full Version : LVM snapshot question



ceejay
November 18th, 2009, 02:46 AM
Hi, I'm new to ZRM for MySQL. I just tried logical backups and they are fine, however I'm not sure why snapshot backup is not working. Below is the output of "mysql-zrm-scheduler --now --backup-set dailyrun"

schedule:INFO: ZRM for MySQL Community Edition - version 2.1.1
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
backup:INFO: ZRM for MySQL Community Edition - version 2.1.1
dailyrun:backup:INFO: START OF BACKUP
dailyrun:backup:INFO: PHASE START: Initialization
dailyrun:backup:INFO: Mail address: root@localhost is ok
dailyrun:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/dailyrun/tmpNZiWH.conf
dailyrun:backup:INFO: {
dailyrun:backup:INFO: verbose=1
dailyrun:backup:INFO: retention-policy=10D
dailyrun:backup:INFO: synchronous-checksum=-1
dailyrun:backup:INFO: all-databases=1
dailyrun:backup:INFO: destination=/var/lib/mysql-zrm
dailyrun:backup:INFO: password=******
dailyrun:backup:INFO: backup-mode=raw
dailyrun:backup:INFO: snapshot-plugin=/usr/share/mysql-zrm/plugins/lvm-snapshot.pl
dailyrun:backup:INFO: compress-plugin=/bin/gzip
dailyrun:backup:INFO: backup-type=quick
dailyrun:backup:INFO: user=backup
dailyrun:backup:INFO: backup-level=0
dailyrun:backup:INFO: quiet=0
dailyrun:backup:INFO: mailto=root@localhost
dailyrun:backup:INFO: snapshot-size=1G
dailyrun:backup:INFO: }
dailyrun:backup:INFO: Getting mysql variables
dailyrun:backup:INFO: mysqladmin --user="backup" --password="*****" variables
dailyrun:backup:INFO: datadir is /var/lib/mysql/
dailyrun:backup:INFO: mysql_version is 5.0.77
dailyrun:backup:WARNING: Binary logging is off.
dailyrun:backup:INFO: InnoDB data file are /var/lib/mysql/ibdata1
dailyrun:backup:INFO: InnoDB log dir is /var/lib/mysql/.
dailyrun:backup:INFO: backup set being used is dailyrun
dailyrun:backup:INFO: backup-set=dailyrun
dailyrun:backup:INFO: backup-date=20091118193813
dailyrun:backup:INFO: mysql-server-os=Linux/Unix
dailyrun:backup:INFO: backup-type=quick
dailyrun:backup:INFO: host=localhost
dailyrun:backup:INFO: backup-date-epoch=1258544293
dailyrun:backup:INFO: retention-policy=10D
dailyrun:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 2.1.1
dailyrun:backup:INFO: mysql-version=5.0.77
dailyrun:backup:INFO: backup-directory=/var/lib/mysql-zrm/dailyrun/20091118193813
dailyrun:backup:INFO: backup-level=0
dailyrun:backup:INFO: backup-mode=raw
dailyrun:backup:INFO: PHASE END: Initialization
dailyrun:backup:INFO: PHASE START: Running pre backup plugin
dailyrun:backup:INFO: Executing pre-backup-plugin
dailyrun:backup:INFO: PHASE END: Running pre backup plugin
dailyrun:backup:INFO: PHASE START: Flushing logs
dailyrun:backup:INFO: Flushing the logs
dailyrun:backup:INFO: mysqladmin --user="backup" --password="*****" flush-logs
dailyrun:backup:INFO: Getting master logname using command mysql --user="backup" --password="*****" -e "show master status"
dailyrun:backup:INFO: PHASE END: Flushing logs
dailyrun:backup:INFO: Getting list of Databases
dailyrun:backup:INFO: mysql --user="backup" --password="*****" -e "show databases;"
dailyrun:backup:INFO: PHASE START: Creating snapshot based backup
dailyrun:backup:INFO: innodb on lvm = 0
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory /var/lib/mysql/. --sname zrmGVhVJ6VnjV 2>/tmp/udpjZ5GB8b
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory /var/lib/mysql --sname zrmtYCp8RpNPc 2>/tmp/udpjZ5GB8b
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//mysql" --sname zrmZXUoQkYMFP 2>/tmp/udpjZ5GB8b
dailyrun:backup:INFO: getting device details using command /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/var/lib/mysql//ocsweb" --sname zrmGDf5RkWl4r 2>/tmp/udpjZ5GB8b
dailyrun:backup:INFO: Locking tables and creating snapshot
dailyrun:backup:INFO: mysql --user="backup" --password="*****" -e "flush tables with read lock; flush logs; show master status;system (/usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action create-snapshot --dev /dev/vg_sys/lv_mysql --size 1G --sname zrmGVhVJ6VnjV --directory /var/lib/mysql-zrm/dailyrun/20091118193813/ZRM_MOUNTS/zrmGVhVJ6VnjV >/tmp/zrmGVhVJ6VnjV.log 2>&1 ); unlock tables;"
dailyrun:backup:INFO: Use of uninitialized value in split at /usr/bin/mysql-zrm-backup line 996.
dailyrun:backup:INFO: Output of command: 'Locking tables and creating snapshot' is {
Logical volume "zrmGVhVJ6VnjV" created
}
dailyrun:backup:INFO: Mounting snapshot
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action mount --dev /dev/vg_sys/zrmGVhVJ6VnjV --directory /var/lib/mysql-zrm/dailyrun/20091118193813/ZRM_MOUNTS/zrmGVhVJ6VnjV --fstype ext3
dailyrun:backup:INFO: innodb-data=/var/lib/mysql/ibdata1;
dailyrun:backup:INFO: innodb-logs=/var/lib/mysql/./ib_logfile*
dailyrun:backup:INFO: raw-databases-snapshot=mysql ocsweb
dailyrun:backup:INFO: PHASE END: Creating snapshot based backup
dailyrun:backup:INFO: PHASE START: Calculating backup size & checksums
dailyrun:backup:INFO: last-backup=/var/lib/mysql-zrm/dailyrun/20091118191325
dailyrun:backup:INFO: backup-size=0.00 MB
dailyrun:backup:INFO: PHASE END: Calculating backup size & checksums
dailyrun:backup:INFO: read-locks-time=00:00:00
dailyrun:backup:INFO: flush-logs-time=00:00:00
dailyrun:backup:INFO: backup-time=00:00:01
dailyrun:backup:INFO: backup-status=Backup succeeded
dailyrun:backup:INFO: Backup succeeded
dailyrun:backup:INFO: PHASE START: Running post backup plugin
dailyrun:backup:INFO: Executing post-backup-plugin
dailyrun:backup:INFO: PHASE END: Running post backup plugin
dailyrun:backup:INFO: PHASE START: Mailing backup report
dailyrun:backup:INFO: mailing file /tmp/Vm9KlMVWRi
dailyrun:backup:INFO: mail command is cat "/tmp/Vm9KlMVWRi"|mail -s "[ZRM for MySQL Report] backup-set dailyrun" root@localhost
dailyrun:backup:INFO: PHASE END: Mailing backup report
dailyrun:backup:INFO: PHASE START: Cleanup
dailyrun:backup:INFO: PHASE END: Cleanup
dailyrun:backup:INFO: END OF BACKUP
/usr/bin/mysql-zrm started successfully

LVM snapshot is still there and mounted. I'm not sure why.

zrmGVhVJ6VnjV vg_sys swi-ao 1.00G lv_mysql 0.02

/dev/mapper/vg_sys-zrmGVhVJ6VnjV
20G 210M 19G 2% /var/lib/mysql-zrm/dailyrun/20091118193813/ZRM_MOUNTS/zrmGVhVJ6VnjV