What is porosity?
How one answers this question will partly depend upon the particular application that one is dealing with. Since the author of this question did not provide a specific context upon which this term should be applied, efforts will be made to respond to this question within the context of Geological applications. In Geology, porosity refers to a measure of how much of a particular rock is open space. This open space can occur within cracks or between the grains within the rock. For contrast, the term permeability would refer to the ease in which fluid can flow through a porous rock material.
As a general rule of thumb, the following general equation applies:
Vb = Vp + Vg
Vb is the bulk volume.
Vp is the pore volume.
Vg is the grain volume.
In general, the bulk volume of the rock that is under consideration is equal to the sum of the pore volume and grain volume. Based upon the information that is provided within the initial post, it is unknown what one is actually determining the porosity of. To that end, it is recommended that the author of this question carefully reflect upon how to determine Vb, Vp, and Vg within the context of the specific problem that is being worked on in order to determine porosity. If you determine Vb and Vg, you can find Vp by rearranging the given equation.
Vp = Vb - Vg