通俗解释UNRAID缓存机制和简单应用

Use cache pool (for new files/directories): No/Yes/Only/Prefer

#通俗解释

  • cache(缓存)只对新数据有效
  • mover是用来将缓存中的数据移动到阵列磁盘中
  • mover可以设置定时任务,在机器空闲时自动运行
  • No:不缓存,数据直接写入阵列。不建议下载用的文件夹设置no
  • Yes:会缓存,但缓存满了会自动写入阵列。
  • Only:只缓存,缓存满了也不会写入阵列。
  • Prefer:和Yes很像,区别是他会在缓存中留一份阵列的镜像数据用于快速读取。一般用于系统盘目录,比如domains目录。

#原文与翻译

Specify whether new files and directories written on the share can be written onto the Cache disk/pool if present. This setting also affects mover behavior.

指定写入共享的新文件和目录是否可以写入缓存磁盘/池(如果存在)。此设置也会影响移动器行为。

No prohibits new files and subdirectories from being written onto the Cache disk/pool. Mover will take no action so any existing files for this share that are on the cache are left there.

No禁止将新文件和子目录写入缓存磁盘/池。 Mover将不执行任何操作,因此缓存中此共享的任何现有文件都将保留在那里。

Yes indicates that all new files and subdirectories should be written to the Cache disk/pool, provided enough free space exists on the Cache disk/pool. If there is insufficient space on the Cache disk/pool, then new files and directories are created on the array. When the mover is invoked, files and subdirectories are transferred off the Cache disk/pool and onto the array.

是表示所有新文件和子目录都应写入缓存磁盘/池,前提是缓存磁盘/池上有足够的可用空间。如果缓存磁盘/池上的空间不足,则会在阵列上创建新文件和目录。调用移动器时,文件和子目录会从缓存磁盘/池中传输到阵列上。

Only indicates that all new files and subdirectories must be written to the Cache disk/pool. If there is insufficient free space on the Cache disk/pool, create operations will fail with out of space status. Mover will take no action so any existing files for this share that are on the array are left there.

仅表示必须将所有新文件和子目录写入缓存磁盘/池。如果缓存磁盘/池上的可用空间不足,创建操作将失败并显示空间不足状态。 Mover将不执行任何操作,因此阵列上此共享的任何现有文件都将保留在那里。

Prefer indicates that all new files and subdirectories should be written to the Cache disk/pool, provided enough free space exists on the Cache disk/pool. If there is insufficient space on the Cache disk/pool, then new files and directories are created on the array. When the mover is invoked, files and subdirectories are transferred off the array and onto the Cache disk/pool.

Prefer表示所有新文件和子目录都应写入缓存磁盘/池,前提是缓存磁盘/池上有足够的可用空间。如果缓存磁盘/池上的空间不足,则会在阵列上创建新文件和目录。调用移动设备时,文件和子目录会从阵列传输到缓存磁盘/池上。

NOTE: Mover will never move any files that are currently in use. This means if you want to move files associated with system services such as Docker or VMs then you need to disable these services while mover is running.

注意: Mover 永远不会移动当前正在使用的任何文件。这意味着如果您想移动与系统服务(例如 Docker 或 VM)关联的文件,则需要在移动程序运行时禁用这些服务。

UNRAID手动配置启动U盘

如果由于某种原因无法使用 USB Flash Creator 工具,或者未检测到您的 USB 闪存设备,则可以手动格式化并准备可启动的 USB 闪存设备。 注意:此方法仅适用于 32GB 及以下的设备

  1. 将 USB 闪存设备插入您的 Mac 或 PC。
  2. 使用 FAT32 文件系统格式化设备。它不能是 ex-FAT 或 NTFS。
  3. 将“卷标”设置为UNRAID(区分大小写,使用全部大写)。
  4. 转到下载页面。获取要使用的版本的 zip 文件。
  5. 选择一个版本并将其下载到您计算机上的临时位置(例如“下载”文件夹)。
  6. 将新下载的 ZIP 文件的内容提取到您的 USB 闪存设备上。
  7. 浏览到 USB 闪存设备以查看从 Mac 或 PC 中新提取的内容。
  8. 如果需要启用 UEFI 引导,请将EFI-目录重命名为EFI
  9. 运行适合您正在使用的操作系统 的make bootable脚本

Windows 7 或更高版本

右键单击make_bootable.bat文件并选择Run as Administrator

苹果电脑

双击文件make_bootable_mac文件并在出现提示时输入您的管理员密码。

Linux

将make_bootable_linux文件复制到硬盘

卸载(不弹出)USB 驱动器

从您将其解压到 Linux 系统上的任何位置运行以下命令:

sudo bash ./make_bootable_linux

注意:在运行此脚本的过程中,闪存设备可能会在您的工作站上消失并重新出现几次——这是预期的行为。

AMH自动定时打包备份全站到群晖NAS

利用AMH的amdata和amcrontab功能可以自动定时备份全站然后上传到群晖NAS。

#配置群晖的FTP服务器

1,控制面板——》文件服务——》FTP——》启用FTP服务

2,做好端口转发,将公网IP的某个端口转发到群晖FTP的21端口。如果有DDNS就更好了,可以参考本站以前的文章:

华硕路由器开启DDNS远程访问

openwrt设置ddns(动态dns)

#安装和配置amdata

1,AMH面板中,备份——》安装amdata

2,进入amdata的远程设置,添加新的FTP连接

类型:填FTP,尽量用被动模式,否则有几率连不上FTP。参考之前的文章:Linux FTP能连通登录但报错
IP/域:群晖的公网IP或者DDNS的域名
端口:端口转发的端口号
保存路径:可以直接填/,表示根目录
账号密码:就是群晖的账号密码

3,完成后测试一下是否能连通

#配置amcrontab定时

1,AMH面板——》系统——》安装amcrontab

2,添加一条新的计划任务

在运行命令中填:amh amdata backup

enjoy~

Linux FTP能连通登录但报错

ftp连接远程设备,可以连通也能正常输入账号密码,但在ftp>后输入指令却显示如下错误信息:

500 Illegal PORT range rejected.
ftp:bind:Address already in use.

# 解决办法

在登录ftp账号后,ftp>输入

passive mode

表示切换到被动模式,输入ls看能不能显示远程目录,如果可以,就成功了。