[sorted]rebuilding a raid5 array for file server.
I have come to a point where i may need to reinstall debian 4.11 hosting a samba and file server with a 1.8TB raid 5 setup. I would normally be happy to just install on the operating system disk a 4.3GB drive. I would like to be able to make sure that i don't harm this raid5 with the reinstalling of debian and or if a better restore rebuild of debian is possible or which method/methods would be best suited to making sure i keep this raid5 and its data intact with minimum upset. I would get really upset if i lost this data.
debian installed on 4.3GB drive.
two 200Gb drives for /home and /var/www
and three 1TB drives for software raid5 using MD with drive named md0.
Any ideas on what to do or what you would do would be greatly appreciated. How can i avoid this situation in the future. This all came about because i restarted computer using the reset button on case.
i have already rewritten /etc/inittab which i had lost completely.
I don't know about reinstall options for debian. I have not done that. But it does not seem like this should not be a big problem. If you save a copy of your /etc/mdadm.conf file which should specify the set up info for the RAID array and restore it after you restore the OS the array should come up with the same configuration as long as the devices it is built from still have the same device names. mdadm --assemble option should be able to re-assemble the array if there were a problem.
If you do not have mdadm.conf you can generate the info needed for it with:
mdadm --detail --scan
You might also want to run:
mdadm --examine /dev/xxx
for each of the drives that are members of the array and keep that information handy. If you are really paranoid you could disconnect the array drives while you rebuild the OS to avoid any possibility of them getting damaged and reconnect them after you are satisfied that everything is ok.
The following link is a little old but still has good info on mdadm that you might find useful:
Does the follow contents look about right?
you mentioned how to restore my array am i right in thinking i need to the following: with mdadm intact replacing one i get by installing md again after restart?
am i right?
Your mdadm.conf looks ok. Be sure that the specification of the disks that are members of the array (DEVICE /dev/sd??*) does refer to correct disks. It should already but it never hurts to check.
After you re-install the OS (I assume that is what you intend to do) you should be able to copy this mdadm.conf into your new /etc and the array should be automatically assembled at boot up. You will have to put the appropriate entry in fstab to get the array mounted at boot. You might want to copy the entry you currently have to update your new fstab being sure you have the same mount point in the new system.
I would try first just copying the mdadm.conf into place and rebooting. Then check the output of:
to see if the array has been recognized. If so you should be able to mount /dev/md0 to the appropriate mount point (manually or via fstab) and things should be good.
If the automatic mount does not work you can test if mdadm can manually assemble the array. In any event doing all of this should not negatively impact the array or its data if the drives are intact. Avoid using mdadm to create a new array using these same disks. That could be necessary but can also cause some problems you do not want to have to deal with.
One other thing that might be the case for Debian:
Is your mdadm.conf in /etc/ or /etc/mdadm/ ?
It will need to be in the right directory.
thanks guys you have been a great help.
|All times are GMT -5. The time now is 03:14 AM.|