Windows 7

Manage Local Storage

All this talk about cloud storage makes overlooking just how important local storage is easy. All computers have some local storage, and the technology for local storage keeps advancing.

Just a few years ago, USB 2.0 (High Speed) was considered the most sought-after item regarding data transfer speeds, especially compared to USB 1.0. In addition to providing a huge performance gain, USB 2.0 flash drives offered new functionality such as Windows ReadyBoost, which uses the USB storage device as an additional cache to speed up a Windows PC.

With USB 3.0 (Super Speed) now on the market, earlier versions of the USB standard are looked at as inferior. Released in late 2008, USB 3.0 offers up to a massive 5 Gbit/s (625 MB/s) data transmission speed, almost 20 times the speed of USB 2.0.

Another phenomenon has been the emergence of solid-state drives (SSDs), which offer extremely fast data transfer rates. SSDs are fast becoming the standard local storage media for the tablet form factor due to weight savings, zero moving or mechanical parts, and data transfer speed. Although prices for SSD technology continues to fall, solid-state drives are still around 10 times more expensive when comparing traditional magnetic hard disk drives (HDDs).

As cloud technologies become more commonplace, local storage becomes less important as most services, data, and even applications become accessible only via the Internet. Ultimately in the consumer-driven arena, the device ultimately becomes the interface. Many tablet devices don't allow the end user to modify or upgrade the internal components. Customization of these sealed devices isn't permitted except for limited choices, such as the ability to choose the amount of RAM, size of the SSD, or color of cover at the point of purchase.

Managing disk volumes

Whether or not you use HDD or SSD to store your local files, Windows 8 provides various tools that you can use to configure, troubleshoot, and tune your system. This discussion is limited to new features introduced with this release; it will skim over the changes introduced with previous releases.

Two main tools are available to manage your PC disk volumes: the Disk Management MMC Snap-In component and the DiskPart command-line tool. Both have been included since Windows 2000. Other often overlooked tools include the Computer location in File Explorer and fsutil, covered later. The fsutil tool allows advanced configuration of both FAT and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume.

Tip:
You must be logged on as an administrator or be a member of the Administrators group to use fsutil.

Although Windows 8 RTM didn't benefit from the new Resilient File System (ReFS) implemented in Windows Server 2012, Windows 8 has introduced several new features for handling ever-increasing disk capacity. Windows 8 supports the following file-system formats.

File System 	Max Volume Size
FAT 		4GB
FAT32 		32GB
exFAT 		256TB
NTFS 		256TB

Windows 8 continues to support both Master Boot Record (MBR) and GUID Partition Table (GPT) partition table types and allows you to convert between the two. This enables you to take advantage of the emerging EFI-based motherboards that support large-format GPT disks, thus allowing users to move away from the extremely dated (1980s) MBR partitioning scheme.

NOTE:
To change partition table types from MBR to GPT or revert, the disk must have no partitions or data. Therefore, you should ensure that you have a backup of any data you want to keep.

Hard disk drives have traditionally been based on 512-byte sectors. Hard disk vendors have introduced a new larger sector size of 4,096 bytes (4 KB). These are generally known as an Advanced Format disk. Support for both the Standard and Advanced Format hard drives continues in Windows 8, allowing drives to exceed the legacy 512-byte sector-based hard disk specification and allowing for 512e and 4k Advanced Format drives, which allow very large (that is, multi-terabyte) hard drives.

To verify the kind of drive that you have, follow these steps and view the results:

  1. Search the Start screen for CMD and open an elevated command prompt, or use Windows+X and choose Command Prompt (Admin).
  2. Type the following command:

    Fsutil fsinfo ntfsinfo C:

If the "bytes per sector" is greater than 512, you have an Advanced Format disk:

Bytes  			Bytes per Physical 	Drive type
Per Sector value	Sector value
4096 			4096 			4K native
512 			4096 			Advanced Format (also known as 512E)
512 			512 			512-byte native
MORE:
For more information on Advanced Format disks, see http://support.microsoft.com/kb/2510009.

Using Disk Management

Disk Management offers support for many features already covered in previous releases of Windows, including the following:

  • Extend and shrink a volume
  • Create, delete, and format a volume
  • Convert a basic disk to a dynamic disk or vice-versa
  • Add or change a drive letter
  • Convert an MBR disk to a GPT disk or vice-versa
  • Mark a partition as active

The Virtual Hard Disk (VHD) format, also known as a disk-in-a-file abstraction, is a useful way to conceptualize the actual files and disks on a PC, offering new opportunities for transporting, virtualizing, and deploying systems for both developers and IT Professionals. Every file on a computer system can now be stored in and accessed via one single VHD file, which is fully transportable.

