diff options
author | Pjotr Prins | 2024-11-19 09:19:12 +0100 |
---|---|---|
committer | Pjotr Prins | 2024-11-19 09:19:18 +0100 |
commit | d043c8035aaec2e9cd02954410483c4b4373cc79 (patch) | |
tree | ca13f0275a679f6ca19923c57b27e043fcfdf302 | |
parent | 5e7c2d7375cefc7db1e5392f658bfef9a2b828ed (diff) | |
download | gn-gemtext-d043c8035aaec2e9cd02954410483c4b4373cc79.tar.gz |
Adding 2nd boot partition on tux02, tux04 and tux05 so we can do remote recovery when the time comes
-rw-r--r-- | tasks/machine-room.gmi | 7 | ||||
-rw-r--r-- | topics/systems/linux/add-boot-partition.gmi | 52 |
2 files changed, 57 insertions, 2 deletions
diff --git a/tasks/machine-room.gmi b/tasks/machine-room.gmi index 661419b..8749518 100644 --- a/tasks/machine-room.gmi +++ b/tasks/machine-room.gmi @@ -14,7 +14,7 @@ * [ ] Trait vectors for Johannes * [ ] !!Organize pluto, update Julia and add apps to GN menu Jupyter notebooks * [ ] !!Xusheng jumpshiny services -* [ ] Slurm on production for GEMMA speedup +* [ ] Slurm+ravanan on production for GEMMA speedup * [ ] Embed R/qtl2 (Alex) * [ ] Hoot in GN2 (Andrew) * [ ] tux02 certbot failing (manual now) @@ -22,8 +22,11 @@ ## Octopus: -* [ ] Fix Tux05 badblocks on /dev/sdb2 1050624 47925247 46874624 22.4G Linux filesystem +* [X] Fix Tux05 badblocks on /dev/sdb2 1050624 47925247 46874624 22.4G Linux filesystem + - see add-boot-partition +* [X] Copy linux partition on tux04, tux05, tux02 * [ ] !!Ceph on Tuxes +* [ ] Centralized user management system * [ ] Monitor nodes * [ ] Check machines so they talk with each other over fiber diff --git a/topics/systems/linux/add-boot-partition.gmi b/topics/systems/linux/add-boot-partition.gmi new file mode 100644 index 0000000..17daeb6 --- /dev/null +++ b/topics/systems/linux/add-boot-partition.gmi @@ -0,0 +1,52 @@ +# Add (2nd) boot and other partitions + +As we handle machines remotely it is often useful to have a secondary boot partition that can be used from grub. + +Basically, create a similar sized boot partition on a different disk and copy the running one over with: + +``` +parted -a optimal /dev/sdb +(parted) p +Model: NVMe CT4000P3SSD8 (scsi) +Disk /dev/sdb: 4001GB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: + +Number Start End Size File system Name Flags + 1 32.0GB 4001GB 3969GB ext4 bulk + +(parted) rm 1 +mklabel gpt +mkpart fat23 1 1GB +set 1 esp on +align-check optimal 1 +mkpart ext4 1GB 32GB +mkpart swap 32GB 48GB +set 2 boot on # other flags are raid, swap, lvm +set 3 swap on +mkpart scratch 48GB 512GB +mkpart ceph 512GB -1 +``` + +We also took the opportunity to create a new scratch partition (for moving things around) and a ceph partition (for testing). +Resulting in + +``` +Number Start End Size File system Name Flags + 1 1049kB 1000MB 999MB fat23 boot, esp + 2 1000MB 24.0GB 23.0GB ext4 boot, esp + 3 24.0GB 32.0GB 8001MB swap swap + 4 32.0GB 512GB 480GB ext4 scratch + 5 512GB 4001GB 3489GB ceph +``` + +Now we have the drive ready we can copy the existing boot partitions and make sure you don't get it wrong and the target partitiong is larger. +Here the original boot disk is /dev/sda (894Gb). We copy that to the new disk /dev/sdb (3.64Tb) + +``` +root@tux05:/home/wrk# dd if=/dev/sda1 of=/dev/sdb1 +root@tux05:/home/wrk# dd if=/dev/sda2 of=/dev/sdb2 +``` + +Next, test mount the dirs and reboot. |