ONTAP Discussions

PSTK volume move from volume to aggr encryption

djwarner2929
2,273 Views

I have an aggregate that I want to retire.  Volumes have volume based encryption.  I'm trying to migrate volumes to other aggregates with aggr level encryption.  but it appears the start-ncvolmove cmdlet doesn't have an option to use aggregate encryption.  I'm using the latest PSTK 9.7.  anyone else found a way to do this?

 

Thanks

 

Dave

1 ACCEPTED SOLUTION

donny_lang
2,249 Views

It doesn't look like the Start-NcVolMove cmdlet itself supports the necessary aggregate encryption parameter (-encrypt-with-aggr-key), unfortunately. However, the API that the cmdlet calls - volume-move-start - does. You can use the "Invoke-NcSystemApi" cmdlet to make the API call directly to work around the gap. Something like this might work:

 

$SourceVol = <your volume>
$DestAggr = <your destination aggregate>
$Vserver = <Source Vserver> 

$Request = @"

   <volume-move-start>
    <dest-aggr>$DestAggr</dest-aggr>
    <encrypt-with-aggr-key>$true</encrypt-with-aggr-key>
    <source-volume>$SourceVol</source-volume>
    <vserver>$Vserver</vserver>
  </volume-move-start>

"@

Invoke-NcSystemApi -Request $Request

 

I don't have a system with NAE enabled to test this on, so I can't fully validate that it will work, but it should. 

 

Donny 

View solution in original post

2 REPLIES 2

donny_lang
2,250 Views

It doesn't look like the Start-NcVolMove cmdlet itself supports the necessary aggregate encryption parameter (-encrypt-with-aggr-key), unfortunately. However, the API that the cmdlet calls - volume-move-start - does. You can use the "Invoke-NcSystemApi" cmdlet to make the API call directly to work around the gap. Something like this might work:

 

$SourceVol = <your volume>
$DestAggr = <your destination aggregate>
$Vserver = <Source Vserver> 

$Request = @"

   <volume-move-start>
    <dest-aggr>$DestAggr</dest-aggr>
    <encrypt-with-aggr-key>$true</encrypt-with-aggr-key>
    <source-volume>$SourceVol</source-volume>
    <vserver>$Vserver</vserver>
  </volume-move-start>

"@

Invoke-NcSystemApi -Request $Request

 

I don't have a system with NAE enabled to test this on, so I can't fully validate that it will work, but it should. 

 

Donny 

djwarner2929
2,235 Views

Perfect!  Thank you very much Donny.  That worked!

 

Dave

Public