Hi,
I recently installed LVM snapshot application amlvm-snapshot from
https://github.com/marxarelli/amlvm-snapshot
Having fixed minor problem with the kernel device mapper paths I got it up and
running , substitute ../ with /dev and cleaning unused mount point.
I'm running Ubuntu 10.04.3 LTS with Ubuntu Amanda packages version 2.6.1p1.
Why not include this application in the core Amanda distribution properly ?
--GG
# /usr/lib/amanda/application# diff -c amlvm-snapshot amlvm-snapshot.orig
*** amlvm-snapshot 2012-01-16 08:34:20.138353314 +0100
--- amlvm-snapshot.orig 2012-01-13 14:20:27.188361522 +0100
***************
*** 207,213 ****
# executed with elevated privileges (sudo).
my $real_path = join("", $self->execute(1, "readlink", $path));
chomp($real_path);
- $real_path =~ s@\.\.@/dev@<mailto:s@\.\.@/dev@>;
return ($real_path ne "") ? $real_path : $path;
}
--- 207,212 ----
***************
*** 348,355 ****
sub umount_snapshot {
my $self = shift;
my $device = $self->readlink($self->get_snap_device());
- $device =~ s@\.\.@/dev@<mailto:s@\.\.@/dev@>;
- debug("umount_snapshot $device");
my $mnt = $self->scan_mtab(sub { return $_[1] if ($_[0] eq $device); });
--- 347,352 ----
***************
*** 361,369 ****
}
$self->execute(1, "umount", $mnt);
debug("Un-mounted snapshot device `$device' from `$mnt'.");
- rmdir $mnt;
- debug("Remove snapshot mount point rmdir `$mnt'.");
}
--- 358,365 ----
}
$self->execute(1, "umount", $mnt);
+
debug("Un-mounted snapshot device `$device' from `$mnt'.");
}
/etc/sudoers.d/amanda
%backup ALL=(ALL) NOPASSWD: /sbin/lvcreate, /sbin/lvdisplay, /sbin/lvremove,
/sbin/vgdisplay, /bin/readlink, /bin/mount, /bin/umount
Mount and umount was missing in the Readme file.