NTFS: A File System with Integrity and Complexity

Glossary of NTFS Terms

  • Sector – A low level unit of storage on a disk.
    Traditionally 512 bytes, now moving to 4096 bytes
  • Cluster – A unit of disk space on a file system that
    consists of multiple sectors
  • File system – a method of organizing and storing
    files and data
  • Partition – A logical division of a hard disk’s data
    that is formatted with and holds the file system
  • MBR – The master boot record is both a sector and a
    partition and holds OS boot information
  • Metadata – Attributes that help describe file data,
    such as owner, size, creation date, file type, etc.
  • MFT – The Master File Table is the primary metadata
    file that defines an NTFS volume or partition
  • Basic
    disk
    – A basic disk or basic volume is a simple storage type used by
    Windows
  • Dynamic
    disk
    – Dynamic disks are a more advanced storage type used by Windows. Useful
    when a system has many disks. They offer features that basic disks do not such
    as spanning, striping, and RAID
  • GUID
    partition table
    (GPT) – The GPT is a new disk architecture that expands
    on the MBR and allows for very large file systems
  • Slack
    – Wasted space due to the cluster size of a file system

A File System of Files

NTFS is a file system that is built using files. The primary file is the Master File Table, or MFT. It is the top metadata file and either contains or points to all other NTFS files. The partition file list, the volume information, cluster allocations are each files. One exception is the Master Boot Record. It is a system partition, not a file. It must be loaded by Windows before the file system is initialized.

Fill Your Quota

NTFS quotas
are a means of insuring that some users don’t hog the disk and also for
monitoring disk usage. Disk quotas are generally most useful on servers with
multiple users but you could use a quote to provide a warning before your home
PC disk fills up or keep your family members from filling up the disk.

Disk quotas can be created per user per volume. You can set
a warning to be issued when disk usage exceeds a threshold. The warning can be
issued to the user by email and to the administrator by log entry. You can also
set a hard quota limit. Once a user exceeds the hard limit they cannot save a
file until one of three things occurs: the user deletes files, another user
takes ownership of some files, or the admin increases the user’s quota. When
quotas are set, a free space check will reflect only that user’s quota.

To access quotas on a PC: From Explorer, right click on the top of a disk volume,
E.G., Local Disk (C:). Select Properties, Quota, Show Quota Settings.

To access quotas on a server: Open gpedit.msc, the Group Policy Editor. Navigate to
Computer Configuration, Administrator Templates, System, then Disk Quotas. On
the right hand side, double click on Default Quota Limit and Warning Level
Properties.

It is considered a best practice to notify users before
applying quotas and providing them with some sort of backup or archiving
strategy. Some users take quotas very personally. Turning quotas on does
increase processing overhead slightly, so use it wisely.

Admins can track quota events in the Event Logs. To do this,
select Control Panel, System and Security, Administrative Tools, View Event
Logs.

Better Backups with Shadow Copy

Released with Windows Server 2003 and improved in Windows Server 2008, shadow
copy
enables better backups. When Microsoft released Vista and Windows Server 2008 it replaced the venerable NTBackup utility with WBAdmin, or Windows Backup and Restore Center. This is also called Complete PC Backup or Windows Server Backup. The new backup system uses the Virtual Snapshot Service which in turn relies on NTFS Shadow Copy features.

Shadow copies provide the ability to take a file system snapshot without having to deal with the issue of file contents changing during the backup. Shadow copies also circumvent the problem of files being locked during a backup. Admins no longer need to take a server down to free the file system from the file locks of pesky users. Downtime affects productivity, and under ideal conditions, productivity means money.

Normally shadow copies don’t need maintenance but you can use the vssadmin to create, delete, and list shadow copies. Click on the Windows start icon (lowest left), type CMD into the Search Programs and Files line, Under the Programs line, right click on cmd.exe and select Run as Administrator. On the command line type:

vssadmin list providers

If you are running on Windows Server you can create a new volume shadow copy by typing (replace vol with the volume id):

vssadmin create shadow /for=<vol>:

If you are running Windows Server 2008 or later you can use the diskshadow command line utility to script VSS operations.

File Compression Made Easy

Remember how popular Stacker was in past decades? No? Stacker was a 3rd party add-on that made it possible to double the effective space on your disk for text and office files. It was simple to install, transparent to use, and so cool that Microsoft put them out of business by adding file
compression
to Windows. Big
lawsuit
.

Under NTFS it is possible to set compression for a specific file, a specific folder, or a folder and all sub-folders beneath it.

