Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!
Showing posts with label partition. Show all posts
Showing posts with label partition. Show all posts

Monday, October 18, 2010

Mirroring the boot and system volumes

Source  Win 2k3
Boot and system partitions. You can convert a basic disk containing the system or boot partitions to a dynamic disk. After the disk is converted, these partitions become simple system or boot volumes (after restarting the computer). You cannot mark an existing dynamic volume as active. You can convert a basic disk containing the boot partition (which contains the operating system) to a dynamic disk. After the disk is converted, the boot partition becomes a simple boot volume (after restarting the computer).

Mirroring the boot and system volumes. If you convert the disk containing the boot and system partitions to a dynamic disk, you can mirror the boot and system volumes onto another dynamic disk. Then, if the disk containing the boot and system volumes fails, you can start the computer from the disk containing the mirrors of these volumes. For more information, see Create and test a mirrored system or boot volume.

Converting dynamic disks to basic disks. After you convert a basic disk into a dynamic disk, you cannot change the dynamic volumes back to partitions. Instead, you must move or back up your data, delete all dynamic volumes on the disk and then convert the disk. For more information, see Change a dynamic disk back to a basic disk.

Sunday, October 17, 2010

Dynamic disks and volumes

Source
Dynamic disks provide features that basic disks do not, such as the ability to create volumes that span multiple disks (spanned and striped volumes), and the ability to create fault tolerant volumes (mirrored and RAID-5 volumes). All volumes on dynamic disks are known as dynamic volumes.

There are five types of dynamic volumes: simple, spanned, striped, mirrored, and RAID-5. Mirrored and RAID-5 volumes are fault tolerant and are available only on computers running Windows 2000 Server, Windows 2000 Advanced Server, Windows 2000 Datacenter Server, or Windows Server 2003 operating systems. You can, however, use a computer running Windows XP Professional to remotely create mirrored and RAID-5 volumes on these operating systems.
Regardless of whether the dynamic disk uses the master boot record (MBR) or GUID partition table (GPT) partition style, you can create up to 2,000 dynamic volumes, although the recommended number of dynamic volumes is 32 or less.
For information about how to manage dynamic volumes, see Manage Dynamic Volumes.

Considerations when using dynamic disks and dynamic volumes

When using dynamic volumes, the following considerations apply:
  • Installing Windows Server 2003 operating systems. You can perform a fresh installation of Windows Server 2003 operating systems on a dynamic volume only if that volume was converted from a basic boot volume or basic system volume. If the dynamic volume was created from unallocated space on a dynamic disk, you cannot install Windows Server 2003 operating systems on that volume. This setup limitation occurs because Setup for Windows Server 2003 recognizes only dynamic volumes that have an entry in the partition table. You can, however, extend the volume (if it is a simple or spanned volume). 

    Do not convert basic disks to dynamic disks if they contain multiple installations of Windows 2000, Windows XP Professional, or Windows Server 2003 operating systems. After the conversion, it is unlikely that you will be able to start the computer using that operating system.

    For information about basic volumes, see Basic disks and volumes.

  • Portable computers and removable media. Dynamic disks are not supported on portable computers, removable disks, detachable disks that use Universal Serial Bus (USB) or IEEE 1394 (also called FireWire) interfaces, or on disks connected to shared SCSI buses. If you are using a portable computer and right-click a disk in the graphical or list view in Disk Management, you will not see the option to convert the disk to dynamic.

  • Boot and system partitions. You can convert a basic disk containing the system or boot partitions to a dynamic disk. After the disk is converted, these partitions become simple system or boot volumes (after restarting the computer). You cannot mark an existing dynamic volume as active. You can convert a basic disk containing the boot partition (which contains the operating system) to a dynamic disk. After the disk is converted, the boot partition becomes a simple boot volume (after restarting the computer).

  • Mirroring the boot and system volumes. If you convert the disk containing the boot and system partitions to a dynamic disk, you can mirror the boot and system volumes onto another dynamic disk. Then, if the disk containing the boot and system volumes fails, you can start the computer from the disk containing the mirrors of these volumes. For more information, see Create and test a mirrored system or boot volume.

  • Converting dynamic disks to basic disks. After you convert a basic disk into a dynamic disk, you cannot change the dynamic volumes back to partitions. Instead, you must move or back up your data, delete all dynamic volumes on the disk and then convert the disk. For more information, see Change a dynamic disk back to a basic disk.

  • Shadow copies storage area. If you are using a basic disk as a storage area for shadow copies and you intend to convert the disk into a dynamic disk, it is important to take the following precaution to avoid data loss. If the disk is a non-boot volume and is a different volume from where the original files reside, you must first dismount and take offline the volume containing the original files before you convert the disk containing shadow copies to a dynamic disk. You must bring the volume containing the original files back online within 20 minutes, otherwise, you will lose the data stored in the existing shadow copies. If the shadow copies are located on a boot volume, you can convert the disk to dynamic without losing shadow copies. 

    You can use the mountvol command with the /p option to dismount the volume and take it offline. You can mount the volume and bring it online using the mountvol command or the Disk Management snap-in.

