开始测试 chia 是在 windows 环境,后来要挂机挖矿,也由于 linux 性能比 win 稍高,就做了转移,改装 ubuntu ,已经 p 好的盘是用的原 key , 所以需要转移。
基本情况
chia config (windows) 配置文件
/media/jovi/BOOTCAMP/Users/jovi/.chia/mainnet/config
plot_directories 存放 plot 的目录:
当时用了本地盘和 NAS 盘的若干目录
- \\192.168.3.10\usbshare1\
- \\192.168.3.10\usbshare2\
- \\192.168.3.10\MediaCenter\
- \\192.168.3.10\D1Storeage\
- F:\
NAS 的目录需要在 ubuntu 挂载,目录会变
- /media/NAS/usbshare1
- /media/NAS/usbshare2
- /media/NAS/MediaCenter
- /media/NAS/D1Storeage
本地盘也需要挂载
- F:\
我暂时有这几个本地盘:
10T hdd(ST10000NM0016-1T)
—— 存 plots 盘
2T hdd(WDC WD2005FBYZ-0)
—— 原来的 win 程序盘,swarm bzz data 盘
500GB ssd (Samsung SSD 970 EVO 500GB)
—— 系统盘(多 p 不足时用作 Temp2 )
1T ssd(Force MP510)
—— P盘用
本地盘挂载
查看硬盘信息
sudo blkid
/dev/nvme1n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="e0cdbe98-c2e9-43bc-89c0-4f02c00ed4a0"
/dev/nvme1n1p2: LABEL="Miracle" UUID="A85A1ECB5A1E95E2" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="06bc38ff-ec45-446a-b0d2-7cb88dab7841"
/dev/nvme0n1p1: LABEL="M-fM-^AM-\"M-eM-$M-^M" UUID="E43EE06B3EE037E6" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="92af35d5-3cec-4048-a9a4-9002be5d0bbc"
/dev/nvme0n1p2: UUID="9CE0-89D1" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="9bf75b7e-011b-4eb4-a73c-df43556120e8"
/dev/nvme0n1p3: PARTLABEL="Microsoft reserved partition" PARTUUID="31e7d9e1-3504-46e3-8458-a699be6f82a9"
/dev/nvme0n1p4: LABEL="BOOTCAMP" UUID="1CD2E149D2E127AA" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="e36ad4df-05f5-41f0-a59f-64be382dbd6e"
/dev/nvme0n1p5: UUID="0DC40E180DC40E18" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="35eefb5c-b614-11eb-b445-d31c12dd01fb"
/dev/nvme0n1p6: UUID="A836044936041B48" TYPE="ntfs" PARTUUID="5d6d5760-0fc1-489e-a296-1667856accb5"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="ef90001d-41c6-42e3-ae75-06b460992a3b"
/dev/sda2: LABEL="Repo" UUID="B01C0A7E1C0A3FB8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="fc72ee27-40aa-4c79-b0cf-e95beb96aa25"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="bee12420-b209-43e9-9d00-b37a72923dda"
/dev/sdb2: LABEL="SG 10T" UUID="00CA80E8CA80DAF4" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a5603d1a-8ff1-417b-ad4b-20709393b4c7"
找到要用的分区/硬盘
记录 UUID,类型(开机自动挂载用)
/dev/nvme1n1p2: LABEL="Miracle" UUID="A85A1ECB5A1E95E2" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="06bc38ff-ec45-446a-b0d2-7cb88dab7841"
/dev/nvme0n1p4: LABEL="BOOTCAMP" UUID="1CD2E149D2E127AA" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="e36ad4df-05f5-41f0-a59f-64be382dbd6e"
/dev/sda2: LABEL="Repo" UUID="B01C0A7E1C0A3FB8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="fc72ee27-40aa-4c79-b0cf-e95beb96aa25"
/dev/sdb2: LABEL="SG 10T" UUID="00CA80E8CA80DAF4" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a5603d1a-8ff1-417b-ad4b-20709393b4c7"
手动挂载
建立挂载目录:
mkdir -p /media/jovi/Miracle
mkdir -p /media/jovi/Repo
mkdir -p /media/jovi/SG10T
手动挂载:
sudo mount -t ntfs /dev/nvme1n1p2 /media/jovi/Miracle
sudo mount -t ntfs /dev/sda2 /media/jovi/Repo
sudo mount -t ntfs /dev/sdb2 /media/jovi/SG10T
这里有个坑,直接挂载 ntfs 分区,在 linux 时是不能更改权限的,在 swarm bee 布署时需要用 bee 账号创建应用需要的文件,由于权限问题会失败。
想在 ntfs 分区使用 linux 权限系统有6~7 种方法,比较方便好用的,我选用了 ntfs-3g 的方案。
apt-get install ntfs-3g
然后在 fstab 挂载的时候加相关参数,就可以在 ntfs 分区用 linux 权限系统。
自动挂载
sudo vi /etc/fstab
Fstab 用法见 Linux之/etc/fstab文件讲解 https://blog.51cto.com/u_13570193/2070157
后面添加
UUID=A85A1ECB5A1E95E2 /media/jovi/Miracle ntfs 0 0
UUID=B01C0A7E1C0A3FB8 /media/jovi/Repo ntfs 0 0
UUID=00CA80E8CA80DAF4 /media/jovi/SG10T ntfs 0 0
# Local disk
UUID=A85A1ECB5A1E95E2 /media/jovi/Miracle ntfs-3g auto,users,permissions 0 0
UUID=B01C0A7E1C0A3FB8 /media/jovi/Repo ntfs-3g auto,users,permissions 0 0
UUID=00CA80E8CA80DAF4 /media/jovi/SG10T ntfs-3g auto,users,permissions 0 0
sudo mount -a
将/etc/fstab的所有内容重新加载。
Nas 盘挂载
详见:
https://saywebsolutions.com/blog/mounting_synology_nas_shared_folder_nfs_ubuntu_16_10
步骤:
- Step 1 - 在 Nas 上开启 NFS
Control Panel → File Services → Win/Mac/NFS → NFS Service → Enable NFS
Step 2 - 给共享目录添加 NFS 权限
Step 3 - 确定已安装了
nfs-common
sudo apt install nfs-common
- Step 4 - 挂载共享目录
sudo mount 192.168.3.10:/volume2/MediaCenter /media/NAS/MediaCenter
- Step 5 - 启动自动挂载,编辑
/etc/fstab
192.168.3.10:/volume2/MediaCenter /media/NAS/MediaCenter nfs rsize=8192,wsize=8192,timeo=14,intr
根据教程挂载
手动挂载
mkdir -p /media/NAS/usbshare1
sudo mount 192.168.3.10:/volumeUSB1/usbshare /media/NAS/usbshare1
mkdir -p /media/NAS/usbshare2
sudo mount 192.168.3.10:/volumeUSB2/usbshare /media/NAS/usbshare2
mkdir -p /media/NAS/MediaCenter
sudo mount 192.168.3.10:/volume2/MediaCenter /media/NAS/MediaCenter
mkdir -p /media/NAS/D1Storeage
sudo mount 192.168.3.10:/volume1/D1Storeage /media/NAS/D1Storeage
自动挂载
编辑 /etc/fstab
后面添加
# Nas
192.168.3.10:/volumeUSB1/usbshare /media/NAS/usbshare1 nfs rsize=8192,wsize=8192,timeo=14,intr
192.168.3.10:/volumeUSB2/usbshare /media/NAS/usbshare2 nfs rsize=8192,wsize=8192,timeo=14,intr
192.168.3.10:/volume2/MediaCenter /media/NAS/MediaCenter nfs rsize=8192,wsize=8192,timeo=14,intr
192.168.3.10:/volume1/D1Storeage /media/NAS/D1Storeage nfs rsize=8192,wsize=8192,timeo=14,intr