tyterew.blogg.se

Softraid linux
Softraid linux












Repeat this action for each of the RAID arrays created above. Make the RAIDs accessible to LVM by converting them into physical volumes (PVs) using the following command. If you did not understand that make sure you read the LVM Introduction section. The VG will then be divided into logical volumes (LVs) that will act like physical partitions (e.g. Then combine those PVs into a volume group (VG). This section will convert the two RAIDs into physical volumes (PVs). It is however recommended to still scrub to catch and correct any bad sectors there might be in the devices. This fact is a source of false positives for RAID1 and RAID10 arrays. However, since we cannot tell the difference between a non-0 count that is just in transient data or a non-0 count that signifies a real problem. These non-0 counts will only exist in transient data areas where they do not pose a problem. See raid-check AUR which can assist with this.ĭue to the fact that RAID1 and RAID10 writes in the kernel are unbuffered, an array can have non-0 mismatch counts even when the array is healthy. It is a good idea to set up a cron job as root to schedule a periodic scrub. It is luck-of-the-draw whether or not the operation gets the right data instead of the bad data. The danger is that we really do not know whether it is the parity or the data block that is correct (or which data block in case of RAID1). Note: Users may alternatively echo repair to /sys/block/md0/md/sync_action but this is ill-advised since if a mismatch in the data is encountered, it would be automatically updated to be consistent. This "do nothing" allows admins to inspect the data in the sector and the data that would be produced by rebuilding the sectors from redundant information and pick the correct data to keep. If it finds mismatches, i.e., good sectors that contain bad data (the data in a sector does not agree with what the data from another disk indicates that it should be, for example the parity block + the other data blocks would cause us to think that this data block is incorrect), then no action is taken, but the event is logged (see below). The check operation scans the drives for bad sectors and mismatches. When the scrub is complete, admins may check how many blocks (if any) have been flagged as bad: # echo idle > /sys/block/md0/md/sync_action To stop a currently running data scrub safely: # echo check > /sys/block/md0/md/sync_actionĪs with many tasks/items relating to mdadm, the status of the scrub can be queried: Note: Depending on the size/configuration of the array, a scrub may take multiple hours to complete. To create partitions, see GPT fdisk#Create a partition table and partitions. Sda2 Primary linux_raid_m 2000.00 # /swap Sda1 Boot Primary linux_raid_m 200.00 # /boot We will use gdisk to create three partitions on each of the three hard drives (i.e. Additionally, if there is a problem with one boot partition, the boot loader can boot normally from the other two partitions in the /boot array. Any other level will prevent your system from booting. This is because GRUB does not have RAID drivers. The boot partition must be RAID1 i.e it cannot be striped (RAID0) or RAID5, RAID6, etc. The following example makes use of RAID1 and RAID5.Įach hard drive will have a 200 MiB /boot partition, 2048 MiB /swap partition, and a / partition that takes up the remainder of the disk. raid0, raid1, raid5, raid6, raid10) and LVM (i.e. Obtain the latest installation media and boot the Arch Linux installer as outlined in Getting and installing Arch. If you would like to use one of those boot loaders make sure to add the option -metadata=0.90 to the /boot array during RAID installation. GRUB Legacy, LILO) will not support any 1.x metadata versions, and instead require the older version, 0.90. Syslinux only supports version 1.0, and therefore requires the -metadata=1.0 option. 1.2) when combined with an initramfs, which has replaced in Arch Linux with mkinitcpio. GRUB supports the default style of metadata currently created by mdadm (i.e. GRUB when used in conjunction with GPT requires an additional BIOS boot partition. This tutorial will use Syslinux instead of GRUB. Creating the swap space on a separate array is not intended to provide additional redundancy, but instead, to prevent a corrupt swap space from rendering the system inoperable, which is more likely to happen when the swap space is located on the same partition as the root directory. Many tutorials treat the swap space differently, either by creating a separate RAID1 array or a LVM logical volume. Note: If you want extra performance, just let the kernel use distinct swap partitions as it does striping by default.














Softraid linux