← Back to team overview

mylvmbackup-discuss team mailing list archive

Re: suggested new mode: snapshot only

 

oops, I forgot to handle the case where the VG name contains "-".  quick
patch relative to the preceding one:

--- modules/mysql/files/mylvmbackup     (revision 10575)
+++ modules/mysql/files/mylvmbackup     (working copy)
@@ -170,9 +170,10 @@
 {
   $snapshot_created = -e "/dev/$vgname/$backuplv";
   my $tempdir;
-  my $mapper_name = $backuplv;
-  $mapper_name =~ s/-/--/g;
-  $mapper_name = "mapper/$vgname-$mapper_name";
+  my $mapper_name = "$vgname/$backuplv";
+  $mapper_name =~ s:-:--:g;
+  $mapper_name =~ s:/:-:g;
+  $mapper_name = "mapper/$mapper_name";
   if (open(my $mountfd, "$mount|")) {
     while (<$mountfd>) {
       if (m:^/dev/($vgname/$backuplv|$mapper_name)\s:) {

-- 
Kjetil T. Homme
Redpill Linpro AS - Changing the game




References