NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

ONTAP Discussions

PSTK volume move from volume to aggr encryption

djwarner2929
3,309 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
3,285 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
3,286 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
3,271 Views

Perfect!  Thank you very much Donny.  That worked!

 

Dave

Public