In addition to the VHD support introduced in Windows 7, Windows 8 now provides the support of virtual hard disks with the VHDX format. VHDX allows VHD files to be up to 64 TB in size.significantly larger than the 2,040 GB limit of VHDs.

Note:
Using the VHDX format requires that the disk type be dynamically expanding. It also allows virtual hard drives to be up to a maximum of 64 TB in size, significantly larger than the VHD format.

To create a VHDX, follow these steps:

  1. Open the Disk Management MMC by typing Windows+X and selecting Disk Management.
  2. Click the Action menu item and select Create VHD to display the Create and Attach VHD dialog box.
  3. Provide the name and location of the VHDX file and the required size.
  4. Select the virtual hard disk format as VHDX.
  5. Choose the virtual hard disk type, or leave the default setting.
  6. Click OK.
For a more detailed description of the VHDX virtual hard disk format released by Microsoft, read the specification at http://www.microsoft.com/en-us/download/detailsaspx?id=34750.

Using DiskPart for disk operations

Although Disk Management offers users a GUI to configure disks and volumes, the commandprompt tool DiskPart.exe offers more options and the scripting ability to automate the process using simple batch files.

DiskPart offers the following commands:

  • active Marks the selected partition as active
  • add Adds a mirror to a simple volume
  • assign Assigns a drive letter or mount point to the selected volume
  • attributes Manipulates volume or disk attributes
  • attach Attaches a virtual disk file
  • automount Enables and disables automatic mounting of basic volumes
  • break Breaks a mirror set
  • clean Clears the configuration information or all information from the disk
  • compact Attempts to reduce the physical size of the file
  • convert Converts between different disk formats
  • create Creates a volume, partition, or virtual disk
  • delete Deletes an object
  • detail Provides details about an object
  • detach Detaches a virtual disk file
  • exit Exits DiskPart
  • extend Extends a volume
  • expand Expands the maximum size available on a virtual disk
  • filesystems Displays current and supported file systems on the volume
  • format Formats the volume or partition
  • gpt Assigns attributes to the selected GPT partition
  • help Displays a list of commands
  • import Imports a disk group
  • inactive Marks the selected partition as inactive
  • list Displays a list of objects
  • merge Merges a child disk with its parents
  • online Marks as online an object that's currently marked as offline
  • offline Marks as offline an object that's currently marked as online
  • recover Refreshes the state of all disks in the selected pack, attempts recovery on disks in the invalid pack, and resynchronizes mirrored volumes and RAID 5 volumes that have stale plex or parity data
  • rem Means nothing; used to comment scripts
  • remove Removes a drive letter or mount point assignment
  • repair Repairs a RAID 5 volume with a failed member
  • rescan Rescans the computer looking for disks and volumes
  • retain Places a retained partition under a simple volume
  • san Displays or sets the SAN policy for the currently booted operating system
  • select Shifts the focus to an object (you can also type sel)
  • setid Changes the partition type
  • shrink Reduces the size of the selected volume
  • uniqueid Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature of a disk

To use DiskPart, follow these steps:

  1. Search the Start screen for CMD and open an elevated command prompt, or use Windows+X and choose Command Prompt (Admin).
  2. Type DiskPart and press Enter.
  3. After DiskPart loads, the cursor changes to shw DISKPART>. Type the commands list disk and sel disk 0 (or the correct disk number), and then detail disk.
  4. To obtain detailed help with examples of a command, type HELP followed by the command. For example, HELP LIST provides the syntax that DiskPart uses.
  5. To exit DiskPart, type EXIT and press Enter.
Note: You can abbreviate many, but not all, commands within DiskPart. For example, you can use SEL instead of SELECT or PART instead of PARTITION. REM cannot be used in place of REMOVE, however, because the REM command is already used for REMARK when commenting out commands.

Performing disk management with PowerShell 3.0

When you need to produce more complex scripts or to run them remotely or in simultaneous operations, PowerShell is the tool of choice. PowerShell 3.0-included in both Windows 8 and Windows Server 2012-introduces for the first time native disk management commands. The most basic commands include Get-Disk and Get-Partition.

Other useful disk-related PowerShell 3.0 commands include the following:

  • Format-Volume
  • Remove-Partition
  • New-Partition
  • Set-Disk
  • Set-Partition
  • Repair-Volume

Using the Check Disk tool

As mentioned previously, Windows 8 has introduced feature enhancements to NTFS, such as self-healing abilities. To further reduce the need for users to perform manual maintenance on disk drives, Windows also includes automatic scheduling of disk maintenance utilities.

