document partially shared home

This commit is contained in:
2024-11-22 15:11:43 +01:00
parent a6a524b9b2
commit 1624bc56d7
3 changed files with 88 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ chapters:
- file: user-guide/ms_teams
- file: user-guide/evolution_for_o365
- file: user-guide/thunderbird_for_o365
- file: user-guide/partially-shared-home
- file: user-guide/gnome_desktop_icons
- file: user-guide/gnome_screenshots
- file: user-guide/xrdp
@@ -80,6 +81,7 @@ chapters:
sections:
- file: admin-guide/configuration/files/windows_drives_in_home
- file: admin-guide/configuration/files/central_storage_mount
- file: admin-guide/configuration/files/partially-shared-home
- file: admin-guide/configuration/files/autofs
- file: admin-guide/configuration/files/afs
- file: admin-guide/configuration/files/mount

View File

@@ -0,0 +1,28 @@
# Partially Shared Home - Automatically Link Files in Home - Admin Guide
Shared homes create a set of problems depending on how much a software can handle running multiple instances of the same software, maybe with different version, on different hosts, probably at the same time.
Still it is useful to have certain tool settings always with you.
Thus we suggest to have per default a local home drive `base::local_homes: true`, but having only selectively shared software configuration.
That configuration needs then to be on a file share, best the home drive (U:).
To ensure the tools find their configuration at the expected place, symlinks need automatically to be created which point to the shared version.
On the homde drive (U:) therein is also the personal configuration file of this feature (`linux_home_links.yaml` or `.linux_home_links.yaml`).
The mountpoints can be found in `~/network-drives`.
The `U:` drive is there named `home`, while the rest keeps their original share name.
This feature is enabled by default on workstation type systems starting RHEL9.
It can be controlled in Hiera with:
```
user_session::automatic_links_in_home: true
```
To the [User Guide](../../../user-guide/partially_shared_home).
This features depends on the ["Windows Drives in Home Directory" feature](windows_drives_in_home).
Note this does not work for RHEL7.

View File

@@ -0,0 +1,58 @@
# Partially Shared Home - Automatically Link Files in Home - User Guide
Shared homes create a set of problems depending on how much a software can handle running multiple instances of the same software, maybe with different version, on different hosts, probably at the same time.
Still it is useful to have certain tool settings always with you.
With the "Partially Shared Home" feature you can selectively configure what configuration file or directory shall be made available on all the different machines. Talk to your system admin or check the [admin guide](../admin-guide/configuration/files/partially_shared_home) to make that feature available on a specific system.
The configuration file is on your CIFS home drive, also known as U: drive. It needs to be in the base directory and has to be named `linux_home_links.yaml` or `.linux_home_links.yaml`.
Below an example with many different use cases which assumes you would like to have your Linux configuration files in a `linux_config` subdirectory on U:
```
link:
# ssh configuration directory
'.ssh':
to: 'network_drives/home/linux_config/ssh'
# git
'.gitconfig':
to: 'network_drives/home/linux_config/gitconfig'
# vim
'.vimrc':
to: 'network_drives/home/linux_config/vimrc'
# emacs
'.config/emacs/init.el':
to: 'network_drives/home/linux_config/emacs_init.el'
# bash
# RHEL 9 bashrc includes
'bashrc.d':
to 'network_drives/home/linux_config/bashrc.d
# this does not work as usually a ~/.bashrc is installed automatically from /etc/skel
# '.bashrc':
# to 'network_drives/home/linux_config/bashrc
# any other file or directory to show up
```
(if you have more use cases to add, please contact the [Linux Core Group](mailto:linux-eng@psi.ch))
Note that if the intended symlink location already exists (e.g `.ssh`), then it will keep the file or directory.
But an alredy exiting symlink will be updated.
If you beleave not everything is linked properly or to check if everything is fine, have a look at your log:
```
$ journalctl -S today
...
Nov 22 14:11:44 lxdev08.psi.ch systemd[1940551]: Starting Create links in home according to U:\linux_home_links.yaml...
Nov 22 14:11:44 lxdev08.psi.ch create-automatic-links-in-home[1940731]: error processing '.bashrc': [Errno 17] File exists: 'network_drives/home/linux_config/bashrc'
Nov 22 14:11:44 lxdev08.psi.ch systemd[1940551]: Finished Create links in home according to U:\linux_home_links.yaml.
...
$
```
Or you run directly `/opt/pli/bin/create-automatic-links-in-home`, also if you want to have your changes in the configuration file applied immediately.