<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: new-sfvol ignoring -sfconnection parameter in SolidFire and HCI</title>
    <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132408#M6</link>
    <description>&lt;P&gt;This works fine for me with&amp;nbsp;&amp;nbsp;v1.4.0.30 (before I executed the connection and account command following your example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;New-SFVolume -Name 'test2' -Account $account[0] -TotalSize 8000 -GB -MinIOPS 1000 -MaxIOPS 2000 -BurstIOPS 3000 -Enable512e $true -SFConnection $SFConn[0]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But,&lt;/STRONG&gt; I used&amp;nbsp;$SFConn[0], not&amp;nbsp;$SFConn like you. $SFConn still doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the one hand this works (with [0], using v1.4), but on the other it still doesn't seem to work right so I opened issue for v1.4.0.30.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2017 12:43:07 GMT</pubDate>
    <dc:creator>elementx</dc:creator>
    <dc:date>2017-06-30T12:43:07Z</dc:date>
    <item>
      <title>new-sfvol ignoring -sfconnection parameter | Fixed in 1.4!</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131225#M2</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a really perculiar issue with the commandlet &lt;EM&gt;new-sfvolume&lt;/EM&gt; and its SFconnection parameter. In short, it seems to ignoring that parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As part of a much larger script, I&amp;nbsp;have split out the SF authentication and connection handling into a dedicated function, with other&amp;nbsp;assorted functions doing our SF queries &amp;amp; changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When connect-SFcluster is run within a function, the global $SFconnection/s variables are &lt;U&gt;not&lt;/U&gt; set, due to variable scoping rules. This is standard/expected behaviour in powershell, so I capture the returned connection handle and return it for reuse by other commandlets/functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$SFConn = Connect-SFCluster -Credential $creds -Target $array -WarningAction SilentlyContinue -ErrorAction stop
return&amp;nbsp;$SFConn[0]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other commandlets work when I pass them the parameter (-sfconnection $sfconn), but new-sfvolume ignores it, and wholly relies on $global:sfconnection &amp;amp; $global:sfconnections.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below I illustrate that get-sfaccount&amp;nbsp;&amp;amp; get-sfvolume &lt;EM&gt;are&lt;/EM&gt; taking the -sfconnection parameter succesfussly, with my $sfconn connection handle, but new-sfvolume won't (I have xxx'ed out sensitive data)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;C:\Users\jw3admin&amp;gt; get-module -name SolidFire&lt;BR /&gt;&lt;BR /&gt;ModuleType Version Name ExportedCommands &lt;BR /&gt;---------- ------- ---- ---------------- &lt;BR /&gt;Manifest 1.3.1.4 SolidFire {Add-SFDrive, Add-SFInitiatorToVolumeAccessGroup, Add-SFNode, Add-SFSnmpNetwork...} &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C:\Users\jw3admin&amp;gt; $sfconn


Target           : xxxx
Name             : xxxx
Port             : 
VersionApiName   : Fluorine
VersionApiNumber : 9
Node             : False
Uri              : https://xxxx/json-rpc/9.0
RequestCount     : 13
Credential       : System.Management.Automation.PSCredential
Limits           : {"AccountCountMax" = 5000, "AccountNameLengthMax" = 64, "AccountNameLengthMin" = 1, "BulkVolumeJobsPerNodeMax" = 8, "BulkVolumeJobsPerVolumeMax" = 2, "CloneJobsPerVolumeMax" = 2, "ClusterPairsCountMax" = 4, "InitiatorNameLengthMax" = 224, "InitiatorCountMax" = 
                   10000, "InitiatorsPerVolumeAccessGroupCountMax" = 64, "IscsiSessionsFromFibreChannelNodesMax" = 4096, "SecretLengthMax" = 16, "SecretLengthMin" = 12, "SnapshotNameLengthMax" = 64, "SnapshotsPerVolumeMax" = 32, "VolumeAccessGroupCountMax" = 1000, 
                   "VolumeAccessGroupLunMax" = 16383, "VolumeAccessGroupNameLengthMax" = 64, "VolumeAccessGroupNameLengthMin" = 1, "VolumeAccessGroupsPerInitiatorCountMax" = 1, "VolumeAccessGroupsPerVolumeCountMax" = 4, "InitiatorAliasLengthMax" = 224, "VolumeBurstIOPSMax" = 200000, 
                   "VolumeBurstIOPSMin" = 100, "VolumeCountMax" = 6000, "VolumeMaxIOPSMax" = 200000, "VolumeMaxIOPSMin" = 100, "VolumeMinIOPSMax" = 15000, "VolumeMinIOPSMin" = 50, "VolumeNameLengthMax" = 64, "VolumeNameLengthMin" = 1, "VolumeSizeMax" = 8000000491520, "VolumeSizeMin" 
                   = 1000000000, "VolumesPerAccountCountMax" = 2000, "VolumesPerGroupSnapshotMax" = 32, "VolumesPerVolumeAccessGroupCountMax" = 2000}
