Re: Newbie question on mdadm

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

 



On 15May2020 11:53, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:
I recently had to throw out an old NAS I've been using for over 10
years. However I rescued the 2 HDDs and got a dual-slot USB SATA
docking station for them. To my astonishment Fedora recognised them
immediately as a RAID1 array (formatted with XFS) without me doing
anything.

Excellent. So it was running Linux inside.

However gsmartcontrol reports that one of the HDDs has internal errors.
Would it be best to correct these using mdadm (assuming they can be
corrected), and if so, how? Or should I do an offline copy with the
docking station's "clone" button?

Can you copy the filesystem to another drive? I can't speak to repairing a drive, but from outside the RAID1 you should just be able to copy the data off. The md stuff does a regular block scan (weekly? something like that) which will find out if blocks are bad.

Are there any general recommendations for monitoring these beasties? I
don't want to change anything for the time being and will be using the
thing mainly for backup, but I see there is such a thing as mdmon which
isn't currently running. Should it be? I have no previous experience
with md devices.

I run my "chkmdstat" script on a regular cron (eg 5 minutes - something frequent). It is silent when there are no problems.

   #!/bin/sh -u
   #
   # Simple check and report failed metadevices from /proc/mdstat.
   #	- Cameron Simpson <cs@xxxxxxxxxx> 27jun2005
   #

   if [ $# -gt 0 ] && [ "x$1" = x-q ]
   then
     shift
     exec sed -n '/^[^ ]/{
             h
             b test
              }
              H
              :test
              /^  *[0-9][0-9]* blocks \[[0-9][0-9]*\/[0-9][0-9]*\] \[.*_.*\]$/{
             x
             p
              }' /proc/mdstat
   fi

   out=`"$0" -q` || exit 1
   [ -n "$out" ] && printf '%s\n' "$out"
   [ -z "$out" ]

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
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