Community

Subscribe
Highlighted

Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Hi,

I tried to reclaim space on a NetApp LUN and get:

PS C:\Users\administrator.NLTESTLAB> Invoke-NaHostVolumeSpaceReclaim -path W:

 

Reclaim volume free space

Are you sure you want to reclaim free space on volume W:\?

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y

Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

At line:1 char:32

+ Invoke-NaHostVolumeSpaceReclaim <<<<  -path W:\

    + CategoryInfo          : InvalidOperation: (Smiley Happy [Invoke-NaHostVolumeSpaceReclaim], ArgumentException

    + FullyQualifiedErrorId : QuickReclaimVolume failed,DataONTAP.PowerShell.SDK.Cmdlets.Windows.InvokeNaHostVolumeSpaceReclaim

I verified the drive letter is indeed a NetApp LUN:

PS C:\Users\administrator.NLTESTLAB> Get-NaHostDisk -DataOntap

 

HostDrivePath                  Disk       Size ControllerPath

-------------                  ----       ---- --------------

V:\                               1   100.0 GB caffeine:/vol/sdt_win_real2/v_drive

E:\                               2    10.0 GB caffeine:/vol/windows_lun_vol/windows_lun

F:\                               3    11.0 GB caffeine:/vol/win2k8_lun_vol/win2k8_lun

W:\                               4    50.0 GB sdt-fas270-top:/vol/sdt_win_real2/w_drive

I tried a reclaim on another LUN (on the caffeine controller above which runs 8.0) and it worked fine.  The failure occurs on a FAS270 controller running 7.3.6P5.

Any tips to troubleshoot?

Thanks,

Chris

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Hi Chris,

Try checking the disk model in WMI: [wmi](Get-NaHostDisk -Disk 4).DiskWmiPath

It should look something like this:

Partitions : 1

DeviceID   : \\.\PHYSICALDRIVE4

Model      : NETAPP LUN SCSI Disk Device

Size       : 2198888778240

Caption    : NETAPP LUN SCSI Disk Device

Thanks!

Steven

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Hi Beam,

Chris was kind enough to post this problem on my behalf. I tried your suggestion but getting the below error:

PS H:\> (Get-NaHostDisk -Disk 4).DiskWmiPath

Get-NaHostDisk : Non-negative number required.

Parameter name: byteCount

At line:1 char:16

+ (Get-NaHostDisk <<<<  -Disk 4).DiskWmiPath

    + CategoryInfo          : NotSpecified: (Smiley Happy [Get-NaHostDisk], ArgumentOutOfRangeException

    + FullyQualifiedErrorId : System.ArgumentOutOfRangeException,DataONTAP.PowerShell.SDK.Cmdlets.Windows.GetHostDisk


Here is my Diskpart from the ost machine. Disk 3 to 7 are NetApp LUN's

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt

  --------  -------------  -------  -------  ---  ---

  Disk 0    Online           30 GB      0 B

  Disk 1    Online          420 GB      0 B        *

  Disk 2    Online           40 GB    15 MB        *

  Disk 3    Online          430 GB      0 B        *

  Disk 4    Online          410 GB      0 B        *

  Disk 5    Online          470 GB      0 B        *

  Disk 6    Online          490 GB      0 B        *

  Disk 7    Online          100 GB      0 B        *

Any suggestions in troubleshooting are most welcome.

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Take a look at the disk in WMI (you can do this without Get-NaHostDisk):

PS C:\> [WMI]'\\.\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"'

Partitions : 1

DeviceID   : \\.\PHYSICALDRIVE2

Model      : NETAPP LUN SCSI Disk Device

Size       : 2198888778240

Caption    : NETAPP LUN SCSI Disk Device

The model and caption should give us some clues.  If they do not look different than the one above, the full listing of the WMI object may tell us something: [WMI]'\\.\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"' | fl *

-Steven

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Hi Beam,

Thanks so much for looking into this. I know it seems like a small problem but could make a big difference. Below is the output:

PS H:\> [WMI]'\\.\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"'


Partitions : 2
DeviceID   : \\.\PHYSICALDRIVE4
Model      : NETAPP LUN SCSI Disk Device
Size       : 332877081600
Caption    : NETAPP LUN SCSI Disk Device

PS H:\> [WMI]'\\.\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"' | fl *


ConfigManagerErrorCode      : 0
LastErrorCode               :
NeedsCleaning               :
Status                      : OK
DeviceID                    : \\.\PHYSICALDRIVE4
StatusInfo                  :
Partitions                  : 2
BytesPerSector              : 512
ConfigManagerUserConfig     : False
DefaultBlockSize            :
Index                       : 4
InstallDate                 :
InterfaceType               : SCSI
MaxBlockSize                :
MaxMediaSize                :
MinBlockSize                :
NumberOfMediaSupported      :
SectorsPerTrack             : 63
Size                        : 332877081600
TotalCylinders              : 40470
TotalHeads                  : 255
TotalSectors                : 650150550
TotalTracks                 : 10319850
TracksPerCylinder           : 255
__GENUS                     : 2
__CLASS                     : Win32_DiskDrive
__SUPERCLASS                : CIM_DiskDrive
__DYNASTY                   : CIM_ManagedSystemElement
__RELPATH                   : Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
__PROPERTY_COUNT            : 51
__DERIVATION                : {CIM_DiskDrive, CIM_MediaAccessDevice, CIM_LogicalDevice, CIM_LogicalElement...}
__SERVER                    : MY_SERVER_NAME
__NAMESPACE                 : root\cimv2
__PATH                      : \\MY_SERVER_NAME\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
Availability                :
Capabilities                : {3, 4}
CapabilityDescriptions      : {Random Access, Supports Writing}
Caption                     : NETAPP LUN SCSI Disk Device
CompressionMethod           :
CreationClassName           : Win32_DiskDrive
Description                 : Disk drive
ErrorCleared                :
ErrorDescription            :
ErrorMethodology            :
FirmwareRevision            : 7350
Manufacturer                : (Standard disk drives)
MediaLoaded                 : True
MediaType                   : Fixed hard disk media
Model                       : NETAPP LUN SCSI Disk Device
Name                        : \\.\PHYSICALDRIVE4
PNPDeviceID                 : SCSI\DISK&VEN_NETAPP&PROD_LUN\4&3B5019BE&0&000400
PowerManagementCapabilities :
PowerManagementSupported    :
SCSIBus                     : 0
SCSILogicalUnit             : 0
SCSIPort                    : 2
SCSITargetId                : 4
SerialNumber                : W-CK/ZdpwCtw
Signature                   :
SystemCreationClassName     : Win32_ComputerSystem
SystemName                  : MY_SERVER_NAME
Scope                       : System.Management.ManagementScope
Path                        : \\MY_SERVER_NAME\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE4"
Options                     : System.Management.ObjectGetOptions
ClassPath                   : \\MY_SERVER_NAME\root\cimv2:Win32_DiskDrive
Properties                  : {Availability, BytesPerSector, Capabilities, CapabilityDescriptions...}
SystemProperties            : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers                  : {dynamic, Locale, provider, UUID}
Site                        :
Container                   :

PS H:\>

The only weird thing I can see is that there are two partitions on the disk. I checked this with the disk part tool:

DISKPART> list PARTITION

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 3    Unknown            256 KB    17 KB
  Partition 1    Reserved           127 MB   273 KB
  Partition 2    Primary            309 GB   129 MB

I'm not sure what Partition 3 is for?

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Here is some more info on the Partitions for this Disk:

DISKPART> select disk 4

Disk 4 is now the selected disk.

DISKPART> list PARTITION

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 3    Unknown            256 KB    17 KB
  Partition 1    Reserved           127 MB   273 KB
  Partition 2    Primary            309 GB   129 MB

DISKPART> select Partition 1

Partition 1 is now the selected partition.

DISKPART> DETAIL PARTITION

Partition 1
Type    : e3c9e316-0b5c-4db8-817d-f92df00215ae
Hidden  : Yes
Required: No
Attrib  : 0000000000000000
Offset in Bytes: 279552

There is no volume associated with this partition.

DISKPART> select Partition 2

Partition 2 is now the selected partition.

DISKPART> DETAIL PARTITION

Partition 2
Type    : ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
Hidden  : No
Required: No
Attrib  : 0000000000000000
Offset in Bytes: 135266304

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 6     W   WEST         NTFS   Partition    309 GB  Healthy

DISKPART> select Partition 3

Partition 3 is now the selected partition.

DISKPART> DETAIL PARTITION

Partition 3
Type    : caddebf1-4400-4de8-b103-12117dcf3ccf
Hidden  : Yes
Required: No
Attrib  : 0000000000000000
Offset in Bytes: 17408

There is no volume associated with this partition.

DISKPART>

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Any resolution? 

I've been running into this issue ever since the space reclaim cmdlet was available and

would like to see the cmdlet actually work. 

Note, I am running this on Windows Server 2003 Standard, SP2.  The windows_gpt

LUNs (7.12TB and 15.9TB) are on a FAS2040 running OnTap 8.0.2. 

Data ONTAP PowerShell Toolkit 2.3.

JConde

Message was edited by: Jose Conde

Running Windows Server 2003 Standard, SP2 on a physical server (HP ProLiant DL360 G6 Server, 4GB RAM).

FAS2040, OnTap 8.0.2.

Two "windows_gpt" LUNs,  7.12TB (2.12TB free under Windows) and 15.9TB (14.3TB free under Windows)

Data OnTap Toolkit 2.3

SnapDrive v6.4.1 space reclaim does, oddly enough, work

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Hi JConde,

No resolution just yet but have support ticket logged and currently working with them to find the problem. What version a Data ONTAP is your filers running? 7.3.x?

-Jason

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

I am also having this issue. I am using Windows 2003 with FAS3240 filers version 8.0.2.

Re: Failure: Invoke-NaHostVolumeSpaceReclaim : Target volume is not a LUN hosted by Data ONTAP.

Hi Austin,

Is the windows server a VM?

VMWare ESXi Host Version?

VMWare vCentre Version?

VMware RDM or VM iSCSI?

NetApp Powershell toolkit version?

SnapDrive Version?

Have you tried SnapDrive Reclaim?

Type of Partiton on Windows Host? GPT or MBR? How many? (Diskpart can help get this info)

Windows Space used = ??

LUN Space used = ??

You can also do a test while you are doing the Space reclaim to make sure it is accessing the LUN by using the below powershell cmdlet:

PS H:\> Invoke-NaSysstat -Lun /vol/VOLUME_NAME/qtree_NAME/LUN

    Read  Written  RdOps  WrOps TotOps  TotLat LunPath

    ----  -------  -----  ----- ------  ------ -------

# Before Space Reclaim starts...

       0        0      0      0      1     0.0 /vol/VOLUME_NAME/qtree_NAME/LUN

       0        0      0      0      0     0.0 /vol/VOLUME_NAME/qtree_NAME/LUN

    5 KB        0      1      0      3     0.0 /vol/VOLUME_NAME/qtree_NAME/LUN

       0        0      0      0      1     2.2 /vol/VOLUME_NAME/qtree_NAME/LUN

       0        0      0      0      0     0.0 /vol/VOLUME_NAME/qtree_NAME/LUN

# After Space Reclaim starts...

  273 B    219 KB      0      7      8    31.2 /vol/VOLUME_NAME/qtree_NAME/LUN

    1 MB     5 MB      2    132    136     7.5 /vol/VOLUME_NAME/qtree_NAME/LUN

    8 MB     8 MB      9      9     19    55.4 /vol/VOLUME_NAME/qtree_NAME/LUN

    8 MB     8 MB      8      8     15    62.4 /vol/VOLUME_NAME/qtree_NAME/LUN

   11 MB    11 MB     11     12     23    36.9 /vol/VOLUME_NAME/qtree_NAME/LUN

-Jason