Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Move swap to another partition in Panther' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Move swap to another partition in Panther
Authored by: EatingPie on Nov 13, '03 08:42:00PM

I will check both of these methods and update accordingly. But let me throw out a few comments first... my purpose is to welcome discussion here, not to be critical.

BTW, it doesn't matter if a directory used as a mountpoint contains anything, no need to remove it.

The reason for the removal is not for a *correctly* mounted Swap volume. If your Swap FAILS to mount, the vm system will create a swap directory in "/Volumes/Swap" but this will be on your root volume. Then when the Swap Volume *does* mount, it will mount as "/Volumes/Swap 1". This means your Swap is mounted in the wrong place, and the swap files *still* go on your root volume (now into a directory named "/Volumes/Swap")! AND... since that directory exists between reboots, your swap volume will NEVER mount on "/Volumes/Swap" and your vm files will NEVER go onto the separate volume! Ack!

So the removal code occurs to fix a (possible) previous failure.

See, the trick is not to get this to work when all things are happy and normal. It's to cover your OSes ass! That's why the removal occurs, and so on. *Without checking* (that's a caveat), this is why I believe Swap Cop will not work either. Yeah, in situation normal. But what if you force reboot? Or what if your Swap Volume gets corrupted? Maybe it does work, but, again, I am suspect. Why? For the plain and simple fact that most early Swap-moving implementations in Jaguar didn't work when stress tested as well. (And c'mon, we all have to force reboot sometime or another... and it's unacceptable for this to permanently disable your swap move!)

I will check Swap Cop though to see what it does. I will also try the different mount syntax. I'm all for simplicity, and I would have definitely preferred a *smaller* solution. But I think the mount syntax change will only be a... well... mount syntax change! I am dubious on it actually helping. But we'll see...

BTW... Feel free to comment on what I've said. If this leads to a better solution, that would rock!

What I'm saying here may be scaring some people away at this point. So let me say this: I have thoroughly tested this solutuon. THOROUGHLY. I even destroyed my Swap volume (accidentally), and this method was STILL able to recover and get my swap running on it without any intervention on my part.

So I am *very* confident of its stability, otherwise I would not have posted it!

---
-Pie


[ Reply to This | # ]

10.3: Move swap to another partition in Panther
Authored by: daniel_steffen on Nov 13, '03 10:56:18PM
Pie,
my purpose is to welcome discussion here, not to be critical.
sure, no prob
The reason for the removal is not for a *correctly* mounted Swap volume. If your Swap FAILS to mount, the vm system will create a swap directory in "/Volumes/Swap" but this will be on your root volume. Then when the Swap Volume *does* mount, it will mount as "/Volumes/Swap 1".
I do understand this and know the problem from Jaguar but I don't believe this can occur anymore in Panther with my setup above, a mount as /Volumes/Swap 1 can only occur if mount -vat hfs fails but autodiskmount -va later on (in StartupItems) is successful at mounting the volume. This sort of thing used to happen on 10.1/10.2 but with better support for fstab on Panther it doesn't seem to happen anymore as far as I've seen, but further testing would cetainly be useful to confirm this.

See, the trick is not to get this to work when all things are happy and normal. It's to cover your OSes ass!
most early Swap-moving implementations in Jaguar didn't work when stress tested as well.
I agree w.r.t Jaguar, where I know this problem well (the best way to workaround it there was to run autodiskmount in /etc/rc)

However, this seems much improved in Panther, _if_ you use fstab as above; which makes all the precautions that were needed for Jaguar unnecessary in my experience.

FWIW I haven't seen any of the Jaguar style problems with my technique across numerous hard reboots and panics in many seeds of Panther as well as the final release.

But I think the mount syntax change will only be a... well... mount syntax change!
the important thing to understand is that the existing, early mount -vat hfs in /etc/rc has no effect with fstab formatted as in your original hint, whereas it does indeed cause the mount and disk check if explicit /dev/disk* is used. That's what makes all the difference and makes your use of mount_hfs unnecessary.

Let me note that it is possible that the improved behaviour vs Jaguar I'm seeing is related to use of journaled HFS which doesn't cause fsck to run, but I doubt it since I had the same volume journaled under 10.2 (not a swap volume btw) and I needed the autodiskmount workaround.



[ Reply to This | # ]