diskpart and mirrored volume

Create a mirrored volume
To create a mirrored volume


  • You need two dynamic disks to create a mirrored volume.
  • You can mirror an existing simple volume.
  • Mirrored volumes are fault tolerant and use RAID-1, which provides redundancy by creating two identical copies of a volume.
  • Mirrored volumes cannot be extended.
  • Both copies (mirrors) of the mirrored volume share the same drive letter.
  • You can create mirrored, striped, spanned and RAID-5 volumes using a combination of MBR and GPT disks, but the MBR cylinder-alignment restriction may cause some difficulties in creating mirrored volumes. Always mirror the MBR disk to the GPT disk to avoid cylinder-alignment difficulties.

  1. Open Command Prompt.
  2. Type: diskpart
  3. At the DISKPART prompt, type:list diskMake note of the disk numbers for the dynamic disks that will make up the mirrored volume.
  4. At the DISKPART prompt, type:select disk n
  5. At the DISKPART prompt, type:create volume simple [size=n] [disk=n]
  6. At the DISKPART prompt, type:add disk n

create volume simpleCreates a simple volume. After you create the volume, the focus automatically shifts to the new volume.
size=nThe size of the volume in megabytes (MB). If no size is given, the new volume takes up the remaining free space on the disk.
disk=nThe dynamic disk on which to create the volume. If no disk is given, the current disk is used.
add disk=nMirrors the simple volume with focus to the specified disk, where n is the disk number. The specified disk must have unallocated space at least as large as the size of the simple volume you want to mirror.
To break a mirrored volume into two volumes

  1. Open Command Prompt.
  2. Type: diskpart
  3. At the DISKPART prompt, type:
    list volume
    Make note of the number of the mirrored volume.
  4. At the DISKPART prompt, type: select volume n
  5. Select the mirrored volume you want to break into two separate volumes.
  6. At the DISKPART prompt, type:
    detail volume
    Make note of the disk number of the mirrored volume you want to break into two separate volumes.
  7. At the DISKPART prompt, type:
    break disk n

Remove a mirror from a mirrored volume

Using a command line

  1. Open Command Prompt.
  2. Type:
    diskpart
  3. At the DISKPART prompt, type:
    list volume
     Make note of the volume number of the mirrored volume.
  4. At the DISKPART prompt, type:
    select volume n
  5. At the DISKPART prompt, type:
    detail volume
     Make note of the disk number that specifies the half of the mirrored volume you want to remove and convert to free space.
  6. At the DISKPART prompt, type:
    break disk n [nokeep]
break disk n
Applies to dynamic disks only. Breaks a mirrored volume into two simple volumes. These volumes are no longer fault tolerant. The disk specified by n receives the focus so you can assign it a drive letter. If the specified disk is the current system or boot disk, the command fails. The other disk retains the drive letter and any mount points that belonged to the mirrored volume.
Using the nokeep parameter, the specified disk, n, is deleted and converted to free space, while the other half of the mirror is retained as a simple volume. Neither volume receives focus.
Nokeep
Specifies that only one of the mirrored volumes retained; the other simple volume is deleted and converted to free space. Neither volume receives the focus.
ImportantOnce you remove a mirror from a mirrored volume, the removed mirror becomes unallocated space and the remaining mirror becomes a simple volume that is no longer fault tolerant. All of the data on the removed mirror is deleted. 

Thursday, October 14, 2010

