Programming projects

From Linux Raid Wiki
(Difference between revisions)
Jump to: navigation, search
(Add sync_action)
m (Reference the Bad Blocks controversy, and change to sections rather than a bulleted list.)
 
Line 1: Line 1:
* Make ddrescue disks safe
+
== Make ddrescue disks safe ==
  
 
If ddrescue fails to copy a disk completely, it's not a good idea to put the copy back into the array, as it will silently corrupt the data. Unfortunately, you may have little choice. However, ddrescue creates a log of sectors it has failed to copy, and hdparm can "corrupt" sectors so that they will return a read error.
 
If ddrescue fails to copy a disk completely, it's not a good idea to put the copy back into the array, as it will silently corrupt the data. Unfortunately, you may have little choice. However, ddrescue creates a log of sectors it has failed to copy, and hdparm can "corrupt" sectors so that they will return a read error.
Line 9: Line 9:
 
A utility that can read the log from ddrescue and use the --make-bad-sector option of hdparm to flag the bad sectors as "unreadable" would be great. This would mean that the chances of recovering an array with multiple disk failure is much higher - only if there are bad sectors in the same place on multiple original drives will data be lost. The raid code will be able to tell which sectors are bad and be able to recompute them.
 
A utility that can read the log from ddrescue and use the --make-bad-sector option of hdparm to flag the bad sectors as "unreadable" would be great. This would mean that the chances of recovering an array with multiple disk failure is much higher - only if there are bad sectors in the same place on multiple original drives will data be lost. The raid code will be able to tell which sectors are bad and be able to recompute them.
  
* Extend the resize functionality.
+
See also [[The Badblocks controversy]], as fixing this at the same time would make a lot of sense. This would mean using the MD Bad Blocks list instead of hdparm, which is likely a better option.
  
Not all raid versions can be updated. In particular, you cannot add disks to a raid10
+
== Extend the resize functionality. ==
  
* Upgrade the superblock version.
+
Not all raid versions can be updated. In particular, you cannot add disks to a far raid10.
 +
 
 +
== Upgrade the superblock version. ==
  
 
Presently, the --update=metadata option only converts a superblock from v0.9 to v1.0. It would make sense to be able to convert v1.1 to v1.2 by moving the superblock. And if a v1.0 array is not a mirror, it would make sense to create a data offset, and be able to convert v1.0 to v1.2.
 
Presently, the --update=metadata option only converts a superblock from v0.9 to v1.0. It would make sense to be able to convert v1.1 to v1.2 by moving the superblock. And if a v1.0 array is not a mirror, it would make sense to create a data offset, and be able to convert v1.0 to v1.2.
  
* sync_action
+
== sync_action ==
  
 
Make an active sync save its status when it is interrupted so it can restart where it left off, rather than have to start from scratch. Also allow that status to be set before starting it, so it can scan a section of the array rather than all of it.
 
Make an active sync save its status when it is interrupted so it can restart where it left off, rather than have to start from scratch. Also allow that status to be set before starting it, so it can scan a section of the array rather than all of it.

Latest revision as of 16:15, 24 March 2018

Contents

[edit] Make ddrescue disks safe

If ddrescue fails to copy a disk completely, it's not a good idea to put the copy back into the array, as it will silently corrupt the data. Unfortunately, you may have little choice. However, ddrescue creates a log of sectors it has failed to copy, and hdparm can "corrupt" sectors so that they will return a read error.

https://linux.die.net/man/1/ddrescue

https://linux.die.net/man/8/hdparm

A utility that can read the log from ddrescue and use the --make-bad-sector option of hdparm to flag the bad sectors as "unreadable" would be great. This would mean that the chances of recovering an array with multiple disk failure is much higher - only if there are bad sectors in the same place on multiple original drives will data be lost. The raid code will be able to tell which sectors are bad and be able to recompute them.

See also The Badblocks controversy, as fixing this at the same time would make a lot of sense. This would mean using the MD Bad Blocks list instead of hdparm, which is likely a better option.

[edit] Extend the resize functionality.

Not all raid versions can be updated. In particular, you cannot add disks to a far raid10.

[edit] Upgrade the superblock version.

Presently, the --update=metadata option only converts a superblock from v0.9 to v1.0. It would make sense to be able to convert v1.1 to v1.2 by moving the superblock. And if a v1.0 array is not a mirror, it would make sense to create a data offset, and be able to convert v1.0 to v1.2.

[edit] sync_action

Make an active sync save its status when it is interrupted so it can restart where it left off, rather than have to start from scratch. Also allow that status to be set before starting it, so it can scan a section of the array rather than all of it.

Personal tools