new: nightbase mig

This commit is contained in:
2025-11-14 00:19:46 +09:00
parent 7449a15389
commit 2f3d199fab
8 changed files with 79 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# 실행 안되면 램 64기가도 없는 허-접
sudo mount -t tmpfs -o size=64G tmpfs /tmp/night-tmp --mkdir
SOURCE_PATH=/x/nvme1/NightBase
DESTINATION_PATH=/tmp/night-tmp/NightBase
sudo rsync -a --info=progress2 $SOURCE_PATH/ $DESTINATION_PATH

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
DISK_LABEL="ssd1"
DEVICE="/dev/nvme1n1"
MOUNT_POINT="/x/nvme1"
sudo gdisk "$DEVICE" <<EOF
o
y
n
1
8300
w
y
EOF
PART_DEV="/dev/$(lsblk -ln -o NAME "$DEVICE" | sed -n '2p')"
echo "PARTITION: $PART_DEV"
sudo mkfs.btrfs -L "$DISK_LABEL" "$PART_DEV" -f
sudo mount "$PART_DEV" "$MOUNT_POINT"

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
SOURCE_PATH=/tmp/night-tmp/NightBase
DESTINATION_PATH=/x/nvme1/NightBase
sudo rsync -a --info=progress2 $SOURCE_PATH/ $DESTINATION_PATH

View File

@@ -0,0 +1,4 @@
# NightBase Migration
## Goal
- Move NightBase quickly to the other folder.

View File

@@ -0,0 +1,16 @@
# Review
## 0001-temp-backup.sh
- **CRITICAL**: No validation that tmpfs mount succeeded before rsync
- **CRITICAL**: No check that source path exists
- **CRITICAL**: No check for sufficient available RAM (64GB required)
## 0002-partition.sh
- **CRITICAL**: Will destroy all data on `/dev/nvme1n1` without confirmation
- **CRITICAL**: Variable `$PART_DEV` may fail if lsblk output format differs; needs `/dev/` prefix for mkfs.btrfs
- **WARNING**: No validation that device exists before gdisk
## 0003-temp-restore.sh
- **CRITICAL**: No check that source path exists
- **CRITICAL**: No validation that destination is mounted/writable
- **WARNING**: Will overwrite existing data at destination without confirmation