Is it safe to eject an SSD running your OS while the computer is asleep? I have macOS Sierra installed on a external SanDisk SSD. I use it for school &amp; work related stuff. I plug it into my MacBook Pro via USB and I boot into instead of the actual HDD that is installed in the laptop. At the end of the day I pack up my stuff and go home. What I do is turn off the laptop and then unplug the SSD. This is getting quite annoying and I was wondering if it was okay to put the macbook to sleep and then disconnect the SSD. Once home I would plug back the SSD again and wake the macbook. Would that cause any errors?
I decided to TOFTT and put things to the test. I closed all applications running and clicked the apple icon and set the MBP to sleep. Once the screen turned black I closed the lid. I waited approximately 4-5 seconds and then unplugged the SSD (via USB) and re-connected on another USB port. When I opened the lid, it woke right away (As in it didn't go into the login screen). The OS was frozen. I couldn't click on anything. I just saw the desktop. I had to force shut down the MBP. So I am guessing what I am trying to accomplish is not possible. My only other thought is that maybe I didn't let the computer sleep long enough and I opened it right away which caused that error.