I have been using targetcli to play around with LIO. I need to configure the LIO targets,
backstores, luns etc through c or c++ program. There are multiple ways to achieve that
- use targetcli. It is easy but then you are invoking python from the c/c++ program and
have to parse the targetcli output. I am not thrilled about parsing text output and i am
not sure how granular it is (in terms of configFS attributes). Also, it has python
dependency.
- use configFS directly. That means, interact with the kernel drivers directly. It gives
more control but i am not sure how frequently configFS LIO attributes change from one
release to another and what is backward compatibility?
- i would prefer some c lib which i can link to. But i didn't come across one yet