What I did wrong?
Did you defragment your hard drive before shrinking? If you have 30GB free space on disk it doesn't mean you will be able to shrink out 30GB because of fragmented files.
You will have to reinstall. But before that make sure you have enough space as unallocated space atleast 20gb for a usable system. Did you check your partition size after shrinking?
After reading your comments, its clear that you havent allocated 22GB for Ubuntu. You allocated 12GB for swap area. Swap is not a part of Ubuntu, its a shared area that is used only when RAM is about to fill. Any OS that supports swapping will use the swap area. Since swap is not a part of any OS, it is not showed when you type df
on terminal. You can use GParted to see all partitions of your disk.
Tip: You dont need 12GB of swap. 2GB is sufficient for computers with 4+ GB RAM.