Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to move my hibernate file a non-boot-drive disk. I see that the pmset utility is the way to do this but the documentation says that the file must reside on the boot drive. Does anyone know of a way around this restriction? I just don't want 6GB of my SSD being eaten up on a rarely used file that would probably get written and read faster on a HDD anyway.

share|improve this question
up vote 6 down vote accepted

Looks like you should be able to move the hibernation file by:

sudo pmset -a hibernatefile /Volumes/OtherVolume/sleepimage
share|improve this answer
I will have to try that, I use sleep a lot and got a dual drive (ssd+hdd) conf in my MBP and I don't want to wear on the SSD to much. All other tips I've found tell me to disable hibernate entirely but I like the extra security. – Hultner May 7 '11 at 15:34
I too have an SSD that is getting a bit on the full side. Was debating on just creating a symlink, but ended up doing this instead. Thanks for the tip – Justin Sep 16 '11 at 0:10
Uggh.. NM. According to the pmset documentation the hibernate file can only be stored on the root volume =(.. [UPDATE] - I tried it anyways and it works, so far. MBP w/SSD & HD, SSD is root, HD is just extra volume. Sleeps fine, and the hibernate file is created/updated on the HD(non-root). – Justin Sep 16 '11 at 0:39

the file you are referring to is /var/vm/sleepimage. that file is only written when the computer is in safe sleep (hibernate, not regular sleep). why not symlink it to the volume you want it to reside.

sudo rm /var/vm/sleepimage
sudo ln -s /Volumes/MyHD/sleepimage /var/vm/sleepimage

i haven't tested this myself, so your mileage may vary.

share|improve this answer
I've thought about that but kind of wanted to see if anyone had sucessfully done it before. I'm thinking it won't work because if it is coming out of hibernate the system won't have mounted the second drive on that path. Really I came here to see if any one had some deeper knowledge on the subject because I don't want to end up corrupting my account which is file vaulted. – Jason Tholstrup Jan 2 '10 at 11:41

I wouldn't move the sleepimage, but you could use SmartSleep to limit you laptop to only hibernate when your battery is below a certain level.

share|improve this answer
That doesn't really help any because the space will still be used on the disk which is the problem I'm trying to solve. – Jason Tholstrup Jan 2 '10 at 11:37
Well, it can also disable hibernation entirely. – ridogi Jan 2 '10 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .