Added check for success of disk sync, should resolve bad ssd write issues
This commit is contained in:
parent
7088f57ba6
commit
820f6e31a1
7
wipe.pl
7
wipe.pl
@ -117,8 +117,11 @@ sub wipethemdrives {
|
|||||||
seek($diskw,-10240000,2);
|
seek($diskw,-10240000,2);
|
||||||
print $diskw $clobber; #End of Disk
|
print $diskw $clobber; #End of Disk
|
||||||
close($diskw);
|
close($diskw);
|
||||||
#######################################
|
system("sync ".$disks->{$diskid}{path}) and do {
|
||||||
system("sync"); #Need to check if this failes and actually fail the disk if it fails.
|
#if sync failes disk fails
|
||||||
|
print "\nWipe attemped $color{red}FAILED$color{reset}\n";
|
||||||
|
return ($? >> 8);
|
||||||
|
};
|
||||||
print "Wipe attempt complete, checking...";
|
print "Wipe attempt complete, checking...";
|
||||||
# Read
|
# Read
|
||||||
open(my $diskr, "<", $disks->{$diskid}{path}) or return warning("could not open $disks->{$diskid}{path}");
|
open(my $diskr, "<", $disks->{$diskid}{path}) or return warning("could not open $disks->{$diskid}{path}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user