mirror of
https://github.com/openoms/bitcoin-tutorials.git
synced 2025-12-18 20:44:20 +01:00
chore: add comments and formatting
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}
|
||||
```
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user