2.2. Managing and Maintaining Physical and Logical DevicesServer systems have both physical and logical devices. Physical devices include all hardware devices connected to or configured within the server system, and include sound cards, video cards, memory, system bus, disk controllers, and physical disks. Logical devices are used to abstract the physical components of hardware devices and represent them in a way that is more manageable. The primary logical devices you'll work with are logical volumes, which are the basic unit of disk storage that you can configure and manage. 2.2.1. Installing and Configuring Server Hardware DevicesHardware devices installed on a computer communicate with Windows Server 2003 using software device drivers. For a hardware device driver to work properly, the appropriate device driver variant must be installed, the resource settings for the device must be configured appropriately, and the device properties must be set correctly. In most cases, hardware manufacturers will provide a device driver for the hardware device. Windows Server 2003 includes an extensive library of device drivers. 2.2.1.1. Understanding Plug-and-Play and Non-Plug-and-Play devicesTwo basic types of hardware drivers are used on Windows systems:
Most Windows-compatible devices support PnP. PnP allows Windows to detect and install a hardware device automatically either from the library of device drivers maintained by Windows or from a manufacturer-supplied device driver. If a device is detected and there is no device driver, Windows will prompt you to specify the location of the device driver. In most cases, non-PnP devices are not detected automatically after installation and must be manually installed using the Add Hardware Wizard, which is accessible in the Control Panel and from the Hardware tab of the System utility. 2.2.1.2. Understanding signed and unsigned driversOn Windows 2000 and later computers, all hardware device drivers are either signed or unsigned. If a device driver is signed, then the driver has a digital signature. The digital signature means that a driver has been authenticated by the digital signer, which typically is Microsoft Windows Publisher, and has not been altered or overwritten by other installation programs or by virus programs. If a device driver is signed by Microsoft Windows Publisher, then the device driver was included with the operating system. If a device driver is signed by Microsoft Windows Hardware Compatibility Publisher, it means the device driver has been tested in the Windows Hardware Quality Labs (WHQL) (and was probably released after the release of the operating system). Tip: Generally speaking, you should always use a signed driver if one is available for the hardware device. Before you install hardware using an unsigned (and potentially dangerous) driver, you should test the driver on a similarly configured computer in a development or test environment. By default, Windows Server 2003 warns you if you try to install an unsigned device driver. Windows can also be configured to allow all device drivers to be installed or prevent unsigned device drivers from being installed. These settings can be made for individual computers using Control Panel, and for all computers in a domain, site, or organizational unit (OU) through Group Policy. Group Policy can also be used to prohibit users from changing driver installation settings. As long as you are not prohibited from doing so, you can change driver settings for individual computers by clicking the Driver Signing button on the Hardware tab of the System utility. This displays the Driver Signing Options dialog box. In this dialog box, you can choose the action you want Windows to take whenever someone tries to install an unsigned device driver. As Figure 2-1 shows, the options are: Figure 2-1. Settings in the Driver Signing Options dialog box can be used to change the way Windows handles unsigned drivers.
Tip: Windows Server 2003 will not install drivers with known problems. If you try to install a driver with known problems, the Windows Driver Protection facility will block the installation. 2.2.1.3. Installing hardware devicesAdministrators can install any hardware device and its drivers, including both PnP and non-PnP devices. Users can only install PnP devices that are detected and installed automatically using signed drivers stored in Windows device driver library. If the device requires the operating system to prompt for any reason, including to specify manufacturer supplied drivers or designate configuration options, users will not be able to complete the installation. The only exception is for users who have been designated specific permission to install such devices. Tip: For the exam, you'll definitely want to have a strong understanding of how device installation works for both administrators and users. If a device isn't automatically installed and you have a manufacturer's installation disk, you should install the device using the disk. If this doesn't work or an installation disk isn't available, you can install it using the Add Hardware Wizard by following through these steps:
2.2.1.4. Using Device ManagerAll detected devices are listed in the Device Manager snap-in, which is installed by default in the Device Manager console (devmgmt.msc) and in the Computer Management console (compmgmt.msc) (see Figure 2-2). Devices that have been detected but are not installed or properly configured are shown with a yellow warning icon. Devices that have been disabled have a red warning icon. Figure 2-2. Device Manager is used to view and manage installed hardware devices.Device Manager can be used to manage devices on local computers only. On remote computers, Device Manager has Read Only access. You can use Device Manager anytime you have a question as to whether hardware devices on a computer are working properly. Common tasks include:
2.2.1.5. Configuring hardware devicesIn Device Manager, you can view and configure hardware devices by right-clicking a device and selecting Properties. Most devices have a dialog box with General, Driver, Details, and Resources tabs. Depending on device type, some devices have fewer or additional tabs. Figure 2-3 shows the three most common tabs you'll refer to when working with devices: Figure 2-3. The General, Driver, and Resource tabs.
2.2.1.6. Troubleshooting hardware devicesWindows Server 2003 has fewer problems with hardware devices than previous versions of the operating system. That said, if something goes wrong with a device, it will more typically be a non-PnP device than a PnP device. You may also experience problems with a device after updating its drivers. In Device Manager, the device is listed with a yellow warning icon if there is a problem with its configuration or it has been detected but there is no driver installed. If you've recently updated the driver for the device, you can try rolling back to the previous version to correct the problem. To do this, open Device Manager and access the device's properties dialog box. On the Driver tab, click Rollback Driver to start the rollback process and follow the prompts. Other device problems can be resolved using the Hardware Update Wizard or the Hardware Troubleshooter. To start the Hardware Update Wizard, follow these steps:
Figure 2-4. Begin troubleshooting with the Add Hardware Wizard.For a device whose drivers are not installed, you can start the Hardware Update Wizard from Device Manager as well. In Device Manager, right-click the device and then select Properties. On the General tab, click Reinstall Driver to start the Hardware Update Wizard. If a device driver is installed, the General tab of the driver properties dialog box will have a Troubleshoot button instead of a Reinstall Driver button. Clicking the Troubleshoot button starts the Hardware Troubleshooter, which offers a series of prompts with questions and answers that can be used to troubleshoot. Tip: If the driver has been provided by Windows Update, you don't need administrator rights on the local machine to install the driver. Faulty drivers can also cause the operating system to crash or fail to start. Use the following technique to resolve the problem:
2.2.2. Managing Basic and Dynamic DisksPhysical disk drives are a type of hardware device that can be installed or attached to a computer. Although hot swappable disk drives can be installed or attached without powering down a computer, most other types of drives require that you power down a computer prior to installing or attaching the drive. Windows should automatically detect any drive you install or attach. The primary tools you use to manage disks are the Disk Management snap-in and the DiskPart command-line utility. You must be a member of the local Administrators group, the Backup Operators group, or have been delegated permission to manage basic and dynamic disks. Only members of the local administrators group can format a disk. 2.2.2.1. Understanding partition stylesTo allow files and file structures to be written on disks, you partition them. Two partition styles are used:
The partition styles available on a particular computer depend on the chip architecture:
The partition style provides the underlying methodology for partitioning disks. Windows structures disks and their contents according to storage type. Windows Server 2003 supports two storage types:
Basic disks are the industry standard and are accessible on just about every operating system. Dynamic disks, on the other hand, are specific to Windows 2000 and later. Dynamic disks are not supported for removable media, on portable computers, such as laptops and tablet PCs, or with disks connected via FireWire/USB. Tip: Some computers ship with disks configured as dynamic disks. Any basic disk can be easily converted to a dynamic disk. However, dynamic disk volumes must be deleted before dynamic disks can be converted to basic disksa process that destroys the data on the disk. 2.2.2.2. Understanding special drive sectionsRegardless of whether they are basic or dynamic, all disks have three special drive sections:
One and only one of the primary partitions on the disk must be marked as active. Typically, the system, boot, and active partitions are the samei.e., most computers have one active partition, which is also the system partition and the boot partition. 2.2.2.3. Using basic disksThe way basic disks are used depends on the partition style:
MBR is the partition style you'll work with the most. Partitions and logical drives are used only on basic disks. You can extend a partition using the DiskPart command-line utility, provided that the partition is formatted using NTFS and is followed by a contiguous block of unallocated space on the same physical disk. Tip: Under Windows NT 4.0, basic disks supported all the fault tolerant features of dynamic disks. When a computer is upgraded from Windows NT 4.0 to Windows Server 2003, you will have limited management capabilities for these fault tolerant features, such as the ability to repair a damaged volume set or to delete a volume set. You will also be able to upgrade the disks containing the volume set from basic disks to dynamic disks. 2.2.2.4. Using dynamic disksDynamic disks were introduced with Windows 2000 and provide improved manageability by requiring fewer restarts after configuration changes and by allowing disks to be combined or to create fault-tolerant disk sets. With dynamic disks, the unit of storage is the volume. All volumes on dynamic disks are known as dynamic volumes. Although you can create up to 2,000 volumes on a dynamic disk, the recommended maximum number of volumes is 32. When a computer has multiple dynamic disks, you have additional options for combining disks and creating fault tolerant volumes. The difference between a non-fault tolerant volume and a fault tolerant volume is an important one:
Windows supports disk performance and fault tolerance options at the operating system level using redundant array of independent disk (RAID) technology. Another term for Windows-supported RAID is software RAID . Tip: RAID can be implemented using hardware RAID controllers. Because hardware RAID operates at the hardware level, hardware RAID offers better performance than software RAID. Windows sees disks configured with hardware RAID as standard disks, which allows you to set the storage type and the partitioning separately from the underlying hardware implementation. You can format the disks as either basic disks or dynamic disks, and you can also apply software RAID. As with basic disks, one and only one of the volumes on a dynamic disk must be marked as active, and the volume also is the system volume and the boot volume. With dynamic disks, the types of non-fault-tolerant and fault-tolerant volumes available are as follows:
Table 2-1 summarizes the volume types. Only Windows servers support fault-tolerant software RAID. Although Windows 2000 Professional and Windows XP Professional support disk spanning and disk striping, they do not support disk mirroring (RAID-1) or disk striping with parity (RAID-5). Microsoft recommends that you implement RAID-1 and RAID-5 only on identical disks.
Table 2-2 compares the terms used with basic and dynamic disks. The most important thing to remember is the following: basic disks have partitions and within extended partitions there are logical drives. Dynamic disks have volumes and only server editions support fault-tolerant RAID.
2.2.2.5. Understanding volume formattingPrimary partitions, logical drives on extended partitions, and volumes are formatted to create logical volumes. A logical volume must be formatted with a specific filesystem. Windows 2000 and later computers support three filesystems on basic and dynamic disks:
NTFS supports advanced file permissions, disk quotas, remote storage, sparse files, file-based compression, and encryption. Because NTFS provides so many security, management, and resiliency features, usually you will want to format logical volumes using NTFS. The only time you wouldn't want to do this is if you have a specific performance reason or other issue. 2.2.2.6. Understanding volume mountingWhen working with logical volumes, it is important to keep in mind that a logical volume may include more than one physical disk and it may also be used to present part of a disk with a single physical disk having multiple logical volumes. In Windows Server 2003, logical volumes are represented by:
Table 2-3 summarizes how drive letters and mount points are used. Generally, the drive letters E to Z are available for use with driver letters A and B being used with floppy/Zip drives, drive C for the primary disk, and drive D for the computer's CD/DVD-ROM drive. Logical volumes can be mounted to empty folders on NTFS volumes as well.
2.2.2.7. Using Disk ManagementThe Disk Management snap-in is installed by default in the Disk Management console (diskmgmt.msc) and in the Computer Management console (compmgmt.msc). Disk Management can be used to manage disk storage on both local and remote computers. Computer Management can be accessed from the Administrative Tools menu or by right-clicking My Computer on the Start Menu and then selecting Manage. By default, Computer Management connects to the local computer. To connect to a remote computer, right-click the Computer Management node and select Connect To Another Computer. Then use the Select Computer dialog box to specify the name or IP address of the computer to which you want to connect. Configuring disks and volumes using Disk Management is a five-step process:
2.2.2.8. Using DiskPartDiskPart is a command-line utility for managing disks. DiskPart can be used interactively or it can call a script to obtain a list of commands to execute. When you type diskpart at a command prompt and press Enter, you invoke the DiskPart interpreter, and the DISKPART> command prompt appears. You can obtain help at anytime be entering ?. DiskPart has commands for listing and selecting disks, partitions, and volumes. You should always select the specific disk, partition, or volume you want to work with before performing management tasks. Configuring disks and volumes using DiskPart is a four-step process:
2.2.2.9. Extending volumesYou can extend simple or spanned volumes on dynamic disks using Disk Management or DiskPart. In Disk Management, right-click the volume and select Extend Volume. In DiskPart, select the disk and volume you want to work with, then type extend size=n, where n is the size in megabytes to extend the volume. If a partition is formatted using NTFS and is followed by a contiguous block of unallocated space on the same physical disk, you can extend a partition on a basic disk using the same technique. 2.2.3. Implementing RAID SolutionsRAID can be configured using hardware and software implementations. With hardware solutions, a controller card creates and maintains the RAID configuration, which typically is set up using vendor-provided software. With software solutions, Windows Server 2003 creates and maintains the RAID configuration at some cost to performance. As discussed previously, Windows supports:
2.2.3.1. Managing and maintaining striped volumesStriping (RAID-0) uses unallocated space on 2 to 32 dynamic disks and writes data to all disks at the same rate. To create a striped volume, follow these steps:
Striped volumes must be formatted using NTFS and can be assigned a drive letter or a mount point. Boot and system volumes cannot be striped. If any disk that is part of the striped volume fails, the entire volume will fail and be unusable. To recover the striped volume you must:
2.2.3.2. Managing and maintaining mirrored volumesMirroring (RAID-1) uses an identical amount of space on two disks to create a fault tolerant volume. Since all data is written to both volumes, single-drive write performance can be achieved using two disk controllers (a process called duplexing ). To create a new mirrored volume from unallocated space, follow these steps:
Mirrored volumes must be formatted using NTFS and can be assigned a drive letter or a mount point. Unlike striped volumes, boot and system volumes can be mirrored. To mirror an existing volume, follow these steps:
Mirrored volumes can fail in several ways. The way you repair the mirror depends on the error status shown in Disk Management for the disk and volume:
If you are unable to recover the mirror, which may occur if a disk is bad, you will need to rebuild the mirror by following these steps:
2.2.3.3. Managing and maintaining striped with parity volumesStriping with parity (RAID-5) uses an identical amount of space on 3 to 32 disks to create a fault tolerant volume. Data is written to all the physical disks in the volume at the same rate using striping. Checksum information in the form of parity is written with the data to provide fault tolerance. To create a new RAID-5 volume from unallocated space on three or more disks, follow these steps:
RAID-5 volumes must be formatted using NTFS and can be assigned a drive letter or a mount point. Like striped volumes, system volumes cannot use RAID-5. Like mirrored volumes, RAID-5 volumes can fail in several ways. The way you repair the volume depends on the error status shown in Disk Management for the disk and volume:
If one of the disks in the volume won't come back online, which may occur if a disk is bad, you will need to rebuild the volume by following these steps:
2.2.4. Maintaining DisksSeveral tools are provided for maintaining disks, including Check Disk (CHKDSK.EXE) and Disk Defragmenter (DFRG.MSC). You use Check Disk to check for and repair disk errors. You use Disk Defragmenter to reorganize a disk's files and folders to optimize performance. 2.2.4.1. Using Check DiskCheck Disk (CHKDSK.EXE) scans the surface of disks, checking the integrity of files and folders while looking for and correcting errors, such as lost clusters and invalid file indexes. Check Disk can be run interactively or from the command prompt. To run Check Disk interactively, open Disk Management or My Computer, right-click the volume, and then select Properties. On the Tools tab of the disk's properties dialog box, click Check Now. By default, Check Disk looks for errors only. If you want Check Disk to search for and correct errors, you should select Automatically Fix File System Errors and Scan For And Attempt Recovery Of Bad Sectors before clicking Start, as shown in Figure 2-5. Figure 2-5. Use Check Disk to search for and correct errors.To run Check Disk from the command line, type chkdsk followed by the drive designator, such as chkdsk c:. Use the optional parameter /f to automatically fix filesystem errors and /r to scan for and attempt recovery of bad sectors. All parameters available can be listed by typing chkdsk /?. Tip: Without any switches, the chkdsk utility works in error-checking only mode on the drive you are working on. chkdsk moves the data found on a bad sector to a good sector only if this is supported based on the volume type. Otherwise, chkdsk cannot recover data on bad sectors and data may have to be recovered from backup. Whether working interactively or from the command prompt, keep in mind Check Disk may need exclusive disk access to some files to fix errors. If exclusive access to files isn't available, you'll be prompted to schedule the disk check to occur next time you restart the computer. Adding the /x parameter at the command line can force the nonsystem volumes to dismount before checking the disk. System volumes cannot be dismounted in this way. 2.2.4.2. Using Disk DefragmenterDisk Defragmenter (DFRG.MSC) checks for and corrects fragmentation problems on disks. Fragmentation can occur in a disk's Master File Table (MFT) or paging file, as well as in the files and folders stored on the volume. Tip: Disk Defragmenter works only on local computers. For defragmenting remote computers, you'll need a third-party utility. You must have at least 15 percent free space on the disk where you want to run Disk Defragmenter. On FAT, FAT32, and NTFS volumes, files, folders, and related disk structures are stored in units called clusters . Only one file can be written to a particular cluster. The default cluster size for NTFS is 4 KB. When this cluster size is used, files that are 4 KB or smaller are written to a single cluster on the disk, and files larger than 4 KB are written to multiple clusters. For read/write operations, the operating system can write and read files faster when clusters are written in sequential or nearly sequential clusters. If there are large gaps between the file clusters, the disk controller must seek across the disk for clusters, which reduces read/write performance. To run Disk Defragmenter interactively, open Disk Management or My Computer, right-click the volume, and then select Properties. On the Tools tab of the disk's properties dialog box, click Defragment Now. Using Disk Defragmenter is a two-part processyou must click Analyze to analyze the disk and determine the level of fragmentation. Disk Defragmenter will prompt to defragment the disk if this is recommended based on the current disk usage. Click View Report to see a detailed report of the disk usage. Begin defragmenting the disk by clicking Defragment. To run Disk Defragmenter from the command line, type defrag, followed by the drive designator, such as defrag c:. Disk Defragmenter will then analyze the disk and begin defragmenting the disk if this is required. If you want only to analyze the volume, use the -a parameter. Other parameters available include -v for verbose output and -f to force defragmentation to occur even if the disk has low free space. Whether working interactively or from the command prompt, Disk Defragmenter resolves fragmentation problems by attempting to rearrange files so they use consecutive clusters and by consolidating free space. |