In the first, "Professor Miller" is modifying "Charles" and is not being acted upon - it's an adjective, and a complement to the direct object, Charles, who is being called Professor Miller.
In the second, "the rabbit" is the direct object - it's being acted upon, that is to say, it's being given. Given to whom? Why to Charles, the indirect object of the sentence.
First, note that "x is y" is not always logically equivalent to "y is x". For example, "Fools are my friends" is different from "My friends are fools" (because the first allows wise men to be my friends too, whereas the second does not); "All men are mortals" is very different from "Mortals are all men" :-)
That said, sometimes there is an equivalence, and some ideas can be expressed either way. In these cases the verb will agree with whichever you choose to make the subject ("One side-effect is headaches"; "Headaches are one side-effect").
(Note that in your examples, "**Our goal were the mountains" is wrong - in standard writing it should always be "Our goal was (complement)". But you could say "The mountains were our goal", with the same basic meaning but different emphasis.)
Addressing your second question: wholesale inversion of a "to be" sentence (where a sentence of the form "noun copula complement" changes to "complement copula noun") is rare, except for in specific situations:
- Questions (because English likes the question word to go first: "Who is Fred? Fred is the tall man"). The inversion always happens unless there's a specific reason not to (perhaps expressing surprise - "He's whose brother?")
- Certain comparative expressions ("Better still are the ones that follow"). The inversion here is optional ("The ones that follow are better still" is fine too).
- Expressions describing location. The simplest in this category are "There is...", "Here are..." and friends, but I'd also include in this category "Next to my house are two restaurants", "Found in every city are cars and buses". This inversion is optional.
- Poetic effect - either for emphasis, or for reasons of metre/rhyme ("Blessed are the meek" - the natural phrasing is "The meek are blessed"; the inversion serves to imply a very great level of blessedness; "Old King Cole was a merry old soul, and a merry old soul was he" - the inversion is clearly unnecessary but nicely fills up the line)
Note that in these situations (except possibly the last), it is usually very clear from the construction that the word or phrase at the start of the sentence is not the subject - often because it's an adjective or adverb phrase. In situations where the distinction is not so clear - such as the examples you provided - inversion will rarely if ever be used (since the sentence tends to end up sounding plain wrong, rather than inverted).
Do note that there are a large number of situations where a slightly different form of inversion ("noun verb complement" changing to "verb noun complement") is used - where it is forced or allowed by the use of certain forms or expressions. Examples such as "Is he tall?", "Never am I angry" are examples of this second kind. I won't attempt to enumerate these, because for one thing there are a lot of them, and for another I don't think the uncertainty you're concerned with arises here. In any case, here is a list of uses of inversion, that contains both types.
[Edit to respond to edit in question]
I have to agree with Fowler about the time periods: the "six months" is considered a single unit, so the singular is used; this is common when referring to measured quantities:
- Ten pounds is a small amount to pay.
- Two litres is more than enough.
We can tell that this is not inversion by using a verb where the ambiguity doesn't arise:
- Six months seems like an eternity.
- Five dollars buys me a very nice lunch.
We can construe the sentence like Fowler as meaning "A period of ...", "An amount of ...", or equivalently by considering the phrase as meaning "Six months of time", "Five pounds of money"; mentioning the uncountable noun makes the reason for the singular clearer, and distinguishes this case from the "light of the stars" case, where there's no obvious way to do the same.
(The plural can sometimes also be used in these cases, giving a sense of referring to each of the individual items mentioned "The six months are dragging on slowly" emphasises that every single one of them is felt.)
Best Answer
You should be careful to distinguish between syntactical labels and semantic labels. Subject and object are syntactic terms: they mostly say something about the form of the sentence, the way it is ordered. Agent and patient are semantic terms: they apply to meaning only.
(Note that the word "I" is one of the few words in English that can only be used as subject (or subject complement). You can't say "the dog beats I": if "I" is object, it should be "me".)
The agent of a sentence is the person or thing that acts upon some other thing. The patient is the person or thing that is acted upon. "I" is the person that acts, so that "I" is the agent. "The dog" is the patient.
The subject of the sentence can be found by answering the question: who is it that "beat"? - It is I who beat the dog. Therefore "I" is also the subject. You need to always take the full predicate, that is all the verbs in the clause, in your question to determine the subject.
Who is the person that acts? - Me. Therefore "me" is the agent. Who is it that "was beaten"? - The dog. Therefore "the dog" is the subject. As you see, in passive constructions the subject is usually the patient (or recipient: there are more than just two semantic roles).
[Edited:] In your example "I am write only", the subject is "I", as Red showed. But I think you want to know whether "I" is the agent or patient of "write" in your sentence. That depends on the meaning of the sentence, which is not clear without context. Since "write-only" is mostly used with computer memory, I will assume that you mean "I" to be analogous to this memory. The sentence to be analysed would then be "this memory is write only".
We could then ask this question: "when someone writes data to a disk, who is it that acts, and who is it that is acted upon?". It is evident that "someone" is the agent, and "a disk" is the thing that is acted upon: therefore the disk is the patient. It follows that in "this memory is write only", the memory is the patient in the context of writing data; the adjective "write-only" must therefore accompany its patient. This means that "I" in your sentence is most probably patient.