Bits and bobs

Although I should be working on getting all the data loaded into the Canalplan Boats Database I’ve not been making a lot of progress on getting the new data and the old data mapped into a new structure which I wanted to use to make the data better.

As well as that it’s been a continual battle against the scum who just want to break servers and use them to post spam, send spam or compromise their websites.

Ecatel Limited seem to be a company who delight in hosting scammers and criminals. They had several machines in several different IP address blocks all hammering the xmlrpc.php file on this server. Doing some research into this shows that this problem has been going on for over 18 months and Ecatel do not seem to do anything about it. Emails to their abuse department went unreplied which seems to be pretty much par for the course. So their CIDRs have been firewalled.

The Shellshock attempts continue from various places and although some companies have replied quickly others simply haven’t.

You do wonder how much better the internet could be if people building websites and on-line systems didn’t have to devote significant resources to stopping scum from attempting to break things. All these stupid attempts against servers are also using up resources that should be being used to serve real data to real users.

Scribbled notes on fixing bad blocks

#smartctl -t short /dev/sdb

then

#smartctl -a /dev/sdb

SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 20% 50556 1132724807
# 2 Extended offline Completed: read failure 90% 50556 490221916
# 3 Short offline Completed: read failure 20% 50556 490221916
# 4 Short offline Completed: read failure 20% 50555 490221916
# 5 Extended offline Completed: read failure 90% 50555 490221917
# 6 Short offline Completed: read failure 20% 50554 490221916
# 7 Short offline Completed: read failure 20% 50554 490221916
# 8 Offline Aborted by host 90% 50554 –
# 9 Short offline Completed without error 00% 42680 –
#10 Short offline Completed without error 00% 42 –

#fdisk -lu /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0x447d8526

Device Boot Start End Blocks Id System
/dev/sdb1 63 1953520064 976760001 83 Linux

root@kodaly:~# tune2fs -l /dev/sdb1 | grep Block
Block count: 244190000
Block size: 4096
Blocks per group: 32768

use the lba_of_sector and the start offset in the following calculation

#echo “(1132724807-63)*512/4096” | bc -l

141590593.00000000000000000000

#debugfs
debugfs 1.42 (29-Nov-2011)
debugfs: open /dev/sdb1
debugfs: testb 141590593
Block 141590593 not in use

if it reports as not in use block it out then :

# dd if=/dev/zero of=/dev/sdb1 bs=4096 count=1 seek=141590593

# sync

then

# smartctl -t long /dev/sdb

If it reports in use then

Block 141623865 marked in use
debugfs: icheck 141623865
Block Inode number
141623865 35397635

debugfs: ncheck 35397635
Inode Pathname
35397635 /shares/stuff/Steves Lapto/backups/myers/investigations/Everyman/media/Audio/hitmike.wav