Managing MBR Disk Partitions on Basic Disks

A disk using the MBR partition style can have up to four primary partitions and up to one extended partition. This allows you to configure MBR disks in one of two ways: using one to four primary partitions or using one to three primary partitions and one extended partition. After you partition a disk, you format the partitions to assign drive letters or mount points.

Creating a Primary or Extended Partition

In Disk Management you can create primary or extended partitions using Graphical View. The steps you use to create primary and extended partitions are as follows:

  1. In Disk Management Graphical View, right-click an area marked Unallocated on a basic disk, and then choose New Partition. This starts the New Partition Wizard, as shown in Figure 19-4. To continue, click Next.

    The New Partition Wizard guides you through the process of creating partitions

    Figure 19-4. The New Partition Wizard guides you through the process of creating partitions

  2. As shown in Figure 19-5, you can select a partition type. As discussed previously, a disk can have up to four primary partitions or three primary partitions and one extended partition. Keep the following in mind:

    • You can size a primary partition to fill an entire disk, or you can size it as appropriate for the system you're configuring. Because of the availability of FAT32 and NTFS, you no longer must worry about the 4-GB volume size and 2-GB file size limits that applied to 16-bit FAT systems. This allows you to size partitions as you see fit.

    • You can size extended partitions to fill any available unallocated space on a disk. Because an extended partition can contain multiple logical drives, each with their own file system, consider carefully how you might want to size logical drives before creating the extended partition. Additionally, if a drive already has an extended partition or is removable, you won't be able to create an extended partition.

    Select the type of partition as either primary or extended

    Figure 19-5. Select the type of partition as either primary or extended

  3. Click Next to display the Specify Partition Size page, as shown in Figure 19-6. Then use the Amount Of Disk Space To Use field to specify how much of the available disk space you want to use for the partition. Click Next again.

    Size the partition appropriately

    Figure 19-6. Size the partition appropriately

  4. If you are creating a primary partition, use the Assign Drive Letter Or Path page, as shown in Figure 19-7, to assign a drive letter or path. You can do one of the following:

    • Assign a drive letter by choosing Assign The Following Drive Letter To and then selecting an available drive letter in the selection list provided. Generally, the drive letters E through Z are available for use (drive letters A and B are used with floppy/Zip drives, drive C is for the primary partition, and drive D is for the computer's CD/DVD-ROM drive).

    • Mount a path by choosing Mount In The Following Empty NTFS Folder and then typing the path to an existing folder. You can also click Browse to search for or create a folder.

    • Use Do Not Assign A Drive Letter Or Drive Path To if you want to create the partition without assigning a drive letter or path.

    Specify how the partition should be used

    Figure 19-7. Specify how the partition should be used

  5. Using the Format Partition page, as shown in Figure 19-8, you can opt to not format the partition at this time or to select the formatting options to use. Formatting creates a file system in the new partition and permanently deletes any existing data. The formatting options are as follows:

    • File System sets the file system type as FAT, FAT32, or NTFS. FAT volumes can be up to 4 GB in size and have a maximum file size limit of 2 GB. FAT32 volumes can be up to 32 GB in size (a limitation of Windows Server 2003) and have a maximum file size of 4 GB. NTFS files and volumes can be up to 2 TB in size on MBR disks and up to 18 EB on GPT disks.

      Format the partition now or opt to format the partition later

      Figure 19-8. Format the partition now or opt to format the partition later

      Tip

      Choose the partition format with care

      If you don't know which file system to use, it is best in most cases to use NTFS. Only NTFS volumes can also use advanced file access permissions, compression, encryption, disk quotas, shadow copies, remote storage, and sparse files. There are exceptions, of course. If you want to be able to boot multiple operating systems, you might want to use FAT or FAT32. When a boot partition is formatted using FAT, you are able to boot to just about any operating system. When a boot partition is FAT32, you are able to boot to any version of the Windows operating system except Windows NT 4 and Microsoft Windows 95 OSR1. Further, because FAT32 doesn't have the journaling overhead of NTFS, it is more efficient at handling large files that change frequently, and particularly files that have small incremental changes, such as log files. This means in some cases that FAT32 will read and write files faster than NTFS. However, if you use FAT32, you won't be able to use any of the advanced file system features of Windows Server 2003.

    • Allocation Unit Size sets the cluster size for the file system. This is the basic unit in which disk space is allocated, and by default, it is based on the size of the volume.

      Tip

      Choosing an allocation unit size

      In most cases the default size is what is best but you can override this feature by setting a different value. If you use lots of small files, you might want to use a smaller cluster size, such as 512 or 1024 bytes. With these settings, small files use less disk space. While sizes of up to 256 KB are allowed, you will not be able to use compression on NTFS if you use a size larger than 4 KB.

    • Volume Label sets a text label for the partition that is used as its volume name. If you must change a partition's volume label, you can do this from the command line by using the LABEL command or from Windows Explorer by right-clicking the volume, selecting Properties, and then typing a new label in the General tab.

    • Perform A Quick Format specifies that you want to format the partition without checking for errors. Although you can use this option to save you a few minutes, it's better to check for errors because this allows Disk Management to mark bad sectors on the disk and lock them out.

    • Enable File And Folder Compression turns on compression so that files and folders on this partition are compressed automatically. Compression is available only for NTFS. For more information about using compression, see the section entitled "Using File-Based Compression".

  6. Click Next. The final page shows you the options you've selected. If the options are correct, click Finish. The wizard then creates the partition and configures it.

Note

If you add partitions to a physical drive that contains the Windows Server 2003 operating system, you might inadvertently change the number of the boot partition. Windows Server 2003 will display a prompt warning you that the number of the boot partition will change. Click Yes to confirm this change. In most cases, Windows Server 2003 will make the appropriate changes in Boot.ini to ensure the system can be booted. To be sure, however, you should examine the Boot.ini file. It is located on the root directory of the system drive. You can determine the system drive by typing set systemdrive at the command prompt.

Creating a Logical Drive in an Extended Partition

In Disk Management, you can create a logical drive within an extended partition by completing the following steps:

  1. In Disk Management Graphical View, right-click an area marked Free Space in the extended partition, and then choose New Partition. This starts the New Partition Wizard, as shown previously in Figure 19-4. Click Next.

  2. As shown in Figure 19-9, the only option you have for partition type is Logical Drive, which is what you want to use, so click Next.

    Select the partition type

    Figure 19-9. Select the partition type

  3. Use the Assign Drive Letter Or Path page to assign a drive letter or path. You can also choose Do Not Assign A Drive Letter Or Drive Path To if you want to create the partition without assigning a drive letter or path. Click Next.

  4. Using the Format Partition page to set the formatting options or opt not to format the partition at this time. Click Next.

  5. The final page shows you the options you've selected. If the options are correct, click Finish. The wizard then creates the logical drive and configures it. If you want to create additional logical drives on the extended partition, repeat these steps.

Formatting a Partition, Logical Drive, or Volume

Before a primary partition, logical drive, or volume can be used, it must be formatted. Formatting creates the file structures necessary to work with files and folders. If you want to clean out a partition, logical drive, or volume and remove all existing data, you can use formatting to do this as well.

Tip

You need not format if you want to convert to NTFS

Although you can use formatting to change the type of file system, you don't have to do this to change from FAT or FAT32 to NTFS. Instead, to convert to NTFS you can use the CONVERT command, which preserves any existing data. For more information about CONVERT, see the section entitled "Converting FAT or FAT32 to NTFS" earlier in this chapter.

To format a primary partition, logical drive, or volume, follow these steps:

  1. In Disk Management, right-click the primary partition, logical drive, or volume you want to format, and then choose Format. This displays the Format dialog box, as shown in Figure 19-10.

    Set the formatting options, then click OK

    Figure 19-10. Set the formatting options, then click OK

  2. In the Volume Label box, type a descriptive label for the primary partition, logical drive, or volume. In most cases, you'll want to use a label that helps you and other administrators determine what type of data is stored in the partition or on the logical drive.

  3. Select the file system type as FAT, FAT32, or NTFS. Keep in mind that only NTFS allows you to use the advanced file system features of Windows Server 2003, including advanced file access permissions, compression, encryption, disk quotas, shadow copies, remote storage, and sparse files.

  4. Use the Allocation Unit Size field to specify the basic unit in which disk space should be allocated. In most cases the default size is what is best.

  5. Select Perform A Quick Format if you want to format the partition without checking for errors. Although this option can save you a few minutes, Disk Management won't mark bad sectors on the disk or lock them out, and this can lead to problems with data integrity later on.

  6. If you want files and folders to be compressed automatically, select Enable File And Folder Compression. Compression is available only for NTFS; you can learn more about compression in the section entitled "Using File-Based Compression".

  7. Click OK to begin formatting using the specified options.

Configuring Drive Letters

Each primary partition, logical drive, or volume on a disk can have one drive letter and one or more drive paths associated with it. You can assign, change, or remove driver letters and mount points at any time without having to restart the computer. Windows Server 2003 also allows you to change the drive letter associated with CD/DVD-ROM drives. You cannot, however, change or remove the drive letter of a system volume, boot volume, or any volume that contains a paging file. Additionally, on GPT disks, you can assign drive letters only to primary partitions. You cannot assign driver letters to other types of partitions on GPT disks.

After you make a change, the new drive letter or mount point assignment is made automatically as long as the volume or partition is not in use. If the partition or volume is in use, Windows Server 2003 displays a warning. You must exit programs that are using the partition or volume and try again or allow Disk Management to force the change by clicking Yes when prompted.

To add, change, or remove a drive letter, right-click the primary partition, logical drive, or volume in Disk Management, and choose Change Drive Letter And Paths. This displays the dialog box shown in the following screen:

image with no caption

Any current drive letter and mount points associated with the selected drive are displayed. You have the following options:

  • Add a drive letter If the primary partition, logical drive, or volume doesn't yet have a drive letter assignment, you can add one by clicking Add. In the Add Drive Letter Or Path dialog box that appears, select the drive letter to use from the drop-down list, and then click OK.

  • Change an existing drive letter If you want to change the drive letter, click Change, select the drive letter to use from the drop-down list, and then click OK. Confirm the action when prompted by clicking Yes.

  • Remove a drive letter If you want to remove the drive letter, click Remove, and then confirm the action when prompted by clicking Yes.

Note

When you change or remove a drive letter, the volume or partition will no longer be accessible using the old drive letter, and this can cause programs using the volume or can cause the partition to stop running.

Configuring Mount Points

Any volume or partition can be mounted to an empty NTFS folder as long as the folder is on a fixed disk drive rather than a removable media drive. A volume or partition mounted in such a way is called a mount point. Each volume or partition can have multiple mount points associated with it. For example, you could mount a volume to the root folder of the C drive as both C:EngData and C:DevData, giving the appearance that these are separate folders.

The real value of mount points, however, lies in how they allow you the capability to create the appearance of a single file system from multiple hard disk drives without having to use spanned volumes. Consider the following scenario: A department file server has four data drives—drive 1, drive 2, drive 3, and drive 4. Rather than mount the drives as D, E, F, and G, you decide it'd be easier for users to work with the drives if they were all mounted as folders of the system drive, C:Data. You mount drive 1 to C:DataUserData, drive 2 to C:Data CorpData, drive 3 to C:DataProjects, and drive 4 to C:DataHistory. If you were then to share the C:Data folder, users would be able to access all the drives using a single share.

Note

Wondering why I mounted the drives under C:Data rather than C: as is recommended in some documentation? The primary reason I did this is to help safeguard system security. I didn't want users to have access to other directories, which includes the operating system directories, on the C drive.

To add or remove a mount point, right-click the volume or partition in Disk Management, and choose Change Mount Point And Paths. This displays the Change Mount Point And Paths dialog box (as shown in the following screen), which shows any current mount point and mount points associated with the selected drive.

image with no caption

You now have the following options:

  • Add a mount point Click Add, then in the Add Drive Letter Or Path dialog box, select Mount In The Following Empty NTFS Folder, as shown in the screen on the following page. Type the path to an existing folder or click Browse to search for or create a folder. Click OK to mount the volume or partition.

    image with no caption
  • Remove a mount point If you want to remove a mount point, select the mount point, and then click Remove. When prompted to confirm the action, click Yes.

Note

You can't change a mount point assignment after making it. You can, however, simply remove the mount point you want to change and then add a new mount point so that the volume or partition is mounted as appropriate.

Extending Partitions on Basic Disks

Extending Partitions on Basic Disks

By using DiskPart, you can extend partitions on basic disks. This is handy if you create a partition that's too small and you want to extend it so you have more space for programs and data. Here's how this feature works: If a disk has free space and has as its last or only partition a nonboot or nonsystem partition that is formatted as NTFS, you can extend the partition to the end of the disk or to fill a designated amount of free space on the disk.

To extend an NTFS-formatted partition, invoke DiskPart by typing diskpart at the command prompt. List the disks on the computer by typing list disk. After you check the free space of each disk, select the disk by typing select disk N, where N is the disk you want to work with. Next, list the partitions on the selected disk by typing list partition. Select the last partition in the list by typing select partition N, where N is the disk you want to work with.

Now that you've selected a partition, you can extend it. To extend the partition to the end of the disk, type extend. To extend the partition a set amount, type extend size=N, where N is the amount of space to add in megabytes. For example, if you want to add 1200 megabytes to the partition, type extend size=1200.

Example 19-2 shows an actual DiskPart session in which a disk is extended. You can use this as an example to help you understand the process of extending basic disks. Here, disk 2 has 19 GB of free space, and its primary partition is extended so that it fills the disk.

Example 19-2. Extending Basic Disks

C:> diskpart

Microsoft DiskPart version 5.2.3790
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: CORPSVR02

DISKPART> list disk

  Disk ###        Status           Size         Free           Dyn      Gpt
  --------        ----------       ------       -------        ---       ---
  Disk 0          Online           56 GB          0 B          *        *
  Disk 1          Online           29 GB          0 B
  Disk 2          Online           37 GB        19 GB

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> list partition

  Partition ###        Type                     Size         Offset
  -------------        ----------------         -------      -------
  Partition 1          Primary                  37 GB        32 KB

DISKPART>    select partition 1

Partition 1 is now the selected partition.

DISKPART> extend

DiskPart successfully extended the partition.

DISKPART> exit

Leaving DiskPart...

C:>

Deleting a Partition, Logical Drive, or Volume

Deleting a partition, logical drive, or volume removes the associated file system and all associated data. When you delete a logical drive, the logical drive is removed from the associated extended partition and its space is marked as free. When you delete a partition or volume, the entire partition or volume is deleted and its space is marked as Unallocated. If you want to delete an extended partition that contains logical drives, however, you must delete the logical drives before trying to delete the extended partition.

In Disk Management, you can delete a partition, logical drive, or volume by right-clicking it and then choosing Delete Partition, Delete Logical Drive, or Delete Volume, as appropriate. When prompted to confirm the action, click Yes. Keep in mind that if you delete a partition on a physical drive that contains the Windows Server 2003 operating system, the number of the boot partition might change. If so, you should check the Boot.ini file to ensure the Windows Server 2003 entry points to the right partition.

Note

In Windows NT and Windows 2000, deleting a partition on a physical drive that contains the operating system is likely to cause the boot partition number to change. In Windows Server 2003, this behavior has been fixed—but better safe than sorry, so I always check the Boot.ini file anyway.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset