Re: Mount options for mostly-offline drives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2020-06-05 at 13:02 -0700, Samuel Sieb wrote:
> On 6/5/20 4:25 AM, Patrick O'Callaghan wrote:
> > On Thu, 2020-06-04 at 23:15 +0100, Patrick O'Callaghan wrote:
> > > > The ancient standard is "- - -" and has worked whenever I have used
> > > > it, but google may be able to confirm.
> > > 
> > > OK, thanks.
> > 
> > Right, that seems to work, however when I bring the drives back online
> > they now have different numbers than before. I would need to know how
> > to keep the previous numbers, or to re-enable the RAID array using the
> > new numbers instead of the old ones.
> 
> You don't need an mdadm.conf file or anything.  The mdraid system will 
> automatically build an array when it sees the drives appear.  And if you 
> are using UUIDs in any mount descriptions, that will automatically work 
> as well.

That doesn't seem to be what's happening:

1) Starting from a fresh reboot, with the array unmounted but active
according to mdadm, I make it inactive:

# echo inactive > /sys/block/md127/md/array_state

(At this point I can make it active again using "echo active ...")

2) I now delete the component drives:

# echo 1 > /sys/block/sdd/device/delete
# echo 1 > /sys/block/sde/device/delete

After a timeout, the drives spin down. So far so good.

3) To spin them up again, I do:

# echo "- - -" > /sys/class/scsi_host/host6/scan

They come up with different numbers (/dev/sd[fg])

However the md system does not detect them:

# mdadm -A
mdadm: an md device must be given in this mode
This contradicts the mdadm man page:

       Assemble
              Assemble the components of a previously created array into an active array.  Components can be explicitly given or can be searched for.  mdadm checks that the components do form a bona  fide
              array, and can, on request, fiddle superblock information so as to assemble a faulty array.

# mdadm -A /dev/md127
mdadm: /dev/md127 not identified in config file. <---- there is no config file
# echo active > /sys/block/md127/md/array_state 
-bash: echo: write error: Input/output error

because it's still pointing at the old numbers:

# ls -ld /sys/block/md127/md/dev-*
drwxr-xr-x. 2 root root 0 Jun  5 22:05 /sys/block/md127/md/dev-sdd
drwxr-xr-x. 2 root root 0 Jun  5 22:05 /sys/block/md127/md/dev-sde

It's very possible (indeed likely) that I'm stopping the array in the
wrong way, but I don't see any other way to do it. The mdadm man page
mentions '-A' as the way to start an array, but doesn't talk about how
to stop it, so it could just be leaving out-of-date status information
around and that's what's confusing it.

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux