Multiple file systems for a single home directory

Moderators: jhartley, MSR734, nola

Multiple file systems for a single home directory

Post by grahamperrin » Wed Feb 27, 2013 2:59 am

Much of this will be off-topic from ZEVO but here goes …

A few days ago I wrote:

I would not expect OS X to work properly with a single home directory spread across multiple HFS Plus file systems …


That was too broad a statement – sorry.

shuman wrote:

… Music folder inside my home folder as a zfs filesystem. …


A good point.

Long before I used ZFS, I kept iTunes-related files – but not ~/Music – on a separate HFS Plus file system, and I used a symbolic link.

At viewtopic.php?p=4092#p4092 I wrote:

For a home directory, please use:

  • no more than one file system
  • subdirectories (not separate file systems) at the expected paths.

File System Programming Guide: File System Basics: About the OS X File System


Echoed from viewtopic.php?p=4090#p4090 :

Code: Select all
KRO>zfs list
NAME                                                        USED   AVAIL   REFER  MOUNTPOINT
puddle                                                     347Gi  16.9Gi   656Ki  /Volumes/puddle
puddle/Local                                               346Gi  16.9Gi  2.15Gi  /Local
puddle/Local/Users                                         344Gi  16.9Gi  4.75Mi  /Local/Users
puddle/Local/Users/jolly                                   344Gi  16.9Gi  62.3Gi  /Local/Users/jolly
puddle/Local/Users/jolly/Disks                            26.8Gi  16.9Gi  22.7Gi  /Local/Users/jolly/Disks
puddle/Local/Users/jolly/Downloads                        2.30Gi  16.9Gi   808Mi  /Local/Users/jolly/Downloads
puddle/Local/Users/jolly/Dropbox                          10.3Gi  16.9Gi  3.28Gi  /Local/Users/jolly/Dropbox
puddle/Local/Users/jolly/Library                           105Gi  16.9Gi  25.2Gi  /Local/Users/jolly/Library
puddle/Local/Users/jolly/Library/Caches                   3.53Gi  16.9Gi   524Mi  /Local/Users/jolly/Library/Caches
puddle/Local/Users/jolly/Library/Logs                     17.4Gi  16.9Gi  98.9Mi  /Local/Users/jolly/Library/Logs
puddle/Local/Users/jolly/Library/Mail                     16.3Gi  16.9Gi  15.0Gi  /Local/Users/jolly/Library/Mail
puddle/Local/Users/jolly/Library/Mail Downloads           5.18Mi  16.9Gi   612Ki  /Local/Users/jolly/Library/Mail Downloads
puddle/Local/Users/jolly/Library/Saved Application State   407Mi  16.9Gi  11.6Mi  /Local/Users/jolly/Library/Saved Application State
puddle/Local/Users/jolly/Pictures                         87.5Gi  16.9Gi  85.7Gi  /Local/Users/jolly/Pictures


Potential issues

If points such as the two below are mounts of separate file systems (not standard subdirectories) –

~/Music
~/Pictures

– then I guess that in edge cases, issues with localisation and/or iconography may arise.

Another guess but with stronger caution, I should not recommend a separate file system for

~/Library

If you're lucky, it'll be trouble-free but my gut feeling is that there are – or will be – unknowns. Consider, for example, part of the local ~/Library used for versions of remotely stored files (AFP without support for permanent version storage), and the length of time before that use case was realised.

Sorry I can't be more concrete or technical with these guesses, but the gut feeling is strong. If I find something definite I'll probably post to Ask Different, to fit something like http://apple.stackexchange.com/search?q ... me+library
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Multiple file systems for a single home directory

Post by ilovezfs » Wed Mar 06, 2013 2:05 am

At one point I stored my iPhone backups on a separate disk using a symlink.
For example,
ln -s /Volumes/ExtDrive/iPhoneBackups /Users/joe/Library/Application\ Support/MobileSync/Backup

Generally this worked fine, until I upgraded iTunes. The iTunes upgrade involved some reorganization of the iTunes library's directories. I realized my problems were caused by the symlink when I saw that other users in the Apple forums experiencing the same problems had also been using a symlink for their iPhone Backups directory.

The solution was quite simple, of course: delete the symlink, replacing it with a real directory, let iTunes build the new iTunes Library however it wanted in the new version, restore the symlink to the old backup directory.

Moral of the story: Apple's own applications sometimes assume your home directory is located on a single filesystem, but it is usually possible to work around this if you're willing to put up with a few headaches. To be safe, one should probably use dummy directories during system and application updates, and then reintegrate your zfs datasets at the appropriate mountpoints, which Apple may choose to relocate during an update, depending on the depth of your zfs hierarchy of datasets.
ilovezfs Online


 
Posts: 249
Joined: Sun Feb 10, 2013 9:02 am


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 1 guest

cron