Timeout          : 
Element          : SolidFire.Element.Api.SolidFireElement


 C:\Users\jw3admin&amp;gt; Get-SFAccount
Get-SFAccount : There are no active connections. Call Connect-SFCluster before attempting any other commands.
At line:1 char:1
+ Get-SFAccount
+ ~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-SFAccount], ConnectionException
    + FullyQualifiedErrorId : SolidFire.Core.Exceptions.ConnectionException,SolidFire.Account.Get.GetSFAccount
 
&lt;FONT color="#FF0000"&gt;&lt;EM&gt;(Fails as expected - there is no default / $global:sfconnection handle, but if I provide one, it works.)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;
 C:\Users\jw3admin&amp;gt; Get-SFAccount -SFConnection $SFConn

AccountID       : 2
Username        : xxxxxx
Status          : active
Volumes         : {2, 7, 8, 17}
InitiatorSecret : xxxxxxxx
TargetSecret    : xxxxxxx
Attributes      : {}

AccountID       : 3
Username        : xxxxxx
Status          : active
Volumes         : {5, 6, 9, 10...}
InitiatorSecret : xxxxxx
TargetSecret    : xxxxx
Attributes      : {}


&lt;FONT color="#FF0000"&gt;&lt;EM&gt;(Works...)&lt;/EM&gt;
&lt;EM&gt;(I'll keep that account variable, and call NEW-sfvolume using the same sfconniction handle. It fails:)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;
 C:\Users\jw3admin&amp;gt; $account = Get-SFAccount -SFConnection $SFConn&lt;BR /&gt;&lt;BR /&gt;

 C:\Users\jw3admin&amp;gt; New-SFVolume -Name 'test2' -Account $account[0] -TotalSize 8000 -GB -MinIOPS 1000 -MaxIOPS 2000 -BurstIOPS 3000 -Enable512e $true -SFConnection $SFConn
New-SFVolume : There are no active connections. Call Connect-SFCluster before attempting any other commands.
At line:1 char:1
+ New-SFVolume -Name 'test2' -Account $account[0] -TotalSize 8000 -GB -MinIOPS 100 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-SFVolume], ConnectionException
    + FullyQualifiedErrorId : SolidFire.Core.Exceptions.ConnectionException,SolidFire.Volume.New.NewSFVolume
 &lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;(But GET-sfvolume works just fine...It's just new-sfvolume exibiting this behaviour)&lt;/FONT&gt;&lt;/EM&gt;

 C:\Users\jw3admin&amp;gt; Get-SFVolume -SFConnection $SFConn


VolumeID           : 2
Name               : xxxx-02
AccountID          : 2
CreateTime         : 2017-02-03T01:47:43Z
Status             : active
Access             : readWrite
Enable512e         : True
Iqn                : iqn.2010-01.com.solidfire:bfxa.xxxx-01.2
ScsiEUIDeviceID    : 6266786100000002f47acc0100000000
ScsiNAADeviceID    : 6f47acc1000000006266786100000002
Qos                : {"MinIOPS" = 15000, "MaxIOPS" = 50000, "BurstIOPS" = 100000, "BurstTime" = 60}
VolumeAccessGroups : {1}
VolumePairs        : {}
DeleteTime         : 
PurgeTime          : 
SliceCount         : 1
TotalSize          : 8000000491520
BlockSize          : 4096
VirtualVolumeID    : 
Attributes         : {}

&amp;lt;snip - many more volumes follow&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can successfully create volumes if I run connect-sfcluster in the global context, which it turn creates the two system variables $sfconnection &amp;amp; $sfconnections which new-sfvolume appears to require.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks to be a bug within new-sfvolume. Could a developer please check this out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the global context and relying on &lt;EM&gt;default&lt;/EM&gt; connection handles are both poor practices so I would really like te get this working properly within functions, so I can better scale our&amp;nbsp;SF automation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 15:03:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131225#M2</guid>
      <dc:creator>Jonathan_Wheeler</dc:creator>
      <dc:date>2025-06-04T15:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: new-sfvol ignoring -sfconnection parameter</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131231#M3</link>
      <description>&lt;P&gt;Hi Johnathan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for raising the issue, i'd agree this looks like a bug. I've reached out to the solidfire team to look into it for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 04:11:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131231#M3</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-05-22T04:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: new-sfvol ignoring -sfconnection parameter</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131353#M4</link>
      <description>&lt;P&gt;This appears to be a bug which will be resolved in v1.4 due out in June.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 02:38:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131353#M4</guid>
      <dc:creator>Sergey_O_NetApp</dc:creator>
      <dc:date>2017-05-26T02:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: new-sfvol ignoring -sfconnection parameter</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131388#M5</link>
      <description>&lt;P&gt;Perfect - thanks all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll&amp;nbsp;edit my post to report 'fixed' after the new version is released and I have&amp;nbsp;confirmed the fix.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Jonathan&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2017 20:39:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/131388#M5</guid>
      <dc:creator>Jonathan_Wheeler</dc:creator>
      <dc:date>2017-05-28T20:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: new-sfvol ignoring -sfconnection parameter</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132408#M6</link>
      <description>&lt;P&gt;This works fine for me with&amp;nbsp;&amp;nbsp;v1.4.0.30 (before I executed the connection and account command following your example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;New-SFVolume -Name 'test2' -Account $account[0] -TotalSize 8000 -GB -MinIOPS 1000 -MaxIOPS 2000 -BurstIOPS 3000 -Enable512e $true -SFConnection $SFConn[0]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But,&lt;/STRONG&gt; I used&amp;nbsp;$SFConn[0], not&amp;nbsp;$SFConn like you. $SFConn still doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the one hand this works (with [0], using v1.4), but on the other it still doesn't seem to work right so I opened issue for v1.4.0.30.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 12:43:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132408#M6</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2017-06-30T12:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: new-sfvol ignoring -sfconnection parameter | FIXED</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132451#M7</link>
      <description>&lt;P&gt;Yep, I agree. The 1.4.0.98 toolkit has fixed this bug - thank you to those that&amp;nbsp;made this happen. Did you say you're on 1.4.0.20? Was that a pre-release build?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under 1.3 at least,&amp;nbsp;connect-sfCluster commandlet actually returned an&amp;nbsp;&lt;EM&gt;array, &lt;/EM&gt;not just the single object you expect.&lt;/P&gt;&lt;P&gt;The first member was the expected connection handle object, the second was a way cool ASCII drawing, and I think the third was a message confirming connection. Perhaps your 1.4 is still the same - my connection wrapper was taking the first member and dropping the rest, returning the $sfconn I expected &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;1.4.0.98's connect-sfcluster seems to just return the connection handle now, which is good - that's what most people would expect I imagine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 09:01:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132451#M7</guid>
      <dc:creator>Jonathan_Wheeler</dc:creator>
      <dc:date>2017-07-03T09:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: new-sfvol ignoring -sfconnection parameter | FIXED</title>
      <link>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132453#M8</link>
      <description>&lt;P&gt;Yes I had a pre-release (RC or beta, I can't remember now) build. (I now installed the official GA release, thanks for reminder).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still find it confusing that return $SFConn[0] and return $SFConn give identical output, so I created a new issue at &lt;A href="https://github.com/solidfire/PowerShell/issues/24" target="_blank"&gt;https://github.com/solidfire/PowerShell/issues/24&lt;/A&gt;. We'll see what they say when they return to office after July 4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit (Aug 17, 2017): it's a bug and &lt;A href="https://github.com/solidfire/PowerShell/issues/24#issuecomment-321009945" target="_blank"&gt;will be fixed&lt;/A&gt; in next release&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 15:14:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/SolidFire-and-HCI/new-sfvol-ignoring-sfconnection-parameter-Fixed-in-1-4/m-p/132453#M8</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2017-08-17T15:14:18Z</dc:date>
    </item>
  </channel>
</rss>

