i don't think that there is homebrew program that will let you format or repair corrupted sectors on your hdd via FTP. FTP is only meant for file transferring and not for maintenance. i doubt that there is even program for performing remote maintenance tasks.
you will just have to connect your hdd with a USB to SATA/IDE adapter to repair corrupted sectors with WinHIIP or you will need to format your hdd under NFTS and then use WinHIIP to format to the ps2 format. just use WinHIIP. yeah i don't like unscrewing my hdd from the network adapter but it's just a must.
PS1/SCPH-7501 | MM3 modchip
PS2 v9 | 250GB hdd | PS3 component cable | katana 32mb mc
PS3/CECH-2001B | 250GB hdd | 3.65 ofw