Section 2.8: Configuring Hard Disks

2.8.1: Disk Storage Types

Windows XP Professional provides support for two types of disk storage: basic storage, which uses basic disks and is the standard storage type; and dynamic storage, which uses dynamic disks. Basic disks can be divided into up to four partitions that can either be primary partitions or extended partitions. You can have multiple primary partitions but only one extended partition. You can create multiple primary partitions to which enables you to dual boot between Windows XP Professional and other operating systems such as Windows 98. One of the primary partitions must be set in fdisk as the active partition as the boot files required to start the operating systems must be located on the active partition.

Note: If you are going to dual boot between Windows XP Professional and Windows 95, Windows 95 OSR2, Windows 98, or Windows Millennium Edition, the primary partition must be formatted with the FAT or FAT32 file system as Windows 9x must reside on the primary partition and cannot access partitions that have been formatted with the NTFS file system.

Basic disks can be converted to dynamic storage from which dynamic volumes can be created. Windows XP Professional supports three types of dynamic volumes: simple volumes, which are created from disk space on a single physical disk and is not fault tolerant; spanned volumes, which can contain disk space from up to 32 physical disks and are also not fault tolerant; and striped volumes, which can combine the free space from up to 32 physical disks into one logical volume.

You can convert a dynamic disk back to a basic disk; however, all volumes must be deleted before the conversion. Therefore you should backup the data on the dynamic disk before converting it back to a basic disk.

To convert a dynamic disk to a basic disk:

  • Backup any data that you wish to retain.
  • In Disk Management, right-click the dynamic disk that you want to convert.
  • Click CONVERT TO BASIC DISK.

Note: When you add a disk to the computer it is added as basic storage. You can convert from basic storage to dynamic storage at any time without loss of data. However, there must be at least 1 MB of unallocated space on the hard disk to perform this conversion. Furthermore, all data will be lost when you revert from dynamic storage back to basic storage.

2.8.2: Configuring File Systems

Windows XP Professional supports the FAT, FAT32 and NTFS file systems. A computer can contain a combination of file systems but each file system must be located on a separate partition or volume.

Note: MS-DOS, Windows 3.1, Windows 95, Windows 98 and Windows Millennium Edition cannot access data on NTFS formatted disks.

The NTFS file system used by Windows 2000 and Windows XP Professional is version 5. This is a new version of NTFS that has been introduced with Windows 2000 and has new features that were not available in NTFS version 4 used by Windows NT 4.0. Windows NT 4.0 cannot therefore fully support all the features of NTFS version 5. NTFS version 5 offers a number of benefits that include:

  • File compression
  • File and folder level security
  • File encryption using Encrypting File System (EFS)
  • Disk quotas
  • NTFS permissions

Note: You can convert a disk from the FAT and FAT32 file to NTFS at any time without data loss by using the convert .command from a command prompt and using the fs:/ntfs switch. When you format the data on the disk is lost.

2.8.3: Encrypting File System (EFS)

EFS is a feature that was introduced with Windows 2000 and can be used to encrypt files and folders on NTFS volumes. When a user encrypts a file, only that user will be able to use the file. They can use the encrypted file without having to decrypt the file first. EFS can be implemented from Windows Explorer or from the command prompt using the Cipher command. The syntax for the cipher command is:

cipher [/e | /d] [/s:folder_name] [/a] [/i] [/f] [/q] [/h] [/k] [file_name [...]]

For a list of Cipher command switches see Table 2.3.

  • EFS is only supported on NTFS version 5
  • Compressed files cannot be encrypted using EFS
  • System files cannot be encrypted
  • Encrypted files cannot be shared
  • Encrypted flies or folders that are moved or copied to partitions or volumes that are not formatted with the NTFS file system will become decrypted
  • Files and folders on network computers can be encrypted if you have the necessary access permissions to the network computer's NTFS volume and if file encryption is enabled on the network computer.

Table 2.3: Command-line Switches for the Cipher Command

Switch Description
/e Encrypts the specified folders and marks them so that files that are added later will be encrypted.
/d Decrypts the specified folders. Files that are added to the folder will no longer be encrypted.
/s:folder Performs the specified operation on folders in the given folder and all subfolders
/a Performs the specified operation on files and folders.
/i Continues performing the specified operation even after errors have occurred.
/f Forces the encryption operation on all specified files, even those that are already encrypted.
/q Reports only the most essential information.
/h Displays files with the hidden or system attributes.
/k Creates a new file encryption key.
file_name Specifies a pattern, file, or folder.

2.8.3.1: Recovering an Encrypted Folder or File

