Format and Partitions.ppt

Document Sample
Format and Partitions.ppt Powered By Docstoc
					               Chapter 3

            Disks and Formatting




9/30/2009          G. DeRoest      1
                Outcomes
• Describe the structure of a disk
• Differentiate between internal and external
  commands
• Use the FORMAT command with various
  fixed and variable parameters
• Use LABEL and VOL commands


9/30/2009           G. DeRoest                  2
9/30/2009   G. DeRoest   3
               Disk Formatting
• Physical Formatting
     – Sequentially numbered tracks and sectors are
       created
• Logical Formatting
     – File system organization to keep track of files
       stored on the disk



9/30/2009                 G. DeRoest                     4
                         Physical FORMATTING




                                    512 BYTES



9/30/2009   G. DeRoest                         5
                         000
                         001
                         010
                         011
                         100
                         …
9/30/2009   G. DeRoest         6
                         Logical FORMATTING




                                   Cluster




9/30/2009   G. DeRoest                        7
             FAT Cluster Size

Disk Size          Sectors in Cluster Cluster Size
3.5-inch 1.44 MB   1                  512
3.5-inch 2.88 MB   2                  1,024
32-63MB            2                  1,024
64-127 MB          4                  2,048
128-255 MB         8                  4,096
1024-2048 MB       64                 32,768



9/30/2009               G. DeRoest                   8
            A File
0110011101010000111111
0000000000000000000001
1110101000101101010101
0100101000111110101010
00101000111111000
9/30/2009    G. DeRoest   9
            A File
0110011101010000111111
0000000000000000000001
1110101000101101010101
0100101000111110101010
00101000111111000
9/30/2009    G. DeRoest   10
            Disk Formatting
• Sector - 512 bytes of floppy disk space
• Cluster – 1 or more sectors grouped
  together for access by the file system
• Cluster overhang – space remaining within
  a cluster, not used by a saved file



9/30/2009          G. DeRoest                 11
             Cluster Overhang
200                                   312
byte                                bytes of
file                                wasted
                                     space




                 512 byte cluster
 9/30/2009           G. DeRoest        12
                         Boot Record

                         Root Directory

                         FAT #1

                         FAT #2

                         Data Storage


9/30/2009   G. DeRoest                 13
9/30/2009   G. DeRoest   14
             FAT, VFAT, FAT32
• File Allocation Table
     – 65,536 clusters max
     – 2.1 GB disk partition
     – 512 root directory entries
• Virtual FAT
     – Windows 95
     – Supporting long file names
• 32 bit FAT
     – Windows 95 B , Windows 98
     – 2 terabyte disk partition
     – 64,000+ root directory entries
9/30/2009                    G. DeRoest   15
            FAT Components
                 Boot Record

            File Allocation Table #1

            File Allocation Table #2

                Root Directory

               File Storage Area

9/30/2009            G. DeRoest        16
                    Practical FAT
                          Root Directory
Name        Extension    Date            Time               Size      Start
                                                                      Cluster
Letter      DOC          10/23/04        11:13 PM           42,347    1
Stocks      XLS          4/23/04         7:35 AM            100,288   3


                                FAT
               Cluster      Pointer             DATA
               1            2                   Letter.doc
               2            EOF                 Letter.doc
               3            5                   Stocks.xls
               4            EOF                 Stuff.txt

9/30/2009                          G. DeRoest                                   17
                    NTFS

•   Secure file system
•   More efficient storage
•   Faster access
•   Journaling provides better recovery
•   File compression and encryption
•   Quotas

9/30/2009             G. DeRoest          18
                        NTFS
               Partition Boot Information


                   Master File Table
               Database file – each file or
                  directory is a record
            System Files and Folders (extent)


9/30/2009                 G. DeRoest            19
                          NTFS
Partition Size   Cluster Size in Bytes   Sectors per Cluster
0-512            512                     1
513-1,024        1,024                   2
1,025-2048       2,048                   4
2,049-4,086      4,096                   8
4,097-8,192      8,192                   16
8,193-16,384     16,384                  32
16,385-32,768    32,768                  64
-16 exabytes     65,536                  128
   9/30/2009               G. DeRoest                   20
                 Compare NTFS and FAT
FS          Partition Size   Cluster Size in   Sectors per
                             Bytes             Cluster
NTFS 1,025-2,048 MB 2,048                      4
FAT         1,025-2,048 MB 32,768              64




     9/30/2009                   G. DeRoest                  21
          Primary 1   Hard Disk Organization


                           Primary 2




                                           Primary 3




                                                           Primary 4
MBR                                                    Extended
 512                                                   Partition        Logical
bytes                    Boot                                          Partitions
                        Sector
  9/30/2009                            G. DeRoest                            22
            FORMAT.COM

• External command
• Located at
    C:\WINDOWS\SYSTEM32\FORMAT.COM




9/30/2009        G. DeRoest          23
                                  FORMAT.COM /?
Formats a disk for use with Windows 2000, XP, Vista.
FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]
FORMAT volume [/V:label] [/Q] [/F:size]
FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors]
FORMAT volume [/V:label] [/Q] [/1] [/4]
FORMAT volume [/Q] [/1] [/4] [/8]
volume - Specifies the drive letter (followed by a colon), mount point, or volume name.
/FS:filesystem Specifies the type of the file system (FAT, FAT32, or NTFS).
/V:labelSpecifies the volume label.
/Q Performs a quick format.
/C Files created on the new volume will be compressed by default.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would no longer be valid.
/A:size Overrides the default allocation unit size. Default settings are strongly recommended for general use.
NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.
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). Note that the FAT and FAT32 files
systems impose the below restrictions on the number of clusters on a volume:
FAT: Number of clusters <= 65526 FAT32: 65526 < Number of clusters < 268435446
Format will immediately stop processing if it decides that the above requirements cannot be met using the specified cluster size.
NTFS compression is not supported for allocation unit sizes above 4096.
/F:sizeSpecifies the size of the floppy disk to format (160, 180, 320, 360, 640, 720, 1.2, 1.23, 1.44, 2.88, or 20.8).
/T:tracksSpecifies the number of tracks per disk side.
/N:sectorsSpecifies the number of sectors per track.
/1 Formats a single side of a floppy disk.
/4 Formats a 5.25-inch 360K floppy disk in a high-density drive.
/8 Formats eight sectors per track.



      9/30/2009                                                G. DeRoest                                                           24
              FORMAT.COM
C:\>        FORMAT   E:
C:\>        FORMAT   E:   /Q
C:\>        FORMAT   E:   /V:CIS140
C:\>        FORMAT   E:   /FS:FAT32
C:\>        FORMAT   E:   /U   -- Discontinued




9/30/2009             G. DeRoest             25
                   VOL
Displays the disk volume label and serial
number, if they exist.
VOL [drive:]

C:\> VOL
C:\> VOL C:
C:\> VOL B:            -- Error

9/30/2009           G. DeRoest              26
                 LABEL
Creates, changes, or deletes the volume label
of a disk.
LABEL [drive:][label]

C:\> LABEL E:
C:\> LABEL E:DATA
C:\> LABEL E:DATA DISK

9/30/2009           G. DeRoest                  27

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:7/23/2013
language:English
pages:27