Chapter 6. Disk systems

 

This chapter covers

  • Discovering the physical disks in your systems
  • Relating physical and logical disks
  • Managing disk volumes

Disk systems, along with CPU and memory, are the primary system resources we’re interested in as administrators. We looked at how to explore CPU and memory configurations in chapter 5. In this chapter, we’ll turn our attention to the disk systems.

Working with the disk system on a local machine is easy. Administering the disks on remote machines gets more difficult. As a real-world example consider the 200 virtual servers I have running. Virtual disks become fragmented just like physical disks, leading to poor performance. The techniques you’ll learn later in this chapter will show you which disks need defragmenting and could be used to perform the defragmentation overnight. All from a single script. This is a classic of example of how PowerShell and WMI can save you time and effort—quicker, easier administration, and you get the benefits.

We’ll start by considering physical disks and their controllers. Disk controllers can be IDE- or SCSI-based. You can easily test for both in the same script. PowerShell and WMI don’t return error messages if there’s no data, so you can use that feature to test both types of controllers without worrying if they’re both present.

6.1. Physical disks

6.2. Logical disks

6.3. Volumes

6.4. Managing disks

6.5. CD drives

6.6. Summary