From mboxrd@z Thu Jan 1 00:00:00 1970 From: Song Liu Subject: Re: [PATCH v3 2/2] mdadm: Introduce new array state 'broken' for raid0/linear Date: Thu, 22 Aug 2019 21:56:17 +0000 Message-ID: <060E4BAF-E16D-4ADF-AE93-39097DB739DD@fb.com> References: <20190822161318.26236-1-gpiccoli@canonical.com> <20190822161318.26236-2-gpiccoli@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190822161318.26236-2-gpiccoli@canonical.com> Content-Language: en-US Content-ID: <0A4251BD5941054E95657177F60BA997@namprd15.prod.outlook.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: "Guilherme G. Piccoli" , Jes Sorensen Cc: "linux-block@vger.kernel.org" , "liu.song.a23@gmail.com" , NeilBrown , linux-raid , "dm-devel@redhat.com" , "jay.vosburgh@canonical.com" List-Id: linux-raid.ids > On Aug 22, 2019, at 9:13 AM, Guilherme G. Piccoli wrote: > > Currently if a md raid0/linear array gets one or more members removed while > being mounted, kernel keeps showing state 'clean' in the 'array_state' > sysfs attribute. Despite udev signaling the member device is gone, 'mdadm' > cannot issue the STOP_ARRAY ioctl successfully, given the array is mounted. > > Nothing else hints that something is wrong (except that the removed devices > don't show properly in the output of mdadm 'detail' command). There is no > other property to be checked, and if user is not performing reads/writes > to the array, even kernel log is quiet and doesn't give a clue about the > missing member. > > This patch is the mdadm counterpart of kernel new array state 'broken'. > The 'broken' state mimics the state 'clean' in every aspect, being useful > only to distinguish if an array has some member missing. All necessary > paths in mdadm were changed to deal with 'broken' state, and in case the > tool runs in a kernel that is not updated, it'll work normally, i.e., it > doesn't require the 'broken' state in order to work. > Also, this patch changes the way the array state is showed in the 'detail' > command (for raid0/linear only) - now it takes the 'array_state' sysfs > attribute into account instead of only rely in the MD_SB_CLEAN flag. > > Cc: NeilBrown > Cc: Song Liu > Signed-off-by: Guilherme G. Piccoli CC Jes, who maintains mdadm.