bad blocks on crypt partition

scar <[email protected]> Sat, 10 Jun 2017 11:05:53 -0700
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
I'm trying to repair a disk with a bad sector that is waiting to be 
re-written.  I've run the extended offline test and it reports a bad LBA 
at 1872148287.  this is the same sector that libata reports in the 
system log:
  end_request: I/O error, dev sde, sector 1872148287

At the same time, the system log also reports some I/O errors on logical 
blocks:
  Buffer I/O error on device sde, logical block 234018535
  Buffer I/O error on device sde, logical block 234018536
  Buffer I/O error on device sde, logical block 234018537
  Buffer I/O error on device sde, logical block 234018538
  Buffer I/O error on device sde, logical block 234018539

The errors happen when i start the bitcoin client, so i think it's 
related to the large dataset for the blockchain.  However i tried 
following the BadBlockHowto and the block number i came up with using 
the formula was 234018279 for example.  However this might not be 
significant because all of these blocks are in the same inode anyways, 
18095158.  When i use "ncheck 18095158" with debugfs on the decrypted 
filesystem (/dev/mapper/sde1_crypt) it tells me the file occupying this 
inode (and it is not related to bitcoin).

I'm able to copy and calculate the md5sum of this file just fine, and 
there aren't any errors in the syslog when i do this.  So I guess there 
is something different to figure out when the underlying partition is 
encrypted.  More details:

# fdisk -lu /dev/sde

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005fd19

    Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048  1953525167   976761560   83  Linux
#

/dev/sde1 is decrypted to /dev/mapper/sde1_crypt:
# tune2fs -l /dev/mapper/sde1_crypt | grep Block
Block count:              244189878
Block size:               4096
Blocks per group:         32768
#


I was thinking i would just try "hdparm --write-sector 1872148287 
/dev/sde" instead but wanted to check here first

Thanks


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot