A modified form of Korteweg-deVries (KdV) equation appropriate to nonlinear ion acoustic solitary waves in an inhomogeneous plasma is derived in the presence of an external magnetic field and constant ionization in the plasma. This equation differs from usual version of the KdV equation because of the inclusion of two terms arising due to ionization and density gradient present in the plasma. In this plasma, only the compressive solitary waves are found to propagate corresponding to the fast and slow modes. The amplitude of the solitary wave increases with an enhancement in the ionization for the fast mode as well as for the slow mode. The effect of magnetic field is to enhance the width of the solitary structure. The amplitude is found to increase (decrease) with an enhancement in charge number of the ions for the fast (slow) mode. The tailing structure becomes more (less) prominent with the rise in ion drift velocity for the case of fast (slow) mode.