Hi Terry,

> Hamish ran the extended smartctl test on the discs

The output of `smartctl -x /dev/sda' for the appropriate drive's device
would be useful.

> I found something about running badblocks on the disc that I've got
> and it certainly has loads (currently around 400 and still counting)

It's probably correct, though you may want to double check or alter your
means of connecting the drive to make sure it's not that causing
problems.  Or switch to another drive and hope badblocks finds no
problems with that one, proving the connection's integrity.

> I'm aware that the OS will work around badblocks

Not really.  A drive will remap sectors that it has trouble reading to a
new sector when it either successfully manages to read its data, or is
told by the computer to write new data to that sector.  Until then, it
reports a read error to the computer that will ripple up through the
filesystem code in the kernel to the program and, if the programmer
bothered to check for errors, the user.

Separately, a filesystem, e.g. ext4, may have logic to track the
locations of bad blocks and avoid them, e.g. mke2fs(8)'s -c and -l
options.  This is less useful AFAICS now a drive can re-map them itself,
unless the drive is running out of new sectors from its reserves.

> so the drive is probably usable for a time at least.

I doubt it.  But it may be educational to try.

> We won't need all of the 1 TB of space for our purposes, so could we
> partition the least bad part of the disc and use it?

If the errors are constrained to a clear part to avoid.

> If we did, what would happen when the NAS tried to build the RAID?

No idea.  Is it a mirror of the drives, or selected partitions on the
drive?

-- 
Cheers, Ralph.

-- 
  Next meeting: BEC, Bournemouth, Tuesday, 2019-07-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to