Re-reading the partition table failed with error 22: invalid argument

Setting up partitions on other partitions isn't a supported operation. If you want to subdivide your /dev/sda2 then one option is to use LVM2 (that's Arch Linux documentation but applies everywhere).

For your example of three 512Mb:

pvcreate /dev/sda2
vgcreate TEST /dev/sda2
lvcreate -L 512M -n one TEST
lvcreate -L 512M -n two TEST
lvcreate -L 512M -n three TEST

This will give you /dev/TEST/one /dev/TEST/two and /dev/TEST/three as separate 512Mb slices, without having a partition within a partition.