To access compression: From Explorer, right click on a folder or file and select Properties, then the General tab, then the Advanced button. Under Compress of Encrypt attributes, select Compress contents to save disk space. When you select a folder, Windows will ask if you want to apply compression just to this folder, or to subfolders and files as well. Once a file or folder is compressed it will be displayed in an alternate color, the default is blue.

NTFS compression uses the LZ77 compression method. Although there are several compression methods that provide higher compression, LZ77 provides a reasonable tradeoff between compression and speed. For non-binary files it is typical to get 2X compression. Although you can compress MP3 files, JPEG images, or video files, LZ77 will not provide better compression. These files are already compressed.

When copying an uncompressed file to a compressed folder, the uncompressed file will stay uncompressed. When copying a compressed file to an uncompressed folder, the compressed file will be uncompressed. Compressed files are uncompressed transparently to the user or the opening application, when accessed.

91 Comments

  1. 2010-11-29 10:17 pm
    • 2010-11-30 12:08 am
      • 2010-11-30 1:36 am
      • 2010-11-30 1:42 am
        • 2010-11-30 11:47 am
          • 2010-11-30 12:20 pm
          • 2010-11-30 5:57 pm
          • 2010-12-01 8:56 pm
    • 2010-11-30 12:09 am
  2. 2010-11-29 10:35 pm
    • 2010-11-29 11:33 pm
      • 2010-11-29 11:59 pm
    • 2010-11-30 3:24 am
      • 2010-11-30 6:45 am
        • 2010-11-30 3:49 pm
  3. 2010-11-29 10:38 pm
  4. 2010-11-29 11:05 pm
    • 2010-11-30 12:43 am
    • 2010-11-30 3:25 pm
      • 2010-12-03 10:38 am
        • 2010-12-04 5:45 pm
  5. 2010-11-29 11:07 pm
    • 2010-11-29 11:40 pm
      • 2010-11-30 6:04 am
  6. 2010-11-29 11:15 pm
  7. 2010-11-29 11:21 pm
    • 2010-11-29 11:30 pm
    • 2010-11-30 12:19 am
      • 2010-11-30 4:48 am
    • 2010-11-30 8:44 am
  8. 2010-11-30 12:00 am
    • 2010-11-30 12:45 am
      • 2010-11-30 8:30 pm
        • 2010-11-30 8:39 pm
    • 2010-11-30 1:58 pm
  9. 2010-11-30 12:12 am
    • 2010-11-30 6:12 am
  10. 2010-11-30 12:16 am
    • 2010-11-30 3:34 pm
      • 2010-11-30 4:23 pm
      • 2010-12-01 11:20 am
        • 2010-12-01 2:54 pm
          • 2010-12-01 7:01 pm
          • 2010-12-01 9:27 pm
          • 2010-12-01 11:18 pm
          • 2010-12-03 6:41 pm
  11. 2010-11-30 1:27 am
    • 2010-11-30 2:06 pm
    • 2010-11-30 6:08 pm
      • 2010-11-30 8:39 pm
        • 2010-12-01 12:11 am
    • 2010-11-30 6:15 pm
  12. 2010-11-30 1:31 am
  13. 2010-11-30 2:38 am
    • 2010-11-30 12:41 pm
  14. 2010-11-30 2:50 am
    • 2010-11-30 7:48 am
      • 2010-11-30 1:08 pm
        • 2010-11-30 3:46 pm
          • 2010-12-01 12:00 pm
          • 2010-12-01 10:14 pm
    • 2010-11-30 12:44 pm
  15. 2010-11-30 6:01 am
  16. 2010-11-30 7:22 am
    • 2010-11-30 2:09 pm
      • 2010-11-30 6:31 pm
  17. 2010-11-30 8:52 am
    • 2010-11-30 6:18 pm
  18. 2010-11-30 9:55 am
    • 2010-11-30 12:31 pm
      • 2010-12-01 8:45 am
        • 2010-12-01 12:02 pm
          • 2010-12-01 6:57 pm
  19. 2010-11-30 10:27 am
  20. 2010-11-30 10:57 am
    • 2010-11-30 8:10 pm
      • 2010-11-30 8:27 pm
        • 2010-12-01 10:28 pm
  21. 2010-11-30 11:39 am
    • 2010-11-30 8:14 pm
      • 2010-11-30 8:38 pm
        • 2010-11-30 8:51 pm
        • 2010-11-30 8:52 pm
        • 2010-11-30 9:06 pm
  22. 2010-11-30 12:33 pm
  23. 2010-11-30 1:55 pm
  24. 2010-11-30 8:59 pm
    • 2010-11-30 9:09 pm
  25. 2010-12-01 3:04 pm
  26. 2010-12-02 12:36 pm
    • 2010-12-02 6:50 pm