Home | Files | Attributes | Concepts | Glossary

# File - $BadClus (8)

Previous Next

## Overview

This Metadata file contains a list of all the bad clusters on the volume. The file is sparse, with the only data runs pointing at bad clusters. Naturally the file cannot be read.

## Attributes

Type | Description | Name
--- | --- | ---
0x10 | $STANDARD_INFORMATION |
0x30 | $FILE_NAME | $BadClus
0x80 | $DATA | [Unnamed]
0x80 | $DATA | $Bad

## Layout

### Unnamed Data Stream

This is always zero length.

### $Bad Data Stream

It is a file the size of the volume. Any cluster that is OK, is represented by a sparse (zero) cluster. Any bad cluster points to that cluster on disk.

## Notes

### Other Information

A cluster is bad if it contains at least one bad sector. Because this system file works as any other file, all the bad clusters are marked as used in the $Bitmap system file, so they can never ever be used by any other file.

NTFS support hot-fixing: no more FAT's "Abort, Retry, Fail?". If a new bad cluster is found while the system is running, it is silently added to this file. If the cluster was on a fault tolerant volume, ftdisk (the fault tolerant volume driver) reconstitutes the data and NTFS stores them in another free cluster.

- Has an empty unnamed data stream.
- Has a named ($Bad) data stream, the size of the volume (sparse)
- entire volume of clusters (VCN)
- allocated size = volume size (bytes)
- attribute size = volume size (bytes)
- initialised size = 0 (or is one of above, redundant)
- runs imply sparse file size of volume
- initialised = 0 implies completely sparse

This file deals with Clusters not sectors. The Cluster is the smallest unit of disk space that NTFS will use.

Copyright (C) Validate HTML Validate CSS