34
计计计计•计计计计计计计 Lecture 13 storage management xlanchen@05/20/2005

Lecture 13 storage management xlanchen@05/20/2005

Embed Size (px)

Citation preview

Page 1: Lecture 13 storage management xlanchen@05/20/2005

计算机系•信息处理实验室

Lecture 13 storage management

xlanchen@05/20/2005

Page 2: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 2计算机系

信息处理实验室

Contents

The Evolution of Windows 2000 Storage

Partitioning

Storage Drivers

Multi-partition Volume Management

The Volume Namespace

Page 3: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 3计算机系

信息处理实验室

Some terms

Disks SectorsPartitions Simple volumesMultipartition volumes

Page 4: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 4计算机系

信息处理实验室

The Evolution of Windows 2000 Storage

MS-DOS

multiple partitions, logical disks

MSDOS could format each partition with a different file system type (FAT12 or FAT16) and assign each partition a different drive letter

Page 5: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 5计算机系

信息处理实验室

Windows NT disk spanning and fault tolerance volumes drawbacks

most disk-configuration changes require a reboot before taking effect the Windows NT 4 registry stores multipartition disk-configuration information for MS-DOS-style partitions an upper limit on the number of possible local and remote volumes

Page 6: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 6计算机系

信息处理实验室

Partitioning

Windows 2000 manages all disks as basic disks unless you manually create dynamic disks or convert existing basic disks (with enough free space) to dynamic disks

Basic disks Disks that rely on the MS-DOS-style partitioning scheme

Dynamic disks support multipartition volumes

Page 7: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 7计算机系

信息处理实验室

Basic Partitioning

System volume For boot files, including the boot loader (Ntldr) and Ntdetect

Boot volume For operating system files such as Ntoskrnl.exe, the core kernel file

Page 8: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 8计算机系

信息处理实验室

MBR

Master boot record (MBR)

MBR code

Partition table

Primary partitions

Extended partition

Active partition

Page 9: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 9计算机系

信息处理实验室

Page 10: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 10计算机系

信息处理实验室

Dynamic Partitioning

Logical Disk Manager (LDM) subsystem LDM maintains one unified database that stores partitioning information for all the dynamic disks on a system—including multipartition-volume configuration

Page 11: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 11计算机系

信息处理实验室

Internal dynamic disk organization

Page 12: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 12计算机系

信息处理实验室

LDM database layout

Page 13: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 13计算机系

信息处理实验室

database table database entry

partition, disk, component, and volume

Page 14: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 14计算机系

信息处理实验室

Storage Drivers

multi(0)disk(0)rdisk(0)partition(1)

Advanced RISC Computing (ARC)

Page 15: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 15计算机系

信息处理实验室

Disk Drivers

Disk storage driver architecture

Storage class driver

Storage port driver

Miniport driver (OEM supply)

Page 16: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 16计算机系

信息处理实验室

Device Naming

Device objects Disk names:

\Device\HarddiskX\DRX Partition object

\Device\Harddisk0\DP(1)0x7e000-0x7ff50c00+2

Page 17: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 17计算机系

信息处理实验室

Basic Disk Management

FtDisk\Winnt\System32\Drivers\Ftdisk.sys

creates disk device objects representing volumes on basic disks manages all basic disk volumes

Page 18: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 18计算机系

信息处理实验室

Dynamic Disk Management

DMDiskManager (Dmdskmgr.dll)

DMAdmin

Page 19: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 19计算机系

信息处理实验室

Database interpretingDMConfig (Winnt\System32\Dmconfig.dll) DMBoot (Dmboot.sys)

DMIO a bus driver creates a device object for each dynamic disk volume

\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolumeX

Page 20: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 20计算机系

信息处理实验室

DMIO driver device objects

Page 21: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 21计算机系

信息处理实验室

Multipartition Volume Management the partitions that make up a volume can be located on discontiguous partitions or even on different disks Spanned volumes Mirrored volumes Striped volumes RAID-5 volume

Page 22: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 22计算机系

信息处理实验室

Spanned Volumes

A spanned volume is a single logical volume composed of a maximum of 32 free partitions on one or more disks

Page 23: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 23计算机系

信息处理实验室

Striped Volumes

A striped volume is a series of up to 32 partitions, one partition per disk, that combines into a single logical volume.

Page 24: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 24计算机系

信息处理实验室

Logical numbering of physical sectors on a striped volume

Page 25: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 25计算机系

信息处理实验室

Mirrored Volumes

In a mirrored volume, the contents of a partition on one disk are duplicated in an equal-sized partition on another disk

Page 26: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 26计算机系

信息处理实验室

RAID-5 Volumes

A RAID-5 volume is a fault tolerant variant of a regular striped volume.

striped volume with parity

Fault tolerance is achieved by reserving the equivalent of one disk for storing parity for each stripe

Page 27: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 27计算机系

信息处理实验室

the parity for stripe 1 the parity for stripe 2

Page 28: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 28计算机系

信息处理实验室

Volume I/O Operations Related components

FSD

volume managers & volume managers

I/O manager

Page 29: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 29计算机系

信息处理实验室

DMIO I/O operations

Page 30: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 30计算机系

信息处理实验室

The Volume Namespace

The Mount Manager

Mount Points

Volume Mounting

Page 31: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 31计算机系

信息处理实验室

The Mount Manager

A new driver in 2K, Mountmgr.sys drive letters dynamic disk volumes & basic disk volumesHKLM\SYSTEM\MountedDevices

\??\Volume{X} (where X is a GUID)??\C:

Every volume has a volume name entry, but a volume doesn't necessarily have an assigned drive letter.

Page 32: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 32计算机系

信息处理实验室

Example

Page 33: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 33计算机系

信息处理实验室

Mount Points

A new mechanism to 2Klet you link volumes through directories on NTFS volumes, which makes volumes with no drive-letter assignment accessible important technology: reparse point

Mount points are reparse points that store a volume name ( \??\Volume{X}) as the reparse data

Page 34: Lecture 13 storage management xlanchen@05/20/2005

xlanchen@05/20/2005 Understanding the Inside of Windows 2000 34计算机系

信息处理实验室

Volume Mounting