Visit Our UNIX and Linux User Community


Delay mounting of home directory?


 
Thread Tools Search this Thread
Operating Systems Solaris Delay mounting of home directory?
# 1  
Old 01-16-2018
Delay mounting of home directory?

I wonder if it is possible to delay mounting of a home directory?

Here is the background to the problem I am trying to solve:
I have two zfs disks, one rpool disk, and one zfs data disk. On the zfs data disk, I have data directories. In Solaris 11.3 there are default home directories on rpool, called Documents, Public, Downloads, etc. So I have deleted these home directories from rpool, and replaced them with symlinks. These symlinks points to the zfs data disk. So on the zfs data disk there are directories called Documents, Public, Downloads, etc. In my home directory, there are symlinks to these zfs data directories.

I also have a Linux Ubuntu partition. I have done the same thing on the Ubuntu partition. My home directory on the Ubuntu partition contains symlinks, pointing to the zfs data disk.

This means Ubuntu and Solaris shares the same data directories on the zfs data disk. I do not want to share the same home directory between Solaris and Linux, so I have not put the home directory on the zfs data disk. Because the configuration files differs from Solaris and Linux. Linux might use KDE, and Solaris might use Gnome. That will be a problem when I login if I share the same home directory between OSes. So Solaris and Linux home directories are not shared, but the data is shared via symlinks in Solaris and in Linux home directory. This way, I can work with the same data no matter which OS I boot from. I also have a VirtualBox VM data directory which I access from both Solaris and from Linux, so I can work with the same VM from both OSes, without the need to synching data.

Here is the problem. When I bootup Linux, I need to import the zfs data disk. Then I bootup Solaris instead, which makes Solaris complain because Solaris are trying to mount the home directory data folders, which points to the zfs data disk - which is mounted in Linux instead!

When I boot different OSes, I need to import the zfs disk. But then the other OS will complain because it can not mount the home directory. Is there a way to delay mounting of home directories? Then I can bootup an OS and import the zfs data disk, and after that I can manually mount the home directory.

EDIT: Adding "_netdev" in vfstab is the wrong track?
delayed file system mount? (zfs, zvol, ext4) - Ars Technica OpenForum

Last edited by kebabbert; 01-16-2018 at 10:58 AM..
# 2  
Old 01-18-2018
So this is a little confusing to me, so I have a couple of questions.

#1. are you dual/multi booting on the same machine?
#2. are your home dirs not mounted on export/home?
#3. are you aware of zfs set mountpoint=legacy

part of your issue might be the fact that zfs is mounted sooner in the boot order than NFS. if you set the mountpoint=legacy option it's mounted at the same time as NFS disks.
# 3  
Old 01-23-2018
#1. I have installed Solaris and Ubuntu on the same machine. I am dual booting to one of the OSes. Then I access the data disk which is formatted using ZFS. On the data disk there are virtual machines used by VirtualBox.

#2. My home directories are mounted as normal, i.e. /export/home in Solaris and /home in Linux.

#3. No, I am not aware of that command.

My problem is that when I boot into Linux and then reboot into Solaris, then the zfs data disk is imported in Linux. Solaris gets confused because Solaris tries to mount the zfs data disk, which is not imported into Solaris at this point. So I would like to pause Solaris and import the zfs disk so it is possible to mount /export/home, and then continue with bootup. Do you think #3 will help me?
# 4  
Old 01-23-2018
Can you share logs regrading the sentence 'Solaris gets confused' ?
Something must be written in logs, feel free to paste them here if possible.

As for Linux zfs i have no experience, but the common denominator zpool and zfs version should be able to coexist across various systems if configured properly.

Since you are able to use the filesystem on both operating system, we shall assume it is.

Lets say you have a situation :

/home/user -> this is a regular part of rpool on solaris
/home/user -> this is a regular part of root volume group on linux

A third disk is introduced and zpool is created in <input operating system on which you have created the zpool>.

For the sake of argument the mountpoint for that zpool is mounted on /personal_files and it has directory structure behind (Documents, vbox etc.)
The mountpoint is the same on both operating systems.

A soft link is created in linux /home/user pointing to /personal_files/Documents
A soft link is created in Solaris /home/user pointing to /personal_files/Documents