Managing a mirrored volume

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Source
Create and test a mirrored system or boot volume
To create a mirrored boot volume
Add a mirror to an existing simple volume
Break a mirrored volume into two volumes
Remove a mirror from a mirrored volume
Reconnect the disk and repair the mirrored volume
Reactivate a mirrored volume
Replace a failed mirror with a new mirror on another disk

slower RAID  
Problem removing mirror from missing disk
DiskPart.exewww.microsoft.com/...ID=0FD9788A-5D64-4F57-949F-EF62DE7AB1AE

To create a mirrored volume
Using a command line
  1. Open Command Prompt.
  2. Type:
    diskpart
  3. At the DISKPART prompt, type:
    list disk
     Make note of the disk numbers for the dynamic disks that will make up the mirrored volume.
  4. At the DISKPART prompt, type:
    select disk n
  5. At the DISKPART prompt, type:
    create volume simple [size=n] [disk=n]
  6. At the DISKPART prompt, type:
    add disk n
ValueDescription
list disk
Displays a list of disks and information about them, such as their size, amount of available free space, whether the disk is a basic or dynamic disk, and whether the disk uses the master boot record (MBR) or GUID partition table (GPT) partition style. The disk marked with an asterisk (*) has focus.
select disk
Selects the specified disk, where n is the disk number, and gives it focus.
create volume simple
Creates a simple volume. After you create the volume, the focus automatically shifts to the new volume.
size= n
The size of the volume in megabytes (MB). If no size is given, the new volume takes up the remaining free space on the disk.
disk= n
The dynamic disk on which to create the volume. If no disk is given, the current disk is used.
add disk= n
Mirrors the simple volume with focus to the specified disk, where n is the disk number. The specified disk must have unallocated space at least as large as the size of the simple volume you want to mirror.
Notes
  • To perform this procedure on a local computer, you must be a member of the Backup Operators group, Administrators group, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groupsDefault groups, and Using Run as.
  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.
  • You can create mirrored volumes only on computers running Windows 2000 Server, Windows 2000 Advanced Server, Windows 2000 Datacenter Server, or Windows Server 2003 operating systems.
  • You need at least two dynamic disks to create a mirrored volume.
  • Mirrored volumes are fault tolerant and use RAID-1, which provides redundancy by creating two identical copies of a volume.
  • Mirrored volumes cannot be extended.
  • Both copies (mirrors) of the mirrored volume share the same drive letter.
  • You can create mirrored, striped, spanned and RAID-5 volumes using a combination of MBR and GPT disks, but the MBR cylinder alignment-restriction may cause some difficulties in creating mirrored volumes. Always mirror the MBR disk to the GPT disk to avoid cylinder-alignment difficulties.
  • For more information about DiskPart, see Related Topics.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

diskpart.exe howto

Source
You can use Diskpart to convert a basic disk to a dynamic disk. The basic disk can either be empty or contain either primary partitions or logical drives. The basic disk can be a data disk or system or boot drive
The basic disk cannot have fault-tolerant disk driver (FtDisk) sets such as stripes or mirrors. To convert basic disks that have FtDisk driver sets, use Disk Management on Windows 2000 or convert the disk before you upgrade to Windows XP.

You can use Diskpart to convert a dynamic disk to a basic disk. You must delete any dynamic volumes before the conversion process. It is not recommended that you delete partitions on a dynamic disk except in emergency situations. 

It is recommended that you delete all volumes on the drive, and then convert the disk to basic. You must delete all dynamic data partitions.
 Also, never mix the basic primary and dynamic partitions on the same drive. If you do so, the computer may be unable to restart. 

You can use Diskpart to create a partition at an explicit disk offset. The Disk Management snap-in places the partition at the end of any occupied area or on the first sufficiently large area. On master boot record (MBR) disks, the partition offset and the size are rounded to preserve the required cylinder alignment. Offsets are rounded to the closest valid value, and the size is always rounded up to the next valid value. Diskpart does not assign a drive letter to a newly created partition. 

Use the assign command to assign either a mount point or a drive letter.

Diskpart follows the same policy as the snap-in. Dynamic disks can only be created on fixed disks. You cannot convert removable disks, such as 1394 or universal serial bus (USB) drives, to dynamic disks.
Diskpart permits certain partition deletion operations that are blocked by the snap-in. For example, you can use Diskpart to delete MBR OEM partitions. However, these partitions often contain files that are important to the platform operation. Diskpart blocks the deletion of the current system, boot, or paging volumes and partitions.

 Also, Diskpart blocks deletion of the partitions that underlie dynamic disks.

