Skip to content

new NFS server: kobudai - #77

Merged
24apricots merged 6 commits into
ocf:mainfrom
dotlambda:trenderhoof
Jul 13, 2026
Merged

new NFS server: kobudai#77
24apricots merged 6 commits into
ocf:mainfrom
dotlambda:trenderhoof

Conversation

@dotlambda

@dotlambda dotlambda commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

This is supposed to recreate https://github.com/ocf/puppet/blob/master/modules/ocf_filehost/manifests/init.pp as a NixOS config, which (besides NTP and storage) is the only thing configured on dataloss: https://github.com/ocf/puppet/blob/master/hieradata/nodes/dataloss.yaml
This is what the file /etc/exports created by this config looks like:

/opt/homes \
  admin(rw fsid=0 no_subtree_check no_root_squash) \
  www(rw fsid=0 no_subtree_check no_root_squash) \
  ssh(rw fsid=0 no_subtree_check no_root_squash) \
  apphost(rw fsid=0 no_subtree_check no_root_squash) \
  adenine(rw fsid=0 no_subtree_check no_root_squash) \
  guanine(rw fsid=0 no_subtree_check no_root_squash) \
  cytosine(rw fsid=0 no_subtree_check no_root_squash) \
  thymine(rw fsid=0 no_subtree_check no_root_squash) \
  fluttershy(rw fsid=0 no_subtree_check no_root_squash) \
  rainbowdash(rw fsid=0 no_subtree_check no_root_squash)

That should hopefully be the exact same as the file on dataloss (please check if you have access).

fixes #68

@dotlambda
dotlambda marked this pull request as draft November 21, 2025 05:51
Comment thread hosts/servers/trenderhoof.nix Outdated
@dotlambda

Copy link
Copy Markdown
Contributor Author

These are the disks on dataloss:

$ lsblk -o +fstype
NAME      MAJ:MIN RM   SIZE RO TYPE   MOUNTPOINT FSTYPE
sda         8:0    0    59G  0 disk
├─sda1      8:1    0    58G  0 part   /          ext4
├─sda2      8:2    0     1K  0 part
└─sda5      8:5    0   975M  0 part   [SWAP]     swap
sdb         8:16   0 894.3G  0 disk
└─sdb1      8:17   0 894.3G  0 part              linux_raid_member
  └─md126   9:126  0   3.5T  0 raid10            ext4
sdc         8:32   0 894.3G  0 disk
└─sdc1      8:33   0 894.3G  0 part              linux_raid_member
  └─md126   9:126  0   3.5T  0 raid10            ext4
sdd         8:48   0 894.3G  0 disk
└─sdd1      8:49   0 894.3G  0 part              linux_raid_member
  └─md126   9:126  0   3.5T  0 raid10            ext4
sde         8:64   0 894.3G  0 disk
└─sde1      8:65   0 894.3G  0 part              linux_raid_member
  └─md126   9:126  0   3.5T  0 raid10            ext4
sdf         8:80   0 894.3G  0 disk
└─sdf1      8:81   0 894.3G  0 part              linux_raid_member
  └─md126   9:126  0   3.5T  0 raid10            ext4
sdg         8:96   0 894.3G  0 disk
└─sdg1      8:97   0 894.3G  0 part              linux_raid_member
  └─md126   9:126  0   3.5T  0 raid10            ext4
sdh         8:112  1  14.6G  0 disk              iso9660
├─sdh1      8:113  1   378M  0 part              iso9660
└─sdh2      8:114  1   2.5M  0 part              vfat
nvme1n1   259:0    0   7.3T  0 disk              linux_raid_member
└─md127     9:127  0   7.3T  0 raid1  /opt/homes ext4
nvme0n1   259:1    0   7.3T  0 disk              linux_raid_member
└─md127     9:127  0   7.3T  0 raid1  /opt/homes ext4

I'm not sure why the RAID 10 array called md126 is there. It doesn't seem to be mounted.
The home directories are stored on ext4 in a RAID 1 called md127.
We can either keep that setup (and thus won't have to copy the data to other disks) or build a new one. In the latter case, we'd probably use ZFS mirrors to replicate the current setup.

@dotlambda

Copy link
Copy Markdown
Contributor Author

Do we want to replicate the SSH motd saying

Hi, I am dataloss, a physical server at 169.229.226.6.
NFS Host
  - Puppet classes: ocf_filehost
  - DNS names: filehost, homes, services

?

Comment thread hosts/servers/trenderhoof.nix Outdated
Comment thread modules/ocf/nfs-export.nix
@24apricots 24apricots moved this from Backlog to In progress in OCF Issue Tracker Apr 26, 2026
@dotlambda
dotlambda marked this pull request as ready for review July 2, 2026 06:23
@dotlambda dotlambda changed the title add NFS export on trenderhoof add NFS export on kobudai Jul 2, 2026
BNH440
BNH440 previously approved these changes Jul 2, 2026
@BNH440

BNH440 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

ok I fixed a few remaining issues, should be good to go for testing on friday

@BNH440
BNH440 force-pushed the trenderhoof branch 2 times, most recently from 229c9f9 to b67692b Compare July 3, 2026 21:30
@dotlambda
dotlambda force-pushed the trenderhoof branch 2 times, most recently from 41ba82d to 934e405 Compare July 4, 2026 02:02
@BNH440

BNH440 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

is there a reason this wasn't merged yet?

@BNH440 BNH440 mentioned this pull request Jul 7, 2026

@24apricots 24apricots left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last bits of polish...

Comment thread hosts/server/kobudai.nix Outdated
Comment thread hosts/server/kobudai.nix
Comment thread hosts/server/kobudai.nix
Comment thread hosts/server/kobudai.nix
Comment thread hosts/server/kobudai.nix Outdated
Comment thread hosts/server/kobudai.nix
Comment thread hosts/server/kobudai.nix

@BNH440 BNH440 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to #339 being merged we need to update masterkeys and rekey on this branch to make sure these secrets are keyed with rsang's key

Co-authored-by: 24apricots <michaelzls@berkeley.edu>
BNH440
BNH440 previously approved these changes Jul 7, 2026

@BNH440 BNH440 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed the rekey

@24apricots 24apricots left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :)

@24apricots
24apricots enabled auto-merge July 13, 2026 00:50
@24apricots
24apricots added this pull request to the merge queue Jul 13, 2026
@24apricots
24apricots removed this pull request from the merge queue due to a manual request Jul 13, 2026
@24apricots 24apricots changed the title add NFS export on kobudai new NFS server: kobudai Jul 13, 2026
@24apricots
24apricots merged commit 513efba into ocf:main Jul 13, 2026
3 checks passed
@dotlambda
dotlambda deleted the trenderhoof branch July 13, 2026 04:02
@dotlambda dotlambda mentioned this pull request Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

migrate dataloss to nixos

5 participants