[opensuse] raid error: mdadm: Found some drive for an array that is already active
Hello: This is on openSUSE 13.1. I use mdraid with several raid1 (mirror) arrays. I played with one of the arrays and now I can't assemble the array. mdadm -A /dev/md111 /dev/sda7 /dev/sdb7 mdadm: ignoring /dev/sdb7 as it reports /dev/sda7 as failed mdadm: /dev/md111 has been started with 1 drive (out of 2). What does it mean that sdb7 reports sda7 as failed? I tried to assemble sdb7 as a different array: mdadm -A -R /dev/md112 /dev/sdb7 mdadm: Found some drive for an array that is already active: /dev/md111 mdadm: giving up. What does this mean? proc/mdstat gives: md111 : active raid1 sda7[2] 31455164 blocks super 1.0 [2/1] [U_] Why I can't then assemble sdb7 to md112? What I'd like to do now is: Assemble /dev/sda7 to one array and /dev/sdb7 to another array. Mount the two arrays separately to different mount points then compare the contents of the arrays. Synchronize the content if necesary, unmount arrays, and finally reassemble the original array (/dev/md7) with the two drives (dev/sda7 and /dev/sdb7). How can I do that? There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot. Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand. If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it. You have to set it to not mount automatically at all, never, then mount it manually or by an script of yours. -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, Jul 23, 2016 at 7:51 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand. If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it.
Something would be broken if it didn't work this way. 'man mount' says that -a mounts all file systems mentioned in fstab unless noauto is used. Since ancient times, as in I can't remember a time before this, it's true that anything in fstab is automatically mounted when the device appears and passes udev tests, unless noauto is used. Seems unlikely that automatically mounting a degraded array is going to cause the array to be damaged. There's an event count that should serve to resolve any ambiguity which drive is newer than the other, although it might be better to make sure such md devices have a write-intent bitmap. -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
24.07.2016 05:13, Chris Murphy пишет:
On Sat, Jul 23, 2016 at 7:51 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand. If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it.
Something would be broken if it didn't work this way. 'man mount' says that -a mounts all file systems mentioned in fstab unless noauto is used.
It does not say that it should continue to watch for device to appear and mount it months and probably years after user executed "mount -a".
Since ancient times, as in I can't remember a time before this, it's true that anything in fstab is automatically mounted when the device appears and passes udev tests, unless noauto is used.
Seems unlikely that automatically mounting a degraded array is going to cause the array to be damaged. There's an event count that should serve to resolve any ambiguity which drive is newer than the other, although it might be better to make sure such md devices have a write-intent bitmap.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, Jul 23, 2016 at 11:24 PM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
24.07.2016 05:13, Chris Murphy пишет:
On Sat, Jul 23, 2016 at 7:51 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand. If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it.
Something would be broken if it didn't work this way. 'man mount' says that -a mounts all file systems mentioned in fstab unless noauto is used.
It does not say that it should continue to watch for device to appear and mount it months and probably years after user executed "mount -a".
I think that's silly. The item is in fstab, auto mount is the default unless noauto is specified, so there is an fstab generator item that it instantiated because of the fstab entry, and yes it's going to automount whenever the device finally appears. There is no timeout because devices can appear anytime, e.g. removable devices. -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-24 08:19, Chris Murphy wrote:
On Sat, Jul 23, 2016 at 11:24 PM, Andrei Borzenkov <> wrote:
It does not say that it should continue to watch for device to appear and mount it months and probably years after user executed "mount -a".
I think that's silly. The item is in fstab, auto mount is the default unless noauto is specified, so there is an fstab generator item that it instantiated because of the fstab entry, and yes it's going to automount whenever the device finally appears. There is no timeout because devices can appear anytime, e.g. removable devices.
This behaviour should be configurable, so that the admin can choose. Traditional or new. -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-24 04:13, Chris Murphy wrote:
On Sat, Jul 23, 2016 at 7:51 PM, Carlos E. R. <> wrote:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand. If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it.
Something would be broken if it didn't work this way. 'man mount' says that -a mounts all file systems mentioned in fstab unless noauto is used. Since ancient times, as in I can't remember a time before this, it's true that anything in fstab is automatically mounted when the device appears and passes udev tests, unless noauto is used.
No, system V did not attempt to mount automatically a partition after boot. The time was past. So for many years we relied on this methodology. A device that appeared later had to be mounted by some other mechanism. Like calling "mount -a" again. Now systemd can umount automatically something that the admin mounted manually, or the other way round. It does not obey orders. -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sun, Jul 24, 2016 at 5:29 AM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2016-07-24 04:13, Chris Murphy wrote:
On Sat, Jul 23, 2016 at 7:51 PM, Carlos E. R. <> wrote:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand. If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it.
Something would be broken if it didn't work this way. 'man mount' says that -a mounts all file systems mentioned in fstab unless noauto is used. Since ancient times, as in I can't remember a time before this, it's true that anything in fstab is automatically mounted when the device appears and passes udev tests, unless noauto is used.
No, system V did not attempt to mount automatically a partition after boot. The time was past.
I call it broken. More diplomatic language might be that it just lacks the capacity to actually do what the user specifies in fstab unless that device appears at the proper time. And proper time has never ever been a guarantee for devices becoming available. So some device simply cannot be automounted on sysV without manual intervention or some sort of daemon like gvfs which manages this for removeables.
So for many years we relied on this methodology. A device that appeared later had to be mounted by some other mechanism. Like calling "mount -a" again.
OK well for many years we relied only on the local star for light... I'm not going to accept an appeal to ancient times as a reason why something that didn't happen before means it's now wrong that it can be done. If you don't want something automatically mounting a.) don't put it in fstab b.) add noauto. I
Now systemd can umount automatically something that the admin mounted manually, or the other way round. It does not obey orders.
Automatically umounting things isn't something I've experienced. Off hand I think this is plausibly a good thing for removeables at logout time from a DE. -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-24 22:13, Chris Murphy wrote:
On Sun, Jul 24, 2016 at 5:29 AM, Carlos E. R.
OK well for many years we relied only on the local star for light... I'm not going to accept an appeal to ancient times as a reason why something that didn't happen before means it's now wrong that it can be done.
Ok, we disagree. I say that this different behaviour should be configurable.
Now systemd can umount automatically something that the admin mounted manually, or the other way round. It does not obey orders.
Automatically umounting things isn't something I've experienced. Off hand I think this is plausibly a good thing for removeables at logout time from a DE.
Oh, it is a bug. I posted about it recently. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
24.07.2016 04:51, Carlos E. R. пишет:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand.
This is considered bug by apparently everyone except systemd author.
If a disk is set to be automatically mounted by "mount -a" or boot, it will be mounted the instant the system sees it.
You have to set it to not mount automatically at all, never, then mount it manually or by an script of yours.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-24 07:23, Andrei Borzenkov wrote:
24.07.2016 04:51, Carlos E. R. пишет:
On 2016-07-22 18:12, Istvan Gabor wrote:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
Systemd feature, I understand.
This is considered bug by apparently everyone except systemd author.
I know :-) I just didn't want to say it first ;-) -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Istvan Gabor <suseuser04@freemail.hu> írta:
There is another strange problem: ff I assemble an array it gets mounted automatically. Why? In case of a degraded array with one drive only this can ruin the array. Why is the array mounted automatically upon assembly? It should be only mounted (automatically) on running mount -a and at boot.
OK, thank you all for answering this. I have modified fstab and changed mount options to noauto for this array. I still can't assemble the array. In the meantime I have tried to make /dev/sda7 and /dev/sdb7 to 2 separate arrays. I assembled /dev/md7 with only /dev/sda7, then removed one drive and stopped the array: mdadm -A -R /dev/md7 /dev/sda7 mdadm -G -f -n 1 /dev/md7 mdadm -S /dev/md7 Then I repeated the above with /dev/sdb7: mdadm -A -R /dev/md7 /dev/sdb7 mdadm -G -f -n 1 /dev/md7 mdadm -S /dev/md7 Now /dev/sda7 and /dev/sdb7 should be only members of two different arrays, shouldn't they? mdadm -E gives: mdadm -E /dev/sda7 /dev/sda7: Magic : a92b4efc Version : 1.0 Feature Map : 0x0 Array UUID : 64e23ea9:7dcb9ee2:7bca71bd:248cc5cf Name : pc:7 (local to host pc) Creation Time : Sat Jul 13 22:57:34 2013 Raid Level : raid1 Raid Devices : 1 Avail Dev Size : 62910328 (30.00 GiB 32.21 GB) Array Size : 31455164 (30.00 GiB 32.21 GB) Super Offset : 62910456 sectors Unused Space : before=0 sectors, after=128 sectors State : clean Device UUID : 8098481a:b486ae7b:77522030:9d244d53 Update Time : Wed Jul 27 01:05:19 2016 Checksum : c6d8fd49 - correct Events : 78964 Device Role : Active device 0 Array State : A ('A' == active, '.' == missing, 'R' == replacing) mdadm -E /dev/sdb7 /dev/sdb7: Magic : a92b4efc Version : 1.0 Feature Map : 0x0 Array UUID : 64e23ea9:7dcb9ee2:7bca71bd:248cc5cf Name : pc:7 (local to host pc) Creation Time : Sat Jul 13 22:57:34 2013 Raid Level : raid1 Raid Devices : 1 Avail Dev Size : 62910328 (30.00 GiB 32.21 GB) Array Size : 31455164 (30.00 GiB 32.21 GB) Super Offset : 62910456 sectors Unused Space : before=0 sectors, after=128 sectors State : clean Device UUID : ac43fabc:cb5f2f2a:00887c0f:b34fc579 Update Time : Wed Jul 27 00:40:57 2016 Checksum : 1de2dc67 - correct Events : 78951 Device Role : Active device 0 Array State : A ('A' == active, '.' == missing, 'R' == replacing) mdadm -Q gives: mdadm -Q /dev/sda7 /dev/sda7: is not an md array /dev/sda7: device 2 in 1 device inactive raid1 array. Use mdadm --examine for more detail. mdadm -Q /dev/sdb7 /dev/sdb7: is not an md array /dev/sdb7: device 3 in 1 device inactive raid1 array. Use mdadm --examine for more detail. I don't know how a device can be device 2 or device 3 in a one device array but it looks that both /dev/sda7 and /dev/sdb7 are part of a one device array. Then I assemble /dev/sda7 to an array /dev/md117: mdadm -A /dev/md117 /dev/sda7 mdadm: /dev/md117 has been started with 1 drive. So far it's OK. Then I try to assemble /dev/sdb7 to /dev/md118: mdadm -A /dev/md118 /dev/sdb7 mdadm: Found some drive for an array that is already active: /dev/md117 mdadm: giving up. Why doesn't it work? What is the meaning of the error message? How could I fix this? Should I go to the raid mailing list with this? Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
27.07.2016 02:24, Istvan Gabor пишет:
Istvan Gabor <suseuser04@freemail.hu> írta: /dev/sda7: Array UUID : 64e23ea9:7dcb9ee2:7bca71bd:248cc5cf
...
/dev/sdb7: Array UUID : 64e23ea9:7dcb9ee2:7bca71bd:248cc5cf ...
Then I assemble /dev/sda7 to an array /dev/md117:
mdadm -A /dev/md117 /dev/sda7 mdadm: /dev/md117 has been started with 1 drive.
So far it's OK. Then I try to assemble /dev/sdb7 to /dev/md118:
mdadm -A /dev/md118 /dev/sdb7 mdadm: Found some drive for an array that is already active: /dev/md117 mdadm: giving up.
Why doesn't it work? What is the meaning of the error message? How could I fix this?
Array is defined by its UUID which is the same. If you want to use second drive as independent array, you need to rewrite UUID when assembling (mdadm -A -U uuid). See man mdadm for details. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrei Borzenkov <arvidjaar@gmail.com> írta:
27.07.2016 02:24, Istvan Gabor пишет:
Istvan Gabor <suseuser04@freemail.hu> írta: /dev/sda7: Array UUID : 64e23ea9:7dcb9ee2:7bca71bd:248cc5cf
...
/dev/sdb7: Array UUID : 64e23ea9:7dcb9ee2:7bca71bd:248cc5cf ...
Then I assemble /dev/sda7 to an array /dev/md117:
mdadm -A /dev/md117 /dev/sda7 mdadm: /dev/md117 has been started with 1 drive.
So far it's OK. Then I try to assemble /dev/sdb7 to /dev/md118:
mdadm -A /dev/md118 /dev/sdb7 mdadm: Found some drive for an array that is already active: /dev/md117 mdadm: giving up.
Why doesn't it work? What is the meaning of the error message? How could I fix this?
Array is defined by its UUID which is the same. If you want to use second drive as independent array, you need to rewrite UUID when assembling (mdadm -A -U uuid). See man mdadm for details.
I didn't think of that. Rewriting uuid as you suggested helped to fix the problem and I could finally rearrange the array. Thanks a lot, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Carlos E. R.
-
Chris Murphy
-
Istvan Gabor