[pve-devel] [PATCH] zfs: auto import after reboot

Wolfgang Link w.link at proxmox.com
Mon Feb 9 12:24:08 CET 2015


On 02/09/2015 12:07 PM, Dietmar Maurer wrote:
> On 02/03/2015 12:59 PM, Wolfgang Link wrote:
>> @@ -419,6 +419,14 @@ sub volume_snapshot_rollback {
>>     sub activate_storage {
>>       my ($class, $storeid, $scfg, $cache) = @_;
>> +
>> +    my @param = ('-o', 'name', '-H');
>> +
>> +    my $text = zfs_request($class, $scfg, undef, 'zpool_list', @param);
>> +
>> +    if ($text !~ $scfg->{pool}) {
>> +    run_command("zpool import -d /dev/disk/by-id/ -a");
>> +    }
>>       return 1;
>>   }
>
> activate_storage is inherted by ZFSPlugin, so we cannot do that! So 
> please
> overwrite it inside ZFSPlugin.pm.
>
>
ahead in this patch I override it in ZFSPlugin.pm

Is this wrong?




More information about the pve-devel mailing list