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


Click here to return to the '10.4: Move swap files to another drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Move swap files to another drive
Authored by: oink on Feb 13, '06 06:48:56AM

Noticed that despite the log above, swapfile seems to be moved to the partition and is working:

% ps -wwax | grep dynamic_pager -m1
93 ?? Ss 0:00.00 /sbin/dynamic_pager -F /Volumes/swap/.vm/swapfile

Why does it say:
Unable to mount swap volume swap; using default configuration ?


---
blurred visionary



[ Reply to This | # ]
10.4: Move swap files to another drive
Authored by: syzygies on Feb 13, '06 09:43:48AM

I'm baffled how you could see both of these responses on the same boot. Did you reboot? Can you post or send me your entire log file, if my reply doesn't make sense? If you study the code in /etc/rc.swapfile, you'll see that it is written to not set up the alternate swap location after the Unable to mount swap volume swap; using default configuration error message. On the other hand, the conditions causing the mount_hfs: Resource busy error message could vary from boot to boot. My guess is that your log file will show that you rebooted between seeing the error messages and seeing the swapfile move successfully.

The most likely way that you could be getting a mount_hfs: Resource busy error is if somehow the swap volume is mounting on its own. I haven't naturally observed this behavior myself, but I can artificially reproduce these messages by mounting the swap volume before this section of code.

I changed the logic of the mounting loop in /etc/rc.swapfile. I just posted the new version on my web site, which checks to see if the volume is mounted before each try at mounting it using the mount command. As a bonus, this revised code now also works with Panther, increasing the odds that it will also work unmodified with future versions of OS X.



[ Reply to This | # ]
10.4: Move swap files to another drive
Authored by: oink on Feb 13, '06 10:03:05AM

MY BAD! I just found two instances of:
if [ -f /etc/rc.swapfile ]; then . /etc/rc.swapfile; fi # inserted locally

in my hand edited rc file.

My log contains about 6 similar instances of these lines corresonponding to 6 reboots:
---------
Mon Feb 13 09:31:22 EST 2006
/dev/disk0 aafc5883ce0a2aea473cb0103381e017
/sbin/fsck -y /dev/disk0s7
/sbin/mount -vt hfs /dev/disk0s7 /Volumes/swap
/dev/disk0s7 on /Volumes/swap (local)
Using /dev/disk0s7 for swapfile

Mon Feb 13 09:31:24 EST 2006
/dev/disk0 aafc5883ce0a2aea473cb0103381e017
/sbin/fsck -y /dev/disk0s7
/sbin/mount -vt hfs /dev/disk0s7 /Volumes/swap
mount_hfs: Resource busy
mount_hfs: Resource busy
mount_hfs: Resource busy
mount_hfs: Resource busy
mount_hfs: Resource busy
Unable to mount swap volume swap; using default configuration
---------

I was overwhelmed by the error and never noticed the first part of the log which successfully created and used the swapfile on my swap partition.

Thank you again. And sorry for my unnecessary alarm.



---
blurred visionary



[ Reply to This | # ]