Skip to content

Commit

Permalink
chore: add comments and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed Mar 13, 2024
1 parent 40de678 commit df75eaa
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
4 changes: 4 additions & 0 deletions raspiblitz-custom-install-scripts/tailscale.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# once tailscale is installed and logged in use this to copy the config to the data disk:
# sudo cp -R /var/lib/tailscale /mnt/hdd/app-data/

# these commands can be put in the custom-installs.sh
echo "# Install Tailscale"
mv /var/lib/tailscale /var/lib/tailscale.backup
curl -fsSL https://tailscale.com/install.sh | sh
Expand Down
2 changes: 2 additions & 0 deletions zfs/create-ext4-raspiblitz-disk.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
```
parted -s /dev/${hdd} mkpart primary ext4 1024KiB 100%
mkfs.ext4 -F -L BLOCKCHAIN /dev/${hdd}
# for nvme
mkfs.ext4 -F -L BLOCKCHAIN /dev/${hdd}p1
tune2fs -c 1 /dev/${hdd}
```

Expand Down
30 changes: 29 additions & 1 deletion zfs/create-raspiblitz-zfs-disk.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Mount to /mnt/hdd](#mount-to-mnthdd)
- [manual Raspiblitz config with the zfs pool mounted](#manual-raspiblitz-config-with-the-zfs-pool-mounted)
- [Attach a new disk to an existing pool](#attach-a-new-disk-to-an-existing-pool)
- [Replace a missing disk with a new disk](#replace-a-missing-disk-with-a-new-disk)
- [ZFS encryption key operations](#zfs-encryption-key-operations)
- [Temperature monitoring](#temperature-monitoring)
- [Import an existing ZFS pool](#import-an-existing-zfs-pool)
Expand Down Expand Up @@ -198,7 +199,7 @@
EXISTING_DISK=<existing-disk-id>
# choose the new disk id from:
# the tmlist of physical disks
# the list of physical disks
lsblk --scsi
# get the IDs
ls -la /dev/disk/by-id
Expand All @@ -211,6 +212,33 @@
zpool status
```
## Replace a missing disk with a new disk
```
# choose the existing disk from:
zpool status
POOL_NAME=<pool name>
EXISTING_DISK=<existing-disk-id>
# choose the new disk id from:
# the list of physical disks
lsblk --scsi
# get the IDs
ls -la /dev/disk/by-id
NEW_DISK=/dev/disk/by-id/ata-<new-disk-id>
# Clear the partition table:
sgdisk --zap-all $NEW_DISK
# Clean a disk which was previously used with zfs:
wipefs -a $NEW_DISK
# overwrite with ext4
mkfs.ext4 -F -L BLOCKCHAIN $NEW_DISK
# replace
zpool replace -f $POOL_NAME $EXISTING_DISK $NEW_DISK
```
## ZFS encryption key operations
* ```
# backup the key
Expand Down
3 changes: 3 additions & 0 deletions zfs/restore-raspiblitz-zfs-disk.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
) | crontab -u admin -
# list the active crontab for admin
crontab -u admin -l
# disable swapfile service
```

## Restore a Raspiblitz ZFS disk
Expand Down

0 comments on commit df75eaa

Please sign in to comment.