I have some suggested tweaks and changes to http://wiki.centos.org/HowTos/Install_On_Partitionable_RAID1 1. The user should be instructed to start rescue mode with networking in order to be able to retrieve the patch for mkinitrd. 2. The command to create /etc/mdadm.conf will result in an extra line "spares=1" while the array is still syncing. Adding " | head -1 " to the command to create it fixes the problem. 3. Some additional discussion on how to handle multiple partitions should be added. There is an implicit assumption that only "/" is used. 4. It is not necessary to change "LABEL=..." to "/dev/md_d0..." in /etc/fstab and /boot/grub/grub.conf. 5. There is no indication of the page author - Lev Shamardin - nor statement about page maintenance preferences. If the page author, Lev Shamardin, does not object I would be glad to make the changes, or to further discuss them. Phil
Phil Schaffner ha scritto:> 2. The command to create /etc/mdadm.conf will result in an extra line > "spares=1" while the array is still syncing. Adding " | head -1 " to > the command to create it fixes the problem.May I suggest to add " | grep -v spares " or " | grep ARRAY " instead? If the command is issued after the sync the resulting mdadm.conf would be incorrect. Regards Lorenzo
Lorenzo Quatrini wrote on 01/21/2010 06:26 AM:> Phil Schaffner ha scritto: >> 2. The command to create /etc/mdadm.conf will result in an extra line >> "spares=1" while the array is still syncing. Adding " | head -1 " to >> the command to create it fixes the problem. > May I suggest to add " | grep -v spares " or " | grep ARRAY " instead? If the > command is issued after the sync the resulting mdadm.conf would be incorrect.The "head -1" still works after the sync for the case of a single array, but your solutions are arguably more general. I like the "grep ARRAY". Thanks, Phil
On 01/21/2010 01:50 AM, Phil Schaffner wrote:> 4. It is not necessary to change "LABEL=..." to "/dev/md_d0..." in > /etc/fstab and /boot/grub/grub.conf.Have you tested this? I'm not quite sure, but it seems to me that this did not work at least some time ago when I was preparing this manual. I completely agree with all other suggested changes (including Lorenzo's note about using grep instead of head). -- Lev.
Some later thoughts go below. On 01/21/2010 01:50 AM, Phil Schaffner wrote:> 1. The user should be instructed to start rescue mode with networking in > order to be able to retrieve the patch for mkinitrd.The mkinitrd instructions should be moved to the beginning of the guide. Networking sometimes requires very complicated configurations which could be quite hard to load from the rescue mode (imagine using ndiswrapper for example). May be we could provide a patched package which will replace mkinitrd, perhaps in centos-plus repo?> 3. Some additional discussion on how to handle multiple partitions > should be added. There is an implicit assumption that only "/" is used.Ideally we should also provide a guide for the LVM case. I had an email discussion with William Schwartz, who was making partitionable RAID1 with LVM setup and managed to do that. The changes are: 1. Additional steps were required to start LVM manually after starting raid with mdadm: vgscan vgchange -ay VolGroup00 # I think name could be omitted - Lev. 2. grub boot options are certainly unchanged in LVM case. 3. pvscan and Co. will detect false volumes or complain, so something like this needs to be added to /etc/lvm/lvm.conf: filter = ["a/md*", "r/.*/"] William wrote that he did not do this last step and things work fine for him. -- Lev.
On Fri, 2010-01-22 at 09:24 +0300, Lev Shamardin wrote:> Some later thoughts go below. > > On 01/21/2010 01:50 AM, Phil Schaffner wrote: > > 1. The user should be instructed to start rescue mode with networking in > > order to be able to retrieve the patch for mkinitrd. > The mkinitrd instructions should be moved to the beginning of the guide. > Networking sometimes requires very complicated configurations which could be > quite hard to load from the rescue mode (imagine using ndiswrapper for example). > > May be we could provide a patched package which will replace mkinitrd, perhaps > in centos-plus repo?Good point. Patching the mkinitrd before booting to rescue mode is the easiest solution, but a patched package would be good also. I really did not like excluding it.> > 3. Some additional discussion on how to handle multiple partitions > > should be added. There is an implicit assumption that only "/" is used. > > Ideally we should also provide a guide for the LVM case. I had an email > discussion with William Schwartz, who was making partitionable RAID1 with LVM > setup and managed to do that. The changes are:... That would be a good addition also. Was considering something similar for http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5 but so far just added a note on LVM.