You cannot use Diskpart to create a partition on removable media. Windows supports at most one MBR partition on removable media. If the media is manufactured with an MBR, that MBR cannot be altered, but the MBR is followed even if multiple partitions or logical drives are configured. If the media is manufactured without an MBR, the media is treated as a "superfloppy" and no partition structure is written to the media.
The drive letter for a removable drive is associated with the drive, and not with the media. You can use Diskpart to change the drive letter.
Diskpart causes disk signatures, GUID partition table (GPT) disk globally unique identifiers (GUIDs), and GPT partition GUIDs to be generated. You cannot explicitly set these items by using Diskpart.
The Diskpart utility (like the snap-in) includes support for the new Itanium disk partition scheme called GPT. You cannot use GPT disks on any x86-based Windows XP-based or Windows 2000-based computers. Diskpart enables the conversion of GPT partitioning to MBR partitioning only for empty disks.
You can use Diskpart to delete missing dynamic disks. Dynamic disks contain a shared database; all of the dynamic disks on a computer have knowledge of all other dynamic disks on that computer. When dynamic disks are moved, the original computer considers theses disks as "missing". 
Drive letters are not automatically assigned when you use Diskpart. To ensure that a given partition or volume has a drive letter, you must explicitly assign a drive letter. You can either assign the drive letter or allow the next available drive letter to be allocated.

Setting Focus

Most Diskpart commands operate on a specific target disk, partition, or volume. The targeted object has "focus." Focus simplifies the common configuration task in which you create multiple partitions on the same disk. An object is put into focus by the select command. All Commands except for list, rem, exit, or help require focus. 

Use the select command to explicitly change the focus. To implicitly change the focus, use a command such as create. You must set the disk focus before you manage a basic disk. On basic disks, the partition focus and volume focus are the same. If you change the focus on one item, you change the focus on the other. On dynamic volumes, only the volume focus is important because the previous partition focus is always lost and the disk focus is only important for simple volumes. 
Consider the following examples of a computer that has two disks:

  • Each disk contains two primary partitions. The first disk contains the C and D partitions; the second disk contains the E and F partitions. You must set the disk focus to disk 1 before you set the partition focus to either the C or D partitions. You can set the volume focus to either the C, D, E, or F partitions at any time. In this example, if you set the volume focus to the C or D partition, the disk focus does not change; however, if you set the volume focus to the E or F partitions, the disk focus may be moved to the other disk.
  • Each disk is dynamic and contains a simple volume and free space. The first disk contains the C partition, and the second disk contains the E partitions. You must set the disk focus before you add a simple volume to the first disk. To extend the C partition, you need to set only the volume focus. Similarly, to add a mirror to the E partition, you need to set only the volume focus to the E partition. If you create a simple volume or extend an existing volume onto the same disk, you do not change the disk focus. If you add a mirror, create a stripe set, or extend an existing volume onto a different disk, you can cause the disk focus to be lost.

Commands to Set Focus


select
Use the select command to set the focus to the specified target. To obtain a list of focus types, leave the Type field blank. If you do not specify an identification (ID) number, the current focus object is displayed.
select disk[=n]
Use the select disk command to set the focus to the disk that has the specified Windows NT disk number. If you do not specify a disk number, the command displays the current in-focus disk.
select partition[=n/l]
Use the select partition command to set the focus to the specified partition. If you do not specify a partition, the current in-focus partition is displayed.
On basic disks, you can specify the partition by either index, drive letter, or mount point. You can only specify the partition by index on dynamic disks.
select volume[=n/l]
Use the select volume command to set the focus to the specified volume. If you do not specify a volume, the command displays the current in-focus volume.
You can specify the volume by either index, drive letter, or mount point path. On a basic disk, if you select a volume, the corresponding partition is put in focus.

Commands to Display Disk Configuration


Use the list command to display a summary. To display more information, set the focus, and then use the detail command.
detail disk

detail volumen
detail partition
list disk
list volumen
list partition
---------------------
active 

Use the active command to set the current in-focus partition to "active." This setting informs the firmware that the partition is a valid system partition. Diskpart does not validate the partition contents. 

