linuxrite | write bad sectors in linux to force block reallocation
kandi X-RAY | linuxrite Summary
kandi X-RAY | linuxrite Summary
linuxrite is a Shell library. linuxrite has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.
I know Spinrite by Steve Gibson has its doubters, but I like the thoroughness of his approach to squeeze the last good data out of the disk. What i like most is that by re-writing bad sectors, the disk can usually reallocate them. Just reading sectors usually identifies them as bad, but doesn't lead to reallocation. Spinrite not only requires booting into DOS (sometimes a difficult to obtain version, which is difficult to write to a USB key), but Spinrite rarely works with big modern disks and EFI or many BIOSes, so I wrote this set of bash scripts to fix a 2TB WD Green which is throwing errors in some areas but otherwise seems okay. Of note, the disk is in an array, and everything is also backed up. With ZFS, I can even re-write the sectors directly to the disk while the disk is active in a mirrored vdev, then run zpool scrub mypool, and the array heals itself. This is obviously ridiculous behaviour. I don't believe linux md can heal like this if data conflicts appear, so it may trash your md array even further, but you've already got a read error... BTRFS in redundant configuration can probably cope with this abuse, but I haven't tried this at all. badblocks does something similar but takes many hours per modern disk of several TB. This code focusses on known borderline or bad sectors which are actually in use. There are a number of critical environment variables which are disk dependent. Many disks these days have 4096 byte physical block layout, but 512b logical layout. For a write of <4096 bytes, a read-write-read cycle has to be performed. Therefore, physical block size should be 4096 in the environment variable, unless you have an older 512b block disk. This allows a straightforward write operation without failing due to read. I think dd 'noerror' would get around this anyway, but 4096 blocks are the right way to go. The DISK environment variable should be set in local.sh . I separated it out into local-example.sh, and this should be copied and edited. Highly recommend using /dev/disk/by-id path instead of raw device id which can change. This is really a proof of concept, first draft. I am currently re-running it on my flaky disk and now finding more errors, so the disk is now out of my storage pool.
I know Spinrite by Steve Gibson has its doubters, but I like the thoroughness of his approach to squeeze the last good data out of the disk. What i like most is that by re-writing bad sectors, the disk can usually reallocate them. Just reading sectors usually identifies them as bad, but doesn't lead to reallocation. Spinrite not only requires booting into DOS (sometimes a difficult to obtain version, which is difficult to write to a USB key), but Spinrite rarely works with big modern disks and EFI or many BIOSes, so I wrote this set of bash scripts to fix a 2TB WD Green which is throwing errors in some areas but otherwise seems okay. Of note, the disk is in an array, and everything is also backed up. With ZFS, I can even re-write the sectors directly to the disk while the disk is active in a mirrored vdev, then run zpool scrub mypool, and the array heals itself. This is obviously ridiculous behaviour. I don't believe linux md can heal like this if data conflicts appear, so it may trash your md array even further, but you've already got a read error... BTRFS in redundant configuration can probably cope with this abuse, but I haven't tried this at all. badblocks does something similar but takes many hours per modern disk of several TB. This code focusses on known borderline or bad sectors which are actually in use. There are a number of critical environment variables which are disk dependent. Many disks these days have 4096 byte physical block layout, but 512b logical layout. For a write of <4096 bytes, a read-write-read cycle has to be performed. Therefore, physical block size should be 4096 in the environment variable, unless you have an older 512b block disk. This allows a straightforward write operation without failing due to read. I think dd 'noerror' would get around this anyway, but 4096 blocks are the right way to go. The DISK environment variable should be set in local.sh . I separated it out into local-example.sh, and this should be copied and edited. Highly recommend using /dev/disk/by-id path instead of raw device id which can change. This is really a proof of concept, first draft. I am currently re-running it on my flaky disk and now finding more errors, so the disk is now out of my storage pool.
Support
Quality
Security
License
Reuse
Support
linuxrite has a low active ecosystem.
It has 3 star(s) with 1 fork(s). There are 4 watchers for this library.
It had no major release in the last 6 months.
linuxrite has no issues reported. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of linuxrite is current.
Quality
linuxrite has no bugs reported.
Security
linuxrite has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
License
linuxrite is licensed under the GPL-3.0 License. This license is Strong Copyleft.
Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
Reuse
linuxrite releases are not available. You will need to build from source code and install.
Top functions reviewed by kandi - BETA
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of linuxrite
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of linuxrite
linuxrite Key Features
No Key Features are available at this moment for linuxrite.
linuxrite Examples and Code Snippets
No Code Snippets are available at this moment for linuxrite.
Community Discussions
No Community Discussions are available at this moment for linuxrite.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install linuxrite
You can download it from GitHub.
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page