On Sat, 2020-05-16 at 11:34 +0100, Patrick O'Callaghan wrote:
On Fri, 2020-05-15 at 19:57 -0400, Todd Zullinger wrote:
> George N. White III wrote:
> > On Fri, 15 May 2020 at 18:41, Patrick O'Callaghan
<pocallaghan(a)gmail.com>
> > wrote:
> >
> > > On Fri, 2020-05-15 at 22:35 +0100, Patrick O'Callaghan wrote:
> > > > > echo check > /sys/block/md127/md/sync_action
> > >
> > > That's giving "permission denied" even with sudo, and with
setenforce
> > > set to 'off'.
> > >
> >
> > This can happend if you run :
> >
> > $ sudo echo check > /sys/block/md127/md/sync_action
> >
> > which fails because redirection is done by the shell before the
> > sudo command runs. Use:
> >
> > $ sudo bash -c "echo check > /sys/block/md127/md/sync_action"
>
> Or yet another way (just one more of many, I'm sure):
>
> $ echo check | sudo tee /sys/block/md127/md/sync_action
>
> Anyway, sorry to pipe up with nothing directly related to
> the more important issue at hand. I just enjoy learning
> different ways to tackle various tasks in the shell. I've
> probably learned more of them from short tangents like this
> than anywhere else. :)
>
> Best of luck getting the array back in solid shape Patrick!
Thanks Todd. I'll report on progress if and when there is any :-)
Just an update on this. After faffing around trying to recover the
failing disk, I decided to replace it and start afresh.
I formatted 2 1TB drives with ext4 and created a new md volume as
RAID1. However they are taking many hours to sync, despite being empty.
Is this normal?
Also, I presume I should mount the md device, using an fstab entry like
this:
/dev/md0 /raid ext4 defaults 0 0
but attempts to do that give an error:
mount: /raid: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or
helper program, or other error.
Clearly I'm missing something basic, but what? This is the current
layout:
# sudo mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Wed May 20 16:34:58 2020
Raid Level : raid1
Array Size : 976630464 (931.39 GiB 1000.07 GB)
Used Dev Size : 976630464 (931.39 GiB 1000.07 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Wed May 20 22:15:07 2020
State : clean, resyncing
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Resync Status : 46% complete
Name : Bree:0 (local to host Bree)
UUID : ba979f01:7f1dbe79:24f19f68:7ba6000c
Events : 4098
Number Major Minor RaidDevice State
0 8 80 0 active sync /dev/sdf
1 8 96 1 active sync /dev/sdg
poc