On Sat, 2020-05-16 at 08:21 +1000, Cameron Simpson wrote:
> On 15May2020 11:53, Patrick O'Callaghan <pocallag...@gmail.com> 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.

Yes, an old Debian.

> > 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.

I'm not too worried about the data (I have other backups). I was really
more interested in trying to get the drive working again without having
to replace it. It may be a fool's errand but if I can exercise the
drive's internal bad blocks mechanism it could be recoverable. The
number of failing sectors seems to be quite low. 

> > 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 <c...@cskk.id.au> 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" ]

I'll take a look at that, thanks.

poc
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to