You can find all the drives and partitions by the command under superuser mode:
To format the partitions as ext3, type:
mke2fs -j /dev/hdxn
Where x=a for primary master, b for primary slave, c for secondary master, d for secondary slave.
Also n is the parition number starting from 1.
For example, mke2fs -j /dev/hdc1 formats the first partition in secondary master hard disk.
Be careful with this. It will erase all data!