In this paper, we investigate a GI /M/1 queue with the two-stage vacation policy. The system will first enter a working vacation once the system becomes empty in the normal busy period, during which the service rate will be switched to a lower rate. After this working vacation, if the system is nonempty, the service rate will be switched to the normal rate immediately; otherwise, the system will enter multiple vacations during which the service rate reduces to zero until the system is nonempty after one vacation and a new normal busy period starts. The distinguishing feature of this paper is the use of a general algorithm for solving the difference equation based on the right shift operator method to obtain the queue length distribution at pre-arrival time and arbitrary time. Moreover, the sojourn time of arbitrary customer is analyzed. Finally, several typical numerical examples are provided to validate our computational algorithm.