■ Perform A Quick Format Tells Windows Server 2012 R2 to format without checking the partition for errors. With large partitions, this option can save you a few minutes. However, it’s more prudent to check for errors, which allows Disk Management to mark bad sectors on the disk and lock them out.
When you’re ready to proceed, tap or click OK. Because formatting a partition destroys any existing data, Disk Management gives you one last chance to cancel the procedure. Tap or click OK to start formatting the partition. Disk Management changes the drive’s status to reflect the formatting and the percentage of completion. When formatting is complete, the drive status changes to reflect this.
Compressing drives and data
When you format a drive for NTFS, Windows Server 2012 R2 allows you to turn on the built-in compression feature. With compression, all files and directories stored on a drive are automatically compressed when they’re created. Because this compression is transparent to users, compressed data can be accessed just like regular data. The difference is that you can store more information on a compressed drive than you can on an uncompressed drive.
IMPORTANT File explorer shows the names of compressed resources in blue. It’s also important to point out that ReFS does not support NTFS compression.
REAL WORLD Although compression is certainly a useful feature when you want to save disk space, you can’t encrypt compressed data. Compression and encryption are mutually exclusive alternatives for NTFS volumes, which means you have the choice of using compression or using encryption. You can’t use both techniques. For more information on encryption, see “Encrypting drives and data” later in this chapter. If you try to compress encrypted data, Windows Server 2012 R2 automatically decrypts the data, and then compresses it. Likewise, if you try to encrypt compressed data, Windows Server 2012 R2 uncompresses the data, and then encrypts it.
Compressing drives
To compress a drive and all its contents, follow these steps:
1. In File Explorer or Disk Management, press and hold or right-click the drive you want to compress, and then tap or click Properties.
2. On the General tab, select Compress Drive To Save Disk Space, and then tap or click OK.
3. In the Confirm Attribute Changes dialog box, select whether to apply the changes to subfolders and files, and then tap or click OK.
Compressing directories and files
If you decide not to compress a drive, Windows Server 2012 R2 lets you selectively compress directories and files. To compress a file or directory, follow these steps:
1. In File Explorer, press and hold or right-click the file or directory you want to compress, and then tap or click Properties.
2. On the General tab of the Properties dialog box, tap or click Advanced. In the Advanced Attributes dialog box, select the Compress Contents To Save Disk Space check box. Tap or click OK twice.
For an individual file, Windows Server marks the file as compressed, and then compresses it. For a directory, Windows Server marks the directory as compressed and then compresses all the files in it. If the directory contains subfolders, Windows Server displays a dialog box that allows you to compress all the subfolders associated with the directory. Simply select Apply Changes To This Folder, Subfolders, And Files, and then tap or click OK. After you compress a directory, any new files added or copied to the directory are compressed automatically.
NOTE If you move an uncompressed file from a different drive, the file is compressed. However, if you move an uncompressed file to a compressed folder on the same NTFS drive, the file isn’t compressed. Note also that you can’t encrypt compressed files.
Expanding compressed drives
File Explorer shows the names of compressed files and folders in blue. You can remove compression from a drive by following these steps:
1. In File Explorer or Disk Management, press and hold or right-click the drive that contains the data you want to expand, and then tap or click Properties.
2. Clear the Compress Drive To Save Disk Space check box, and then tap or click OK.
3. In the Confirm Attribute Changes dialog box, select whether to apply the change to subfolders and files, and then tap or click OK.
TIP Windows always checks the available disk space before expanding compressed data. You should, too. If less free space is available than used space, you might not be able to complete the expansion. For example, if a compressed drive uses 150 GB of space and has 70 GB of free space available, you won’t have enough free space to expand the data. Generally, you need about 1.5 to 2 times as much free space as you have compressed data.
Expanding compressed directories and files
If you decide that you want to expand a compressed file or directory, follow these steps:
1. Press and hold or right-click the file or directory in File Explorer, and then tap or click Properties.
2. On the General tab of the Properties dialog box, tap or click Advanced. Clear the Compress Contents To Save Disk Space check box. Tap or click OK twice.
With files, Windows Server removes compression and expands the file. With directories, Windows Server expands all the files within the directory. If the directory contains subfolders, you also have the opportunity to remove compression from the subfolders. To do this, select Apply Changes To This Folder, Subfolders, And Files when prompted, and then tap or click OK.
TIP Windows Server also provides command-line utilities for compressing and uncompressing data. The compression utility is called Compact (Compact.exe). The uncompression utility is called expand (expand.exe).
Encrypting drives and data
NTFS has many advantages over other file systems you can use with Windows Server. One advantage is the capability to automatically encrypt and decrypt data by using the Encrypting File System (EFS). When you encrypt data, you add an extra layer of protection to sensitive data, and this extra layer acts as a security blanket blocking all other users from reading the contents of the encrypted files. Indeed, one of the great benefits of encryption is that only the designated user can access the data. This benefit is also a disadvantage in that the user must remove encryption before authorized users can access the data.
NOTE As discussed previously, you can’t compress encrypted files. The encryption and compression features of NTFS are mutually exclusive. You can use one feature or the other, but not both. Note also that ReFS doesn’t support this type of encryption.