12/23/2023 0 Comments Softraid linux![]() Mdadm -examine -scan /dev/sdb1 /dev/sdb2 /dev/sdb3 > /etc/nf # get the information from the disks and append that information to nf file # Once you run the below command there is no going back # Make sure you have the configuration /etc/nf file created # Once the array has started then mount it again and check everything ![]() Mdadm: /dev/sde1 appears to be part of a raid array: Mdadm: /dev/sde1 appears to contain an ext2fs file system Mdadm: /dev/sdb1 appears to be part of a raid array: Mdadm: /dev/sdb1 appears to contain an ext2fs file system # you will get errors stating the below, select Y to carry on creating the array # First you need to unmount any filesystem from the array It is possible to change the type of the array from a raid 1 to a raid 5, I would advise to backup first but it worked without any problems for me change from raid 1 to raid 5 # Then alter the configuration, yes I know the grow actually shrinks the array? # First fail the disk you want to remove, # First you need to change the configuration Use the above “ check the array” options to see that the disk has been added. Use the above “ check the array” options to see that the disk has been removed.Īdding a disk to the array could result in two outcomes, if the array is already degraded the new will be used to fix the fault (if a hot spare has not already been used), if not then the disk will be used as a hot spare. To remove a disk from the raid array use the following commands, the disk has to be faulty not faulted (see above) to allow this option to work, at this point the disk can be physically removed. Use the above “ check the array” options to see that the disk has been faulted. To test the raid integrity you might want to simulate a disk failure again there are a number of ways to do this. Note: by default the system will look in /etc/nf then /etc/mdadm/nf Mdadm configuration file detail, examine and assembleĭetail = applies to the whole array which is currently activeĮxamine = applies to the devices which are a component of the arrayĪssemble = assemble the array using all devices (will use config file first then scan devices)Įcho "DEVICE partitions" > /etc/nf x Number of spare disks in the raid (1 in this case) n Number of devices in raid (2 devices in this case) Now add entry to /etc/fstab and mount it: Now make the RAID device md0 and create a filesystem on it Update the configuration file /etc/raidtab with these lines of codeĢ. Note: repeat above for /dev/sdb11 and /dev/sdb12Ĭreate partiton copy to new disk create partition table of new disk Set the partition type Set partition type The following was tested using a centos 4 installation on Dell hardware, three partitions have already been created /dev/sdb10, /dev/sdb11 and /dev/sdb12 all are 1Gb in size. This is a quick and dirty document on software raid there are many more documents on the web that go into greater detail, the following is covered in this document:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |