Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In our UNIX machine my home path looks like /home/<userid> and we have another batch user whose home looks like /export/home/<userid>

I want to know whats the difference between /export/home/<userid> and /home/<userid>?

Why there are difference in folders when both are some user in UNIX?

share|improve this question

5 Answers 5

up vote 5 down vote accepted

As Noufal Ibrahim says, I think this is a Solaris convention.

IIRC, /export/home is used on the server where the actual files live, and /home is where the other servers mount it.

What does mount | grep home say? I'm guessing that /export/home has a file system type of UFS, and /home has a type of NFS?

/etc/fstab may also have some clues.

share|improve this answer
    
/home should be used on the NFS server too. The automounter should manage the mapping there too. –  jlliagre Apr 21 '11 at 9:54

When you create a zone, home directory will be /export/home, so you can use ZFS to protect user's data.

share|improve this answer

Having a home directory being /export/home/username is a configuration oddity.

The convention and best practice is to have /home/username being the home directory and configuring the automounter to manage the mapping between both.

By default the automounter master configuration file /etc/auto_master contains this line:

/home auto_home -nobrowse

That means /home is handled by the automounter. As a consequence, no directory can be directly created there which is a common source of frustration for novice administrators on Solaris.

The /home directory is configured in the /etc/auto_home file. It tells the automounter where to find the actual directory to mount under /home.

For example:

vivek nfsserver:/export/home/&

tells that vivek's home directory is to be found on nfsserver under the /export/home/vivek share.

Locally mounted home directories can be configured that way:

username localhost:/export/home/&

When the automounter detects the file server is local, it uses lofs instead of nfs for performance reasons. These kinds of home directory mounts can also be used with Solaris zones.

share|improve this answer

The idea was/is that /export/home is for a physical locally stored home directory. The word 'export' is from the idea that this home directory could be exported to be used from other hosts as well.

/home on the other hand would the logical mount for your home directory. You should never physically create home directories in /home. It is a place for mounts.

Suppose I have an account on 5 different Solaris hosts. Surely I would like to have only one physical home directory across all those hosts. If the automounter is correctly configured then I would on all 5 hosts see my home directory in /home but that is really just a logical mirror. There would probably be one of the 5 hosts that would hold my physical home directory and on that particular host I would also see my home directory in /export/home.

If your home directory is always locally stored on the machine then you'll always see /export/home.

Too few sites actually centralize home directories in my opinion. But Sun's idea was to use a layout that made such sharing easy and consistent from one host to another. Rarely used and this is the reason that people wonder what it was for.

(Footnote: It was actually only recently, with Solaris 11, that this was made fully consistent so that a user can always see his home directory in /home no matter if the home directory is locally stored in /export/home. This change will make it easier for people from the Linux camp to understand)

share|improve this answer

I've seen the /export/home layout on old Solaris machines that I've used and it was a convention indicating that the partition was exported via. NFS. This is not something that's listed in the FHS so I don't know how "standard" it is really.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.