Microsoft Virtualization Discussions

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

madden
12,940 Views

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: (:) [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

19 REPLIES 19

beam
12,868 Views

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

PADMANTECH
12,868 Views

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: (:) [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.

beam
12,868 Views

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

PADMANTECH
12,868 Views

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?

PADMANTECH
12,868 Views

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>

joseconde
12,865 Views

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

PADMANTECH
12,865 Views

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

LORDGOLDNEYES00
12,866 Views

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

PADMANTECH
12,867 Views

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

LORDGOLDNEYES00
11,614 Views

This is a windows server - bare metal

Powershell version:

> get-host

Name             : Windows PowerShell ISE Host

Version          : 2.0

InstanceId       : 6a08d31c-a81f-45fd-9f3c-335c787110c0

UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface

CurrentCulture   : en-US

CurrentUICulture : en-US

PrivateData      : Microsoft.PowerShell.Host.ISE.ISEOptions

IsRunspacePushed : False

Runspace         : System.Management.Automation.Runspaces.LocalRunspace

SnapDrive - don't have

Windows host primarty drive - MBR

2nd drive, P:\ - (netapp lun, mbr, Size = 1024GB, Free = 228 GB)

Netapp view -- /vol/lun (size = 1TB, free = 0)

>Get-NaHostDisk -DataONTAP

HostDrivePath = P:\

Disk = 1

Size = 1.0 TB

ControllerPath = host:/vol/Name/Lun

> invoke-nahostvolumespacereclaim P:\

Reclaim volume free space

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

[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 <<<<  P:\

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

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

   ceReclaim

I can run the invoke-nasysstat command but I receive the above error when I try to do the space reclaim.

PADMANTECH
11,614 Views

Hi Austin,

Thanks for the info. I've not run the "invoke-nahostvolumespacereclaim" cmdlet from a 2003 box but see from an older release of Netapp Powershell Toolkit 1.6 that it supports Server 2003 Data ONTAP PowerShell Toolkit 1.6 - NetApp Community.

There was a lot of work done to the "invoke-nahostvolumespacereclaim" cmdlet in the Netapp powershell toolkit version 1.7 release to support CSV LUN's and with this version I can not see any mention of support for Server 2003.

You can get your NetApp Powershell Toolkit version by running:

>Get-NaToolkitVersion

If your version is 1.7 or higher I would try to revert it to 1.6 and see what happens.

Also, is there any reason for not installing SnapDrive? It's a free tool i'm pretty sure and add's a lot of benefits for managing your LUN's on all Windows servers but i'd say especially Server 2003. I'm pretty sure it does not require downtime to install unless it requires some MS Patches to be installed but check the Install Guide.

-Jason

LORDGOLDNEYES00
11,614 Views

I am using version 2 of the toolkit, I haven't tried 1.6 but it sounds like the error will be the same.  I am installing snapdrive but it involves 3 hotfixes, a restart and an install on each 2003 server.  This is a lot more work and hard to do in a production environment.

joseconde
11,611 Views

Tried toolkit v1.6, same error.  Unfortunately, I do not have the luxury of installing executables on

production servers without a lot of red tape and was hoping that this cmdlet would work

under Server 2003.  Bummer - would have been real handy if it worked...

LORDGOLDNEYES00
11,611 Views

Do you have a link to the 1.6 install?

joseconde
11,611 Views

You'd think NetApp would make it easy to find but I had no such luck.

Fortunately, I had a copy of it already saved off on my local hard drive.

beam
10,062 Views

Quick update:  the issue you are running into with Windows Server 2003 is caused by a WMI query that references a column that does not exist in Server 2003.  This causes the cmdlet to be unable to retrieve the disk model, which in turn leads to the "Target volume is not a LUN hosted by Data ONTAP" error.  Look for a fix in a future release of the Toolkit.

LORDGOLDNEYES00
10,062 Views

Thank you for that information.  Does snapdrive have the same issue?

ChanceBingen
10,062 Views

SnapDrive should work.

r_paauw1000
10,061 Views

Is your LUN connected as a mount point? If so, you need to provide the path to the mount point, instead of just the driveletter.

Public