最近刚给家里的DIYnas购入了个nas机箱,就寻思把已经玩得乱七八糟的Ubuntu换了
看B站nas区up主司波图以前有做个一个叫truenas系统的评测
觉得这个Truenas Scale好像还不错,又能玩虚拟机又能玩docker,至少作为一个面板比宝塔要高端好看不少,然后收拾了一下就刷了
手头有不少乱七八糟的硬盘,我也就都给插上了,收拾一下数据啥的
其中有一块有坏道的硬盘,我看着好像不太行了收拾完剩下的数据就直接物理拔出了,因为都是热插拔的口,主板也有设置过觉得没啥问题
然后问题就在于创建了zpool以后直接拔出,虽然从zpool的list里面已经找不到了,但是在网页端这里会一直显示一个disconnect的硬盘,而且卸载不掉
虽然不影响正常,但是看着怪膈应的
点击Export/Disconnect后又会说找不到这个文件夹
在百度上查了半天,好像因为这个系统太新了所以没人发啥相关的东西,今天就去truenas官网那边看了一下,找到的解决方案
First create a sparsefile of the same size (doesn't matter as it's sparse and won't take any real amount of space):
首先创建一个跟你之前硬盘大小相同的sparsefile(不会占用你的真实空间)
truncate -s 1T /root/sparsefile
然后创建一个pool,这里的tmp就是你之前那个删除不掉的pool名字
这里如果你的/mnt里面有东西的话,就在/mnt里面再创建一个空的文件夹就行
Then create your pool (in my case called tmp... make sure to match the name of the Zombie here /mnt X ):
zpool create -f -m /mnt tmp /root/sparsefile
然后去上面的GUI的存储里面去吧那个pool卸载掉就行
Then go to the GUI and disconnect/export it. (doesn't matter if you select to wipe or not, don't bother)
最后删除那个sparsefile
Then you can remove the no longer needed sparsefile:
rm /root/sparsefile
完成