A system exhibiting strange behavior or suffering from frequent file or disk errors typically indicates the likelihood of disk problems or possible drive failure. Drives do fail, and the only safe way to protect your data is to use (and verify) regular backups.

Each morning at 3 A.M. local time, Windows 8 performs an automated scan of your disk drives using the Check Disk tool (chkdsk.exe), which fixes errors and inconsistencies in NTFS volumes and files on your disks.

Note: You can use Chkdsk.exe to check for and optionally repair issues found on FAT, FAT32, exFAT, and NTFS volumes.

The chkdsk tool within Windows 8 provides an enhanced scan and repair (for NTFS volumes) compared to previous versions of the chkdsk tool, and can even take the volume offline temporarily while the repair takes place. Boot and system volume repairs are performed at the next system restart.

Tip:
The computer must be running on AC power for the 3 A.M. automated maintenance to take place. Otherwise, the task is carried over until the next time that the PC is running on AC power and the operating system is idle.

To run the chkdsk.exe tool manually to check whether your C: drive has any problems, open an elevated command prompt and type the following command:

chkdsk /scan C:

If the tool finds errors, you can attempt to repair errors on drive C: by typing this command:

chkdsk /spotfix C:
Note:
You can't use both /scan and /spotfix options together at the same time because both are independent of each other.

Managing file system fragmentation

Ever since hard drives were invented, some form of file fragmentation has existed, as has the need to defragment or maintain the status of how files are kept on disk. Windows performance can be adversely affected through severe fragmentation of the files on your disk.

Each new file saved to your disk might need to be "broken" into smaller fragments to be stored in the free spaces. This greatly adds processing and I/O overhead when reading/ writing to disk and slows down your computer. Defragmenting your hard disk can recover some of the lost speed.

Defragmentation

Windows continues to provide support tools, such as Disk Defragmenter, to defragment your hard disk. By using the improved Task Scheduler, Windows automatically runs the Optimize Drives utility, which examines your disk drives and then defragments them weekly.

To manually launch the Optimize Drives utility, use the command prompt and type defrag, or follow these steps to invoke the GUI version:

  1. Search the Start screen for drive and select Defragment and Optimize your Drives from the Settings Search results. Alternatively press Windows+X, select Run, type dfrgui.exe, and then press Enter.
  2. In the Optimize Drives utility, you can select the hard disk drive that you want to defragment and then click Optimize.

Using this utility to optimize your drive can take several hours, depending on the size and level of fragmentation. If the defragmentation process is stopped and then restarted before completion, Windows automatically continues from the last position. This feature is known as cyclic pickup defragmentation.

Tip:
Windows schedules the Optimize Drives utility to run weekly and notifies the user if three consecutive scheduled runs are missed.

Newer drives such as SSD don't need to be defragmented because files aren't accessed mechanically. If an SSD, thumb drive, or flash drive was to become defragmented, defragmenting the drive would result in only an infinitesimal speed benefit, because files on the drive are accessed at a uniform high speed regardless of the location or drive fragmentation.

Note:
Defragmenting a solid state or a flash drive can significantly decrease the life span of the drive.

Disk Cleanup

Disk Cleanup is a Windows system tool that can be used to locate files on your system that are no longer needed, such as temporary files or temporary Internet download files.

Just how many files are built up over time that can be safely deleted from your computer is amazing. Deleting the files not only provides you with more free space, but also reduces the size and length of time of backups. Disk Cleanup is a useful tool to consider when "spring cleaning" your computer.

To launch Disk Cleanup, either use the command-line cleanmgr tool or follow these steps:

  1. Search the Start screen for cleanmgr and open Disk Cleanup.
  2. If you need to choose a hard drive to clean, select the one you want and click OK. Disk Cleanup analyzes the selected drive for files that can be deleted and presents them to you in a summary report.
  3. To delete the files or pages, click Clean Up System Files.

The file categories that Windows reports for possible deletion include the following:

  • Downloaded Program Files
  • Temporary Internet Files
  • Offline Files
  • Temporary Offline Files
  • Offline Webpage Files
  • Debug Dump Files
  • Recycle Bin
  • Setup Log Files
  • System error memory dump files
  • Hibernation File Cleaner
  • Temporary Files (including Microsoft Office Temp Files)
  • Thumbnails
  • Windows Error Reporting Archive and Queue
  • Files Discarded by Software Upgrades (including Windows Upgrade Files)

In many of these file categories, you can view the files or pages before permanently deleting them.

