columbusferro.blogg.se

Softraid
Softraid













  1. Softraid software#
  2. Softraid free#

However, this reduces the rate of synchronization. (see also Re: Mixing mdadm versions)Ī RAID volume can be used immediately after creation, even during synchronization. Also default 1.x metadata to 1.2 as documented. We don't currently have access to the particular device in avail_size so just try to force to a 1Meg boundary.

  • since mdadm-3.1.2: 1 MiB Data Offset (2048 sectors) super1: encourage data alignment on 1Meg boundary (): For 1.1 and 1.2 metadata where data_offset is not zero, it is important to align the data_offset to underlying block size.
  • Don't change v1.0 as that is used when the data_offset is required to be zero. Aim for 128Meg, but keep a power of 2 and don't use more than 0.1% of each device. So for v1.1 and v1.2 metadata make the default data_offset much larger.

    Softraid free#

    For this to be useful we need plenty of free space before the data so the data offset can be reduced. (): The kernel is growing the ability to avoid the need for a backup file during reshape by being able to change the data offset. since mdadm-3.2.4: 128 MiB Data Offset (262144 sectors) super1: leave more space in front of data by default.This fixes a bug where -adding a spare fails because it does not have enough space in it.

    softraid

    So after we check that sb->size is still available, only reduce the 'reserved', don't increase it. (): While it is nice to set a high data_offset to leave plenty of head room it is much more important to leave enough space to allow of the data of the array.

  • since mdadm-3.2.5: 128 MiB Data Offset (262144 sectors), if possible: super1: fix choice of data_offset.
  • Note: mdadm's current development version allows to specify the size of the data offset manually (for -create, -grow, not for -add): Add -data-offset flag for Create and Grow.
  • The metadata is thus close to the beginning of the device with the actual data after it, however aligned at the 1 MiB boundary ( Data offset: 2048 sectors, a sector has 512 ~]# mdadm -E /dev/sda1Īrray UUID : 3a8605c3:bf0bc5b3:823c9212:7b935117Īvail Dev Size : 20969472 (10.00 GiB 10.74 GB)Īrray Size : 20969328 (10.00 GiB 10.74 GB) The version 1.2 metadata will be used in the example. Name : localhost.localdomain:0 (local to host localhost.localdomain) The progress of the initialization process can be requested through the proc file system or ~]# cat /proc/mdstat Mdadm: Defaulting to version 1.2 metadata Your boot-loader understands md/v1.x metadata, or use Store '/boot' on this device please ensure that Mdadm: Note: this array has metadata at the start and I/O size (minimum/optimal): 512 bytes / 512 bytes

    softraid

    Sector size (logical/physical): 512 bytes / 512 bytes These partitions will have the Linux raid autodetect type ~]# fdisk -l /dev/sdaĭisk /dev/sda: 120.0 GB, 120034123776 bytesġ39 heads, 49 sectors/track, 34421 cylinders, total 234441648 sectors

    Softraid software#

    The software RAID array will span across /dev/sda1 and /dev/sdb1. A Fedora 15 live system will be used in the example. The following example will show the creation of a RAID 1 array.

  • Version 1.2: The superblock is 4 KiB after the beginning of the device.
  • Version 1.1: The superblock is located at the beginning of the device.
  • Version 1.0: The superblock is located at the end of the device.
  • The position of the superblock depends on the version of the metadata:
  • each device may be a maximum of 2 TiB in size.
  • To calculate the address of the superblock, the device size must be rounded down to the nearest 64 KiB and then 64 KiB deducted from the result. Depending on the device size, the superblock can first start at 128 KiB before the end of the device or 64 KiB before the end of the device at the latest.

    softraid

    The 0.90 version superblock is 4,096 bytes long and located in a 64 KiB-aligned block at the end of the device. This information will be found in different positions depending the metadata version. Example: A Linux software RAID array with two RAID 1 devices (one for the root file system, the other for swapping.Ī Linux software RAID array will support the following RAID levels: Ī Linux software RAID array will store all of the necessary information about a RAID array in a superblock.















    Softraid