VDS_LUN_PROP
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| id | GUID | 16 | +0 | +0 | LUN オブジェクトの GUID です。 |
| ullSize | ULONGLONG | 8 | +16 | +16 | LUN のサイズ (バイト単位) です。 |
| pwszFriendlyName | LPWSTR | 8/4 | +24 | +24 | LUN の名前です。0 で終わる、人間が読める文字列です。 |
| pwszIdentification | LPWSTR | 8/4 | +32 | +28 | LUN の一意な識別子です。0 で終わる、人間が読める文字列です。 |
| pwszUnmaskingList | LPWSTR | 8/4 | +40 | +32 | LUN へのアクセスを許可するネットワーク上のコンピューターを指定するリストです。セミコロン区切りで、 NULL で終わる、人間が読める文字列です。 値が "*" の場合、ネットワーク上のすべてのコンピューターに LUN への アクセスが許可されます。値が "" の場合、どのコンピューターにも LUN へのアクセスは許可されません。 メモ 実際には、値が "*" の場合、ほとんどのハードウェアプロバイダーはローカルコンピューター上のポートとイニシエーターにのみ LUN へのアクセスを許可します。
ファイバーチャネルネットワークおよびシリアル接続 SCSI (SAS) ネットワークの場合、各エントリは LUN のマスクが解除された各ポートの 64 ビット World-Wide Name (WWN) であり、 最上位バイトを先頭とする 16 進文字列 (16 文字) として書式設定されます。たとえば、 WWN アドレス 01:23:45:67:89:AB:CD:EF は "0123456789ABCDEF" と表現されます。詳細については、Fibre Channel および SAS の T10 仕様を参照してください。 iSCSI ネットワークの場合、各エントリは LUN のマスクが解除された各イニシエーターの iSCSI 修飾名 (IQN) です。特定のイニシエーターに対してマスクが解除された LUN は、そのイニシエーターに関連付けられているとみなされます。 メモ マスク解除リストには、同じ WWN または IQN が複数回含まれることがあります。重複は無視されます。
|
| ulFlags | DWORD | 4 | +48 | +36 | VDS_LUN_FLAG で列挙される LUN フラグです。 |
| type | VDS_LUN_TYPE | 4 | +52 | +40 | VDS_LUN_TYPE で列挙される LUN の種類です。 |
| status | VDS_LUN_STATUS | 4 | +56 | +44 | |
| health | VDS_HEALTH | 4 | +60 | +48 | LUN の正常性状態を指定する VDS_HEALTH 列挙型の値です。このメンバーの有効な値は次のとおりです。 VDS_H_UNKNOWN (0)VDS_H_HEALTHY (1)VDS_H_REBUILDING (2)VDS_H_FAILING (4)VDS_H_FAILING_REDUNDANCY (5)VDS_H_FAILED_REDUNDANCY (6)VDS_H_FAILED_REDUNDANCY_FAILING (7)VDS_H_FAILED (8) |
| TransitionState | VDS_TRANSITION_STATE | 4 | +64 | +52 | |
| sRebuildPriority | SHORT | 2 | +68 | +56 | LUN オブジェクトの再構築の優先度です。0 (最低の優先度) から 15 (最高の優先度) までの値です。 - health.VDS_H_FAILED (8)- health.VDS_H_FAILED_REDUNDANCY (6)- health.VDS_H_FAILED_REDUNDANCY_FAILING (7)- health.VDS_H_FAILING (4)- health.VDS_H_FAILING_REDUNDANCY (5)- health.VDS_H_HEALTHY (1)- health.VDS_H_REBUILDING (2)- health.VDS_H_UNKNOWN (0) |
公式ドキュメント
[Windows 8 および Windows Server 2012 以降、Virtual Disk Service COM インターフェイスは Windows Storage Management API に置き換えられています。]
LUN オブジェクトのプロパティを定義します。
解説(Remarks)
IVdsLun::GetProperties メソッドは、 LUN オブジェクトのプロパティを報告するためにこの構造体を返します。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// VDS_LUN_PROP (x64 72 / x86 64 バイト)
typedef struct VDS_LUN_PROP {
GUID id;
ULONGLONG ullSize;
LPWSTR pwszFriendlyName;
LPWSTR pwszIdentification;
LPWSTR pwszUnmaskingList;
DWORD ulFlags;
VDS_LUN_TYPE type;
VDS_LUN_STATUS status;
VDS_HEALTH health;
VDS_TRANSITION_STATE TransitionState;
SHORT sRebuildPriority;
} VDS_LUN_PROP;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VDS_LUN_PROP
{
public Guid id;
public ulong ullSize;
public IntPtr pwszFriendlyName;
public IntPtr pwszIdentification;
public IntPtr pwszUnmaskingList;
public uint ulFlags;
public int type;
public int status;
public int health;
public int TransitionState;
public short sRebuildPriority;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VDS_LUN_PROP
Public id As Guid
Public ullSize As ULong
Public pwszFriendlyName As IntPtr
Public pwszIdentification As IntPtr
Public pwszUnmaskingList As IntPtr
Public ulFlags As UInteger
Public type As Integer
Public status As Integer
Public health As Integer
Public TransitionState As Integer
Public sRebuildPriority As Short
End Structureimport ctypes
from ctypes import wintypes
class VDS_LUN_PROP(ctypes.Structure):
_fields_ = [
("id", GUID),
("ullSize", ctypes.c_ulonglong),
("pwszFriendlyName", ctypes.c_void_p),
("pwszIdentification", ctypes.c_void_p),
("pwszUnmaskingList", ctypes.c_void_p),
("ulFlags", wintypes.DWORD),
("type", ctypes.c_int),
("status", ctypes.c_int),
("health", ctypes.c_int),
("TransitionState", ctypes.c_int),
("sRebuildPriority", ctypes.c_short),
]#[repr(C)]
pub struct VDS_LUN_PROP {
pub id: GUID,
pub ullSize: u64,
pub pwszFriendlyName: *mut core::ffi::c_void,
pub pwszIdentification: *mut core::ffi::c_void,
pub pwszUnmaskingList: *mut core::ffi::c_void,
pub ulFlags: u32,
pub type: i32,
pub status: i32,
pub health: i32,
pub TransitionState: i32,
pub sRebuildPriority: i16,
}import "golang.org/x/sys/windows"
type VDS_LUN_PROP struct {
id windows.GUID
ullSize uint64
pwszFriendlyName uintptr
pwszIdentification uintptr
pwszUnmaskingList uintptr
ulFlags uint32
type int32
status int32
health int32
TransitionState int32
sRebuildPriority int16
}type
VDS_LUN_PROP = record
id: TGUID;
ullSize: UInt64;
pwszFriendlyName: Pointer;
pwszIdentification: Pointer;
pwszUnmaskingList: Pointer;
ulFlags: DWORD;
type: Integer;
status: Integer;
health: Integer;
TransitionState: Integer;
sRebuildPriority: Smallint;
end;const VDS_LUN_PROP = extern struct {
id: GUID,
ullSize: u64,
pwszFriendlyName: ?*anyopaque,
pwszIdentification: ?*anyopaque,
pwszUnmaskingList: ?*anyopaque,
ulFlags: u32,
type: i32,
status: i32,
health: i32,
TransitionState: i32,
sRebuildPriority: i16,
};type
VDS_LUN_PROP {.bycopy.} = object
id: GUID
ullSize: uint64
pwszFriendlyName: pointer
pwszIdentification: pointer
pwszUnmaskingList: pointer
ulFlags: uint32
type: int32
status: int32
health: int32
TransitionState: int32
sRebuildPriority: int16struct VDS_LUN_PROP
{
GUID id;
ulong ullSize;
void* pwszFriendlyName;
void* pwszIdentification;
void* pwszUnmaskingList;
uint ulFlags;
int type;
int status;
int health;
int TransitionState;
short sRebuildPriority;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; VDS_LUN_PROP サイズ: 64 バイト(x86)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; id : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; ullSize : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pwszFriendlyName : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pwszIdentification : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pwszUnmaskingList : LPWSTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ulFlags : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; type : VDS_LUN_TYPE (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; status : VDS_LUN_STATUS (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; health : VDS_HEALTH (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; TransitionState : VDS_TRANSITION_STATE (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; sRebuildPriority : SHORT (+56, 2byte) wpoke st,56,値 / 値 = wpeek(st,56)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VDS_LUN_PROP サイズ: 72 バイト(x64)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; id : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; ullSize : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pwszFriendlyName : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pwszIdentification : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pwszUnmaskingList : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ulFlags : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; type : VDS_LUN_TYPE (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; status : VDS_LUN_STATUS (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; health : VDS_HEALTH (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; TransitionState : VDS_TRANSITION_STATE (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; sRebuildPriority : SHORT (+68, 2byte) wpoke st,68,値 / 値 = wpeek(st,68)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global VDS_LUN_PROP
#field GUID id
#field int64 ullSize
#field intptr pwszFriendlyName
#field intptr pwszIdentification
#field intptr pwszUnmaskingList
#field int ulFlags
#field int type
#field int status
#field int health
#field int TransitionState
#field short sRebuildPriority
#endstruct
stdim st, VDS_LUN_PROP ; NSTRUCT 変数を確保
st->ullSize = 100
mes "ullSize=" + st->ullSize