On 17/07/12 03:36 PM, Muhammad Yousuf Khan wrote:
On Mon, Jul 16, 2012 at 6:39 PM, Gary Dale<garydale@rogers.com> wrote:On 16/07/12 08:12 AM, Muhammad Yousuf Khan wrote:apart from my question i know what does "assemble" mean but most of the time it create conflict with the option "add". for example. if raid is broken then i can just re-add the the broken partition if my HD fails then i will add the new drive, recreate the partition and add it to new array and cat /proc/mdstat will show me the sync status. but now the next question coming in my mind is why assemble. i also observed that some time when i restart the computer contain RAID1 after 2 or 3 months it start to test or (maybe)assemble one of the partition by saying that (more or less) that the raid has not been tested for this this days so now reassembling (sorry if i am wrong since i can not recall the whole message) so the point why assemble is necessary? if assembling is that necessary then why should i wait to restart. i can do this manually every week or can schedule a task for it. Thanks,Assemble builds the arrays based on the information contained in the superblock. The testing you are talking about is more likely fsck checking the file system(s) on the arrays.if Assemble builds the array then what is the purpose of "--create" option. sorry if my question is a bit annoying but i am confuse in this. is there a difference in creating and building the array? Thanks,
Yes. Creating an array sets it up for the first time, creating the superblocks and initializing the underlying disks. Assembling the array merely starts it up using the information in the superblocks.
You can't assemble an array without creating it first. Conversely, trying to create an array that has already been created will generate messages that the devices are already part of an array.
It is possible for arrays to get out of sync due to a power outage or improper shutdown but in practice this is unlikely. Nonetheless, mdadm should also check for the consistency of the arrays periodically. If it doesn't do this and a drive fails, it may not be possible to rebuild the array. The /etc/crontab.d folder on my Wheezy system contains an mdadm entry which was put there by the package maintainer or developer. It includes the line: 57 0 * * 0 root if [ -x /usr/share/mdadm/checkarray ]&& [ $(date +\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --idle --quiet; fi which checks all the arrays once a month. This is a trade off since you don't want to spend too much time checking arrays. If possible, you may want to run checkarray before your drive has failed to ensure that your array is consistent before pulling the failing drive. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: [🔎] 50041992.7020107@rogers.com">http://lists.debian.org/[🔎] 50041992.7020107@rogers.com