NOTE: If you use this command, the computer may be unable to restart. ?????

----------------------
assign [[letter=l]/[mount=path]] [noerr]

Use the assign command to assign a letter or mount point to the current in-focus partition. If you do not specify a drive letter, the next available drive letter is assigned. If the letter or mount point is already in use, an error is generated unless you use the noerr parameter.
You can use this command to change the drive letter that is associated with a removable drive.
The drive letter assignment is blocked on the system, boot, or paging volumes. This command cannot be used to assign a drive letter to an OEM partition or any GPT partition, other than the Msdata partition.
create partition primary [size=n] [offset=n] [id=byte/guid] [noerr]
Use the create partition primary command to create a primary partition of length size and a starting address offset on the current drive.
If an ID byte is not specified on an MBR disk, this command creates a partition with type "0x6." You can use the ID parameter to specify the partition type. There is no validity or other checking of the ID byte.
If you do not specify an ID GUID on a GPT disk, this command creates an Msdata partition. You can use the ID parameter to specify any GUID. There is no validity, duplication, or other checking of the GUID. The partition instance GUID is automatically generated.
MBR and GPT partitions are created so that Windows does not automatically allocate drive letters. You must explicitly assign a drive letter.
create partition extended [size=n] [offset=n] [noerr]
Use the create partition extended command to create an extended partition of length size and starting address offset on the current drive. The drive must be an MBR disk.
After the partition is created, the new extended partition gains the focus. You can create only one extended partition. You can create logical drives only after you create an extended partition.
create partition logical [size=n] [offset=n] [noerr]
Use the create partition logical command to create a logical drive of length size and starting address offset in an existing extended partition on the current disk. The drive must be an MBR disk. 
If an offset is not listed, the logical drive is placed in the first unoccupied contiguous disk extent in the extended partition that is large enough. If a size is not listed, the partition may be extended to occupy the entire extended partition.
After you create the partition, the logical drive gains the partition focus.
create partition msr [size=n] [offset=n] [noerr]

(microsoft reserved)

Microsoft requires an MSR on every GPT disk, and recommends it to be created as the disk is initially partitioned. It should be located after the EFI System Partition (ESP) and any OEM service partitions, but—most importantly—the first data partition must follow it. Initial size of MSR is 32MB on disks smaller than 16 GB, or 128 MB on other disks, although it may later automatically shrink on behalf of other partitions, for example during the conversion from basic disk to dynamic disk

The create partition msr command is the equivalent of creating the partition with the MSR GUID E3C9E316-0B5C-4DB8-817D-F92DF00215AE.
create partition esp [size=n] [offset=n] [noerr]
The create partition esp command is the equivalent of creating the partition with ESP GUID C12A7328-F81F-11D2-BA4B-00A0C93EC93B.
delete partition [noerr] [override]
Use the delete partition command to delete the current in-focus partition.

Diskpart blocks the deletion of the current system, boot, or paging volume. To delete either an ESP, MSR, or a known OEM partition, you must specify the override parameter.

extend [size=n][noerr] 
Use the extend command to cause the current in-focus volume to be extended into contiguous unallocated space. The unallocated space must follow (it must be of higher sector offset than) the in-focus partition. The intended use of this command is to grow an existing basic data partition into newly created space on an extended hardware RAID logical unit number (LUN).
If the partition had been previously formatted with the NTFS file system, the file system is automatically extended to occupy the larger partition, and data loss does not occur. If the partition had been previously formatted with any file system format other than NTFS, the command is unsuccessful and does not change the partition.
Diskpart blocks the extension of only the current system or boot partition.
remove [[letter=l]/[mount=path]/[all]] [noerr]
Use the remove command to remove a letter or mount point from the current in-focus partition. If you specify the all parameter, all of the current drive letters and mount points are removed. If you do not specify a letter or mount point, the drive letter is removed.
Use this command to change the drive letter that is associated with a removable drive.
The drive letter removal is blocked on the system, boot, or paging volumes. You cannot use this command to remove a drive letter to an OEM partition, any GPT partition with an unrecognized GUID, or any of the special non-data, GPT partitions, such as, the ESP partition.

=====================


Commands to Manage Dynamic Disks


NOTE: Diskpart forces the creation of an MSR partition on any empty disk when that disk is converted to a dynamic or GPT disk.