Technical

VBLK - Technical

Previous Next

Introduction

The VBLKs are the workhorse of the database. Each Disk Group, Disk, Volume, Partition and Component is represented by a VBLK. The elements' relationships are shown in the Database Overview.

Each VBLK is 128 bytes long and has a standard 16 byte header. Sometimes the VBLK isn't large enough to store all the information, so two must be used (Extended VBLKs).

A table size of P implies the field is prefixed by a one byte length marker. Unless a string is listed as NULL terminated, it isn't.

Standard VBLK Header

Every VBLK has a standard 16 byte header, containing accounting information.

Offset Size Description
0x00 4 "VBLK" Magic Number
0x04 4 Sequence Number
0x08 4 Group Number
0x0C 2 Record Number (x of y)
0x0E 2 Number of Records

Notes

The Sequence Numbers start at 4. 0 - 3 are effectively the VMDB Header block.

The Group Number is never zero.

The Record Type can be 0x32 (Component), 0x33 (Partition), 0x34 (Disk), 0x35 (Disk Group) or 0x51 (Volume).

Extended VBLKs

The number of VBLKs is shown in "Number of Records" and "Record Number" is a zero-based index. To keep track of the extended VBLKs, each set is given a unique "Group Number".

N.B. Extended VBLKs may not be located contiguously in the VMDB.

Update Status

To prevent data loss during updates, and changes to the VBLKs are logged. In the event of a power failure, the database can be rolled back to a consistant state. The table below shows what each VBLK Update Status means.

Flags Description
0x00 VBLK is in a consistant state
0x01 VBLK is about to be deleted, but is still active
0x02 VBLK has just been created, but it is not yet active)

Volume (0x51)

Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name
..0x18 P Volume Type (b)
..0x18 1 Zero
..0x19 14 Volume State (string, null padded) (c)
..0x27 1 Volume Type? (3 Normal, 4 RAID)
..0x28 1 Don't know (always 1)
..0x29 1 Volume Number (d)
..0x2A 3 Zeros
..0x2D 1 Flags? (0x11 Normal, 0x13 RAID, 0x15 ?, 0x17 ?)
..0x2E P Number of Children
..0x2E 8 Log Commit Id
..0x36 8
Id? or 0x00
..0x3E P Size
..0x3E 4 Zeros
..0x42 1 Partition Type, e.g. 7 = NTFS
..0x43 16 Volume Id (GUID, ???)
..0x53 P
Id1?
..0x53 P
Id2?
..0x53 P
Size (if children?)
..0x53 P
Drive Hint (string)

The flags denote the presence of an optional field

N.B. Id1 and Id2 are mutually exclusive.

N.B. The optional fields will always be in the order: Id, Size, Drive Hint

Flags Description
0x08 Id1?
0x20 Id2?
0x80 Size
0x02 Drive Hint

(a) Revision 5 of VBLK type 1
(b) Volume Type: "gen" or "raid5"
(c) Volume State: "ACTIVE"
(d) Starts at 5 and unused numbers are reused

Component (0x32)

Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name (string)
..0x18 P Volume State (b)
..0x18 1 Component type (c)
..0x19 4 Zeros
..0x1D P Number of children
..0x1D 8 Log Commit Id
..0x25 8 Zeros
..0x2D P Parent Id (A Volume)
..0x2D 1 Zero
..0x2E P
Stripe Size (in sectors)
..0x2E P
Number of Columns

The flags denote the presence of an optional field

Flags Description
0x10 Both optional fields

(a) Revision 3 of VBLK type 2
(b) Component type: 1 Stripe, 2 Basic or Spanned, 3 RAID
(c) Volume State: "ACTIVE"

Partition (0x33)

Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name (string)
..0x18 4 Zeros
..0x1C 8 Log Commit Id
..0x24 8 Start
..0x2C 8 Volume Offset
..0x34 P Size
..0x34 P Parent's Object Id (Component)
..0x34 P Disk's Object Id
..0x34 P
Component part index

The flags denote the presence of an optional field

Flags Description
0x08 Component part index

(a) Revision 3 of VBLK type 3

Disk (0x34)

Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name (string)
..0x18 P Disk Id (GUID, string)
..0x18 P Alternate Name
..0x18 4 Zeros
..0x1D 8 Log Commit Id

N.B. This VBLK type doesn't have any flags

(a) Revision 3 of VBLK type 4

Disk (0x44)

Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name (string)
..0x18 16 Disk Id (GUID, binary)
..0x28 16 Disk Id (GUID, binary)
..0x38 3 Zeros
..0x3B 2
Id?
..0x3D 8 Log Commit Id

N.B. This VBLK type doesn't have any flags

(a) Revision 4 of VBLK type 4

Disk Group (0x35)

disk group name limited to 28 chars
Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name (string)
..0x18 P Disk Group Id (GUID, string)
..0x18 4 Zeros
..0x1C 8 Log Commit Id
..0x24 P
0xFFFFFFFF
..0x24 P
0xFFFFFFFF

The flags denote the presence of an optional field

Flags Description
0x08 Both optional fields (probably)

(a) Revision 3 of VBLK type 5

Disk Group (0x45)

Offset Size Description
0x00 16 Standard VBLK Header
0x10 2 Update Status
0x12 2 Record type and flags (a)
0x14 4 Data length
0x18 P Object Id
..0x18 P Name (string)
..0x18 16 Disk Group Id (GUID, binary)
..0x28 16 Disk Set Id (GUID, binary)
..0x38 4 Zeros
..0x3C 8 Log Commit Id
..0x44 P
0xFFFFFFFF
..0x44 P
0xFFFFFFFF or 0x00

The flags denote the presence of an optional field

Flags Description
0x08 Both optional fields (probably)

(a) Revision 4 of VBLK type 5


Copyright © 2002, $Date: 2002/06/20 14:40:21 $ O L H C