If the owner's private key is unavailable due to disk failure or any other reason, a designated recovery agent can open the file by using his or her own private key. The default recovery agent is the Administrator account for the local computer. If the recovery agent designation changes, then access to the file is denied. For this reason, it is recommended that you keep recovery certificates and private keys until all files that are encrypted by using those recovery certificates and private keys have been updated. One or more users, typically administrator-level accounts, can be designated as data recovery agents through Local Policy on stand-alone computers or through Group Policy in a domain. Data Recovery Agents (DRAs) are issued recovery certificates with public and private keys that are used for EFS data recovery operations. By default, in a domain, the EFS recovery policy designates the highest-level administrator account as the DRA on the first domain controller installed in the domain. Different DRAs can be designated by changing the EFS recovery policy, and different recovery policies can be configured for different parts of an enterprise. In Windows 2000, DRAs were required to implement EFS. In Windows XP, they are optional. Microsoft recommends that all stand-alone or domain environments have at least one designated DRA.

2.8.3.2: Backing Up and Restoring Encrypted Files or Folders

Encrypted files and folders remained encrypted when you back them up. Backup files remain encrypted when transferred across the network or when copied or moved onto any storage medium, including non-NTFS volumes. If you restore backup files to NTFS volumes in Windows 2000 or Windows XP, they remain encrypted. Along with providing effective disaster recovery, backups can also be used to securely move files between computers and sites. Opening restored, encrypted files is no different from decrypting and opening any other encrypted files. However, if files are restored from backup onto a new computer, or at any location where the user's profile, and thus the private key that is needed to decrypt the files, is not available, the user can import an EFS certificate and private key. After importing the certificate and private key, the user can decrypt the files. A data recovery agent can also be used to decrypt a file for the user, if the user is unable to decrypt the file.

2.8.4: Volume Mounting

The Disk Management tool can be used to mount local drives to an empty folder on an NTFS volume. This empty folder becomes the mount point. When a physical disk is mounted to a folder, it is assigned a drive path rather than a drive letter. The Administrator can identify and manage volume mount points by using the mountvol.exe command-line tool. To mount a drive:

  • Open MY COMPUTER
  • Open CONTROL PANEL
  • Open ADMINISTRATIVE TOOLS
  • Click on the computer management
  • Expand STORAGE
  • Open DISK MANAGEMENT
  • Right-click the partition or volume you want to mount
  • Click CHANGE DRIVE LETTER AND PATH
  • Click ADD
  • Type the path to the empty folder

2.8.5: File Compression

Windows XP Professional supports file and folder level compression. Compressed files can be read and written to by any Windows-based or MS-DOS-based application without first having to be uncompressed by another program. When you access a file via a Windows-based or MS-DOS-based application, NTFS automatically decompresses the file. When you save or close the file again, NTFS compresses it again. Therefore NTFS allocates disk space based on the uncompressed file size and not on the compressed file size.

2.8.5.1: Copying and Moving Compressed Files and Folders

  • When copying a file within an NTFS volume, the file inherits the compression state of the target folder.
  • When moving a file or folder within an NTFS volume, the file or folder retains its original compression state.
  • When copying a file or folder to another NTFS volume, the file or folder inherits the compression state of the target folder.
  • When moving a file or folder to another NTFS volume, the file or folder inherits the compression state of the target folder. Because Windows XP Professional treats a move as a copy and then a delete, the files inherit the compression state of the target folder.
  • When moving or copying a file or folder to a FAT volume, Windows XP Professional automatically uncompresses the file or folder. This is because Windows XP Professional only supports file and folder compression on NTFS volumes.
  • When moving or copying a compressed file or folder to a floppy disk, Windows XP Professional automatically uncompresses the file or folder, as floppy disks are formatted with the FAT file system. Floppy disks cannot support the NTFS file system and NTFS file compression is only supported on NTFS volumes.

2.8.6: Disk Quotas

Disk Quotas can be used by administrators to control how much disk space is allocated to users on NTFS volumes and can be allocatedon a per-user basis or a per-volume basis. The user is charger for every file that they own and the uncompressed file size is used to calculate their disk quota usage. The Administrator can set the disk quota level and the disk quota warning level on the QUOTA tab of the PROPERTIES dialog box for the DISK (See Figure 2.1). When the disk quota level is set, a warning is sent to the user indicating that they have almost reached their disk quota. When a use exceeds their disk quota, they receive an error message stating that the disk is full. When this occurs the user must either:

Figure 2.1: The Quota Tab of the Properties Dialog Box

  • Delete some of their files
  • Have someone else take ownership of some of their files
  • Have the administrator increase their disk quota.

2.8.7: Using Disk Defragmenter

Windows XP Professional saves files and folders in the first available space on a hard disk and not necessarily in an area of contiguous space. This results in file and folder fragmentation. When the hard disk contains a large percentage of fragmented files and folders, it takes longer to gain access to them because it requires several additional reads to access all the parts of the file or folder. Creating new files and folders also takes longer because the available free space on the hard disk is scattered, thus the computer saves a new file or folder in various locations on the hard disk.

