Tuesday, February 17, 2015

Command Line Formatting For ReadyBoost

After purchasing a fast 120GB USB drive, I found it was formatted as FAT.  I attempted to format it as exFAT via the Windows Explorer in Windows 8.1, and Windows Explorer repeatedly crashed.  I was able to format the USB drive from a command prompt.

Open a command prompt by pressing the search icon in the charms bar and type "cmd".  Alternatively press Windows key + x, choose Run, type "cmd".

In the command prompt, type:
M:\>format /FS:exfat /A:4096 L:
Insert new disk for drive L:
and press ENTER when ready...
The type of the file system is FAT32.
The new file system is EXFAT.
Verifying 119.2 GB
4 percent completed.


4096 is the allocation size. This is not the size of the entire USB drive.

After a long-running verify process (/Q may be useful), the command prompt will look like:
M:\>format /FS:exfat /A:4096 L:
Insert new disk for drive L:
and press ENTER when ready...
The type of the file system is FAT32.
The new file system is EXFAT.
Verifying 119.2 GB
Volume label (11 characters, ENTER for none)?
Initializing the File Allocation Table (FAT)...
Creating file system structures.
Format complete.
     119.1 GB total disk space.
     119.1 GB are available.

        4,096 bytes in each allocation unit.
   31,217,972 allocation units available on disk.

           32 bits in each FAT entry.

Volume Serial Number is 38E3-EE45


A subsequent quick reformat was indeed quick.
Through driver properties, ReadyBoost was set to use the entire device.
L:\>dir
 Volume in drive L is New Volume
 Volume Serial Number is 2EBF-E89F

 Directory of L:\

2015.02.18  12:31 AM    34,359,738,368 ReadyBoost.sfcache
               1 File(s) 34,359,738,368 bytes
               0 Dir(s)  93,608,476,672 bytes free



From the help of the format command, this is the description about allocation size:
  /A:size         Overrides the default allocation unit size. Default settings
                  are strongly recommended for general use.
                  ReFS supports 4096, 64K.
                  NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
                  128K, 256K, 512K, 1M, 2M.
                  FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
                  (128K, 256K for sector size > 512 bytes).
                  FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
                  (128K, 256K for sector size > 512 bytes).
                  exFAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
                  128K, 256K, 512K, 1M, 2M, 4M, 8M, 16M, 32M.

No comments:

Post a Comment