I just installed Lineage OS 16 on my Pixel XL. I was getting an error that there was insufficient space to modify the hosts file. Writing a file elsewhere and creating a symlink was an option, but did not work.
I did some reading and found it to be more of an issue of write permissions...