![]() |
![]() |
|
|
|
|
|
So I've finally given up on Linux on my Mac. I'm running out of space in my Last week I started the process of reformatting. I have four partitions devoted to Linux, and the obvious thing to do would be to combine them into one big partition and mount this under OS X. But I've never much liked dealing with separate partitions. One example of the annoyance involved is that my iTunes library is about 15GB and growing. If I was to move it to a 20GB data partition it would run out of space in the not-too-distant future. One interesting idea is take a data partition and add it seamlessly to my iTunes library, such that new files are created on the new partition but old files stay where they are. That way I could selectively “grow” certain directories without having to commit their contents entirely to one or the other partition. This is exactly what a union mount does.
To learn about union mounts type
union Causes the namespace at the mount point to appear as the
union of the mounted filesystem root and the existing
directory. Lookups will be done in the mounted filesys-
tem first. If those operations fail due to a non-exis-
tent file the underlying directory is then accessed. All
creates are done in the mounted filesystem.
Sounds great, eh? It did to me, so I gave it a shot, union mounting a 5GB data partition on my sudo mount -t hfs -o union /dev/disk0s14 ~n8gray/Music/iTunes/iTunes\ Music
From the terminal's point of view, everything worked splendidly! I created a few files, unmounted the data partition, then re-mounted it elsewhere, and sure enough the files were created in the data partition. I was getting ready to break out the champagne when I noticed that the Finder was acting a bit strangely. For example, when I unmounted the union mount, my entire
Further testing revealed the following interesting behaviors:
The moral of the story? The Finder is lame. (I guess we already knew that.) It doesn't support a really cool feature of the OS, so I'm stuck futzing with symlinks. It really makes me wish the Finder wasn't so deeply embedded in the OS and I could just remove it, but alas, that's thinking “too different” for the Mac world. For more info about union mounts, see Amit Singh's ultra-informative article, What is Mac OS X?, and this article at rentzsch.com.
|
|
![]() |
![]() |



