Good afternoon, There is a software raid1, you need to reinstall Linux. Will the disks be formatted when creating a new raid?
2 answers
Backup important files never interfere.
Boot from the LiveCD / LiveUSB. If the file system is visible correctly, then everything will turn out. If yours is broken correctly (that is, /home and / (root) are in separate sections), then just format the root and install the system (it’s better to search there for the advanced installation).
If the system is installed on Windows (that is, all in one partition), then booting from the live, delete everything except /home and install the system, while not forgetting to uncheck the "format partition" checkboxes.
I hope that the OS is installed on a separate hard drive that is not related to the array. This disk can be formatted and put a new OS.
After reinstalling the OS, start searching for the arrays created earlier:
mdadm --assemble --scan So you can see the current state of the array:
cat /proc/mdstat Create a config file for the array:
mdadm --detail --scan --verbose > /etc/mdadm.conf Create a mount point for the array:
mkdir /home/myRAID To load the array each time the OS boots, add a line to / etc / fstab:
/dev/md0 /home/myRAID ext4 defaults 0 0 This entry implies that the address of the device of your array is / dev / md0 (specify this, do ls / dev / md *); as well as your ext4 file system. If you have another one, enter another appropriate value (for example, ext3, NTFS, etc.). The following are the standard parameters, you can read more here .
Mount the array:
mount -a This command mounts everything that is not yet mounted on the system, but is specified in / etc / fstab.
ps also, you can look at the current state of the array with the command:
mdadm -D /dev/md0 Before reinstalling the OS, make sure that your array is fine.