Tip:
Windows Upgrade creates a hidden folder where the previous Windows installation files are saved: %SystemDrive%\Windows.old.

If you want to show the Disk Cleanup utility on the Start screen, select the option to Show Administrative Tools on the Tiles menu. You can display the Tiles menu on the Charms bar by pressing Windows+C from the Start screen and then clicking Settings and Tiles.

Managing Storage Spaces

Storage Spaces is a new feature built into both Windows 8 and Windows Server 2012 that allows you to add storage to your system and pool existing drives without needing to purchase traditionally expensive storage area network (SAN) devices.

Within a Storage Space, you create a storage pool, which can span multiple physical disks. One nice feature of storage pools is the ability to add and remove disks from a pool as your capacity demand changes. Windows allows you to provision storage from the pool as a number of virtual disks that behave exactly like a physical disk. A virtual disk is sometimes referred as a LUN (Logical Unit Number).

Note:
When creating or adding a drive to a Storage Space, Windows 8 formats it and any data is lost.
Tip:
LUNs are generally used with SAN technology. Windows 8 supports LUNs with the Storage Spaces feature.

To configure Storage Spaces, you need first to attach your storage, which can be a mix and match type/size/interface, such as internal/external drives, USB drives, Serial ATA (SATA), Serial Attached SCSI (SAS), and so forth. Any existing data on a drive can't be integrated into the storage pool; when drives are added, they are specially formatted and then configured to be part of the pool. You should ensure that any existing data is removed, backed up, or transferred to the existing pool; otherwise, it's permanently lost.

Storage Spaces allows Windows 8 users to configure volume-level resiliency, which helps protect the data while it's stored in the storage pool. Depending on how many drives the storage pool contains, you can configure volume mirroring or parity volume levels of redundancy.

Windows offers the following types of redundancy:


Type 			Description
Simple (none) 		No mirroring; data is lost if the drive fails.

Two-way mirror 		Every file in the pool is stored on at least two 
			different physical drives, "mirroring" your data.

Three-way mirror 	Every file in the pool is stored on at least three different 
			physical drives. This allows you to lose two out of the 
                        three drives.

Parity 			At least three drives are required for parity. Data is 
                        stored across at least two different physical drives and the 
                        parity information is saved on another disk. This method 
                        uses less disk space but can be higher on disk I/O overhead 
                        as the parity information needs to be calculated.
Note:
Parity volume mirroring is best for drives that store large data files or less frequently accessed content such as video files.

After your drives are connected, follow these steps to configure Storage Spaces:

  1. Search the Start screen for Storage Spaces and open Storage Spaces from the Settings search.
  2. Select Create A New Pool And Storage Space.
  3. If requested, accept the UAC prompt.
  4. Storage Spaces identifies available drives to create the Storage Pool. Select the drive(s) you want to add. (If a drive isn't formatted, it is automatically selected.)
  5. Click Create Pool.
  6. Name the storage space and select the drive letter you want to use.
  7. Use the drop-down list, to select the level of resiliency that you require, and then click Create Storage Space.
    Your storage pool is now created and is ready to use.

Windows allows you to specify a maximum size larger than the current amount of available physical drive space. Known as thin provisioning, this allows you to provision the space and then add drives as they are required. The system prompts you as the physical limit is reached to add more drives. You can also increase the maximum size of an existing storage space at a later stage.

A module is available for PowerShell users who want to script Storage Spaces. Details can be found here: http://www.microsoft.com/en-us/download/details.aspx?id=30125.

Note:
Drives configured as part of a storage pool must be kept together if the pool is moved to a different Windows 8 PC. If a disk is removed, it needs to be reformatted before it can be reused in another PC.

After you create a storage pool, it can be managed using the Manage Storage Spaces console. You can create additional storage spaces, add drives, and delete or rename both the storage space and the name of each physical drive.

Note:
You should give each drive a meaningful name both physically on each drive and logically in the Storage Space console. Consider using the following nomenclature: Size-Purchase- Date-Number, as in 1TB19MAR13#2. Naming and suitably marking each drive helps you identify the specific drive when replacing or if a drive fails.
Most drives have a warranty for one, three, or five years. If for any reason one of your disk drives fails within the warranty period, you should be able to obtain a replacement from the manufacturer. Marking the drive with your purchase date and warranty expiry date could be useful in a few years' time.

One potential downside to the use of Storage Spaces is that the system (Windows) drive can't be included as part of the pool. To provide resiliency for the system drive, you should consider other options such as RAID.

[Contents] [Next]

In this tutorial:

  1. Monitor and maintain Windows Clients
  2. Manage Local Storage
  3. Monitor system performance