Is the above correct ?
In that case, one should not have any issues regarding mounting the home directory, regardless of soft links pointing to data disk.
No ?
Please provide the exact layout and configuration details as possible.
Including commands used for creation of zpool (operating system where it was initially created and version and zfs properties).

Regards
Peasant.
# 5  
Old 02-04-2018
Yes, the above is correct. I have several soft links from /home/user/Desktop [Documents/Video/etc] pointing to the zfs data disk. Thus, all user data is on the zfs data disk, and no user data is on the Solaris nor Linux install disk.

I have deleted /home/user/Desktop [Documents/Video/etc] folders, and replaced them with soft links, pointing to the zfs data disk.

The problem is that when I boot up Solaris, it cannot find the standard directories Desktop/Documents/Video/etc. This takes a long time as Solaris tries to mount all these folders but fail.

I guess Desktop/Documents/Video/etc all are standard folders that must be mounted upon boot. Maybe if I instead don't touch the folders Desktop/Documents/Video/etc and instead create /personal_files which is a soft link, Solaris will not be struggling. Maybe I am not supposed to touch Desktop/Documents/etc.
# 6  
Old 02-05-2018
I believe your issue is mount order. normally nfs is mounted prior to zfs. if you want to create mountpoints to zfs file systems you have to set mountpoint=legacy. and that will force the zfs mount functions to perform like nfs on boot and boot so they are available when you try to mount them as NFS mount sources.
# 7  
Old 02-08-2018
Can you log in quickly if you use a command-line login? If so, the problem is likely the Gnome desktop that Solaris uses.

Previous Thread | Next Thread
Test Your Knowledge in Computers #697
Difficulty: Medium
The Bazaar software development model is when code is developed over the Internet open and in the public view.
True or False?

9 More Discussions You Might Find Interesting

1. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies

2. AIX

Mounting a directory in a filesystem

Hi All, Recently I came to know my / root file system is getting full because of application directory /siebel/ I have one option. 1) Down the application , take full backup 2)change the filesystem ownership 2)copy the contents into that filesystem cp -pr /siebel/* /siebelfs/* 3)Inform... (9 Replies)
Discussion started by: Thala
9 Replies

3. UNIX for Advanced & Expert Users

Mounting a directory using nfs version4

Hi, I would like to know how can we mount a directory using nfs v4 ? When I use the below command, I am not sure what nfs version am using to mount the directory. mount -t <server_name>:<shared_directory> <shared_directory>. eg: mount -t 10.50.0.8:/home/arun/mount/share_dir... (7 Replies)
Discussion started by: arunsriniv
7 Replies

4. Solaris

Restricting SFTP user to a defined directory and home directory

Hi, I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP. The aim is to... (1 Reply)
Discussion started by: sftpuser
1 Replies

5. SuSE

home directory is not mounting

Our home directory is not mounting in SUSE 10, can you please help me in this regard. Thanks (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

6. Slackware

mounting new directory

hi I installed slackware. How can I mount new partition I edit etc/fstab and add new mount point("back") What should I do next? When I perfom: mount /back it doesnt work. (16 Replies)
Discussion started by: tjay83
16 Replies

7. UNIX for Dummies Questions & Answers

home directory

Hi what is the difference between the directory named /home and the user's home directory? can anyone plz reply? really confuse about it!!!!!!!! thank you (1 Reply)
Discussion started by: nokia3100
1 Replies

8. SCO

/data directory not mounting

Dear sir, In my SCO unix system while running an isql because of the size of the files created the ./data directory become full and now I cannot boot the system in normal mode. I am botting the machine in single user mode but i cannot delete the files from /data directory cos it is not... (2 Replies)
Discussion started by: khelen
2 Replies

9. Windows & DOS: Issues & Discussions

mounting a directory to a windows 2000 shared folder

until recently I've been using the following command successfully: mount -t smbfs -o username=my_user_name,password=password /home/temp/ //oldserver/openexchange To connect to a Win2000 shared folder called openexchange on a machine called //oldserver. But as from today, I've been getting... (2 Replies)
Discussion started by: cw1972
2 Replies

Featured Tech Videos