Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create eessi_with_pxe.md #61

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions eessi_with_pxe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Setting up EESSI with PXE

To use eessi with PXE it is necessary to create a loop device for each compute node in the shared filesystem and then
mount it on /var/lib/cvmfs.

Creating a loop device:
```bash
sudo dd if=/dev/zero of=/sharedfs/loopdevices/${HOSTNAME} bs=4M count=5120
sudo mkfs.ext4 /sharedfs/loopdevices/${HOSTNAME}
```
Create a script that can be run by systemd on bootup. In /usr/local/bin/cvfms-startup.sh enter:
```
#!/bin/bash

/usr/sbin/losetup /dev/loop0 /sharedfs/loopdevices/${HOSTNAME}
/bin/mount -o loop /dev/loop0 /var/lib/cvmfs
cvmfs_config reload
```

Create the following systemd service script in /lib/systemd/system/cvmfs.service:
```
[Unit]
Description=Setup Loop Device and Mount Shared Filesystem
After=udev.service
After=mountkernfs.service
After=remote-fs.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/cvmfs-setup.sh

[Install]
WantedBy=multi-user.target
```

Create a symbolic link in /etc/systemd/system to /lib/systemd/system/cvmfs.service:

```
cd /etc/systemd/system
sudo ln -s /lib/systemd/system/cvmfs.service cvmfs.service
```

Enable and start the service:
```
sudo systemctl enable cvmfs.service
sudo systemctl start cvmfs.service
```