2018年6月21日 星期四

sg_write_long make bad sector

SSD need to attcah scsi_to_sata_bridge.
(1)make bad sector: sg_write_long --lba=0x1234 --wr_uncor /dev/sdb
(2)use dd to check bad sector: dd -if=/dev/sdb of=/dev/null bs=1M count=10000
(3)clear the bad sectorsg_dd if=/dev/zero of=/dev/sda blk_sgio=1 seek=0x1234 bs=512 count=1