The process of consolidating fragmented files and folders is called defragmenting. You can use Disk Defragmenter to defragment a hard drive. Disk Defragmenter locates fragmented files and folders and moves each piece of the file or folder to one location so that each file or folder occupies a single, contiguous space on the hard disk. This re-optimizes your computers. By consolidating files and folders, Disk Defragmenter also consolidates free space, making it less likely that new files will be fragmented. Disk Defragmenter can defragment FAT, FAT32, and NTFS volumes.

To open Disk Defragmenter:

  • Click on START
  • Point to PROGRAMS
  • Point to ACCESSORIES
  • Point to SYSTEM TOOLS
  • Click DISK DEFRAGMENTER

Defrag.exe, a command-line version of Disk Defragmenter is also available in Windows XP Professional. You can use the command-line version in a batch process that is to be executed when the disk is not in use. To use Defrag.exe do the following:

  • At a command prompt, change to the disk that you want to defragment.
  • Type defrag <voiume> where volume is the driver letter or mount point.
  • To exit the command prompt window, type exit.

Table 2.4: Defrag.exe Command-line Switches

Switch Function
/a Analyze the hard disk for fragmenataion.
/f Force defragmentation even if free space is low.
/v Verbose output.
/? Display a list of Defrag.exe switches.

2.8.8: Backing Up and Restoring Data

Performing regular back ups of the data on hard disks prevents data loss due to disk drive failures, power outages, virus infections, and other such incidents. If data loss occurs, and you have performed regular backup jobs, you can restore the lost data.

Windows XP Professional provides Backup And Recovery Tools. This includes the Backup Wizard, which you can use to easily back up and restore data. To launch Backup

  • Click on the start button
  • Point to PROGRAMS
  • Point to ACCESSORIES
  • Point to SYSTEM TOOLS
  • Click BACKUP

Alternatively:

  • Click on the start button
  • Click RUN
  • Type ntbackup in the text box
  • Click OK

You can use Backup to back up data manually or you can schedule regular unattended backup jobs. You can back up data to a file or to a tape. Files can be stored on hard disks, removable disks, and recordable compact discs and optical drives.

To successfully back up and restore data on a Windows XP Professional computer, you must have the appropriate permissions and user rights

  • All users can back up their own files and folders, and files for which they have the Read, Read & Execute, Modify, or Full Control permission.
  • All users can restore files and folders for which they have the Write, Modify, or Full Control permission.
  • By default, members of the Administrators and Backup Operator's groups have the Backup Files and Directories, and the Restore Files and Directories user rights and can therefore back up and restore all files regardless of the assigned permissions.

2.8.8.1: Backup Types

Backup Wizard provides five types of backup that define which data is backed up. Some backup types use backup markers, also known as archive bits, which mark a file as having changed. When a file changes, an attribute is set on the file that indicates that the file has changed since the last backup. When you back up the file, this clears or resets the attribute.

  • Normal - backs up all selected files and folders and does not rely on markers to determine which files to back up. During a normal backup, any existing marks are cleared and each file is marked as having been backed up. Normal backups speed up the restore process because the as the files are the most current therefore you do not need to restore multiple backup jobs.
  • Copy - backs up all selected files and folders without looking for or clearing markers.
  • Incremental - only backs up selected files and folders that have a marker and then clears the markers. Thus, if you did two incremental backups in a row on a file and nothing changed in the file, the file would not be backed up the second time.
  • Differential - only backs up selected files and folders that have a marker but does not clear markers. Thus if you did two differential backups in a row on a file and nothing changed in the file, the entire file would be backed up each time.
  • Daily - backs up all selected files and folders that have changed during the day and does not look for or clear markers.

2.8.8.2: Backing Up System State Data

You can use the Backup utility to back up the system state data. The system state data includes: the Registry; Component Services Class Registration database; System startup files; Certificate Services database; Active Directory directory services; and the Sysvol folder.

To back up the system state data on a local computer, do one of the following:

  • In the Backup wizard, on the What To Back Up page, click Only Back Up The System State Data.
  • In the Backup wizard, on the Items To Back Up page, expand My Computer, and then select the check box to the left of System State.
  • In the Backup utility, on the Backup tab, expand My Computer, and then select the System State check box.

2.8.8.3: Restoring Files and Folders

You can use the Backup utility in Windows XP Professional to restore files and folders. The Backup utility includes a Restore wizard that steps you through the entire restore process. However, you can also restore files and folders without using the wizard.

To restore files and folders without using the wizard, open the Backup utility, and specify the folders or files to restore; a restore location; and the Restore options, such as whether to replace existing files with backup files.

Note: To avoid data loss and to preserve file and folder features, such as encryption and permissions, you should not restore data that is archived from a NTFS version 5 volume to a FAT, FAT32 or NTFS version 4 volume.