NexentaStor 4.0 – New Beta Coming in January

好消息,终于来一个比较像样的 Beta 版本了。可从 3 升级,有可更新的 apt source etc…

Dear Nexenta Community,

Happy Holidays from the Nexenta Team. As we prepare for the holidays, Nexenta is also finishing up final testing and release efforts for a newly revamped 4.0 release of NexentaStor.

NexentaStor 4.0.1 (the “.1” has been added to differentiate from earlier versions of the 4.0 beta software) will be released for beta testing the first full week of January. This will be a simultaneous beta release including:

  • Enterprise Users – Selected enterprise customers will be testing under NDA for enterprise edition.
  • Reseller Partners – All of premier and certified reseller partners will have access to enterprise edition for solutions testing.
  • Community Users – All interested community users are invited to download and test the new 4.0.1 community edition beta software.

The software images and beta release notes will be published at the start of the beta period in January. in the interim, there are a few key updates to be aware of for those who have previously tested the earlier beta releases of NexentaStor 4.0 Community Edition (any milestone version):

  1. Seamless Upgrade from 3.1.5 to 4.0.1 – We will be supporting an inline upgrade (rather than a reinstall) to 4.0.1. In order to be able to do a seamless upgrade, systems will have to be upgraded to the latest 3.1.5 release, and community users must be using a standard image without additional binaries installed on their NexentaStor system.
  2. New license keys – In order to support a seamless upgrade from 3.x to 4.0.1, a previous change to the length of the machine ID has been removed. This however, will impact current 4.0 beta users, requiring 4.0.1 to be a reinstall rather than an upgrade.
  3. Improved support for Windows clients – Support for SMB 2.1 has been added (a natural stopping point to SMB 3.0) and will be tested during beta.
  4. Up to date Illumos kernel – The most current changes have been integrated, and Nexenta has begun updating the open source repository in preparation for the full release.

Check the Forums for the most up to date information about the beta, including question to get your feedback about monitoring beta progress.

We thank you for your patience and continued support while the 4.0 release has been reworked for the upcoming release.

Nexenta Product Management


NexentaStor 翘掉一例


判断应该是磁盘负载过重,导致 NexentaStor 并 ESXi 一起死掉。


该系统配置变量控制设备 I/O 队列大小 (I/O 并发性)。
This system configuration variable controls device I/O queue size (I/O concurrency).

对于 SATA 磁盘,建议值为 ‘1’。
For SATA disks, the recommended value is ‘1’.
For all other disk types, please keep the system default.

请注意,调整此参数可能会影响 I/O 延迟,也许会以原始流吞吐量为代价。
Note that tuning this parameter may affect I/O latency, possibly at the expense of raw streaming throughput.

更多信息,参见 http://en.wikipedia.org/wiki/Native_Command_Queuing.

New Public Beta: NexentaStor Community 4.0 milestone 23

New Public Beta: NexentaStor Community 4.0 milestone 23

NexentaStor 4.0 is now based on the illumos core, which brings along the latest stability and driver updates.

Details: This release is intended for a clean install, upgrading from the 3.x series is not supported in this build.

ISO Image Download: NexentaStor-Community-4.0.0-milestone_23.iso (737MB, md5: f87a860168cb1cb00a874370f1b9a595)
Installation Guide: NexentaStor Installation Guide v4.0 Beta.pdf
User Guide: NexentaStor User Guide v4.0 Beta.pdf


NexentaStor NAS 家用环境置备(一):BT 客户端


对于 7*24 运行的家用 NAS 来说,你肯定想装上可通过 Web 界面访问控制的 BT 客户端——通过动态域名服务的支持,种子在办公室或路上就可以扔到上面,苍老师在你回家之前就已躺好了……:D

这一切在 Linux 的诸多发行版下很容易实现,比如 Debian 只需用 apt-get 就基本上搞定了所有事情。而如果你的 NAS 基于 Solaris,比如 NexentaStor,这也有现成的包,但缺失了一些基本的东西——软件包没给你创建服务进程专有的用户,以及没有按照 Solaris 的标准将“服务”给定义出来。

为什么要选用 NexentaStor?NexentaStor 系出 Solaris,在商业化运作的基础上也提供 Community 版本的软件,对 OS 底层封装得非常不错,相比其他 BSD NAS 方案有着良好的用户使用体验!二则是 ZFS 的优良特性,使得其非常适合家庭持久数据的保存。


NexentaStor ACL

下文将解释如何在 NexentaStor 上安装 BT 客户端 Transmission(它也被很多 PT 支持),并将其配置为 svcadm 所能管控的系统服务。

本文使用的 NexentaStor 为 4.0.0 Beta M20,你可以到 NexentaStor Community Beta 网站上关注其更新。


NexentaStor 使用了 Debian 的软件包管理机制,支持 apt 方式安装和更新软件包。作为一个尚处于 Beta 阶段的专有 OS,官方并未给 NexentaStor 4.0.0 Beta M20 提供可用的 apt deb source,但由于其核心与 Dilos 一样基于 illumos,且都使用 apt,所以我们把下面这几个源加到 /etc/apt/sources.list 当中应当是可行的:
deb http://apt.dilos.org/dilos dilos-unstable main contrib non-free
deb http://apt.dilos.org/dilos dilos-testing main contrib non-free

对了,对于 NexentaStor 来说,默认的 Shell 并不是常见的 Bash,而是其封装好的 nmc,你得进到 Bash 才能编辑上述的 sources.list。这你得动点手脚,具体可以点击这里

[email protected]:/$ option expert_mode = 1
[email protected]:/$ !bash
You are about to enter the Unix ("raw") shell and execute low-level Unix command(s). Warning: using low-level Unix commands is not recommended! Execute?  (y/n)


[email protected]:/volumes#

接下来是导入 dilos 的公钥以验证该 source 的签名,参见“apt-get update 的 NO_PUBKEY 问题解决”:

[email protected]:~# gpg --keyserver subkeys.pgp.net --recv-keys 74DA7924C5513486
[email protected]:~# gpg --export 74DA7924C5513486 | apt-key add -


[email protected]:~# apt-get update
[email protected]:~# apt-get install curl
[email protected]:~# apt-get install unzip

但是,切记除了安装你需要的软件包,不推荐你运行 apt-get upgrade 或者 apt-get dist-upgrade 来更新系统。


同样,我们通过 apt-get install transmission 来完成 Transmission 基本软件包的安装。

[email protected]:~# apt-get install transmission
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'network-transmission' instead of 'transmission'
The following extra packages will be installed:
The following NEW packages will be installed:
  library-libevent network-transmission
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.9 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://apt.dilos.org/dilos/ dilos-unstable/main library-libevent solaris-i386 [628 kB]
Get:2 http://apt.dilos.org/dilos/ dilos-unstable/main network-transmission solaris-i386 [30.3 MB]
Fetched 30.9 MB in 1min 7s (460 kB/s)                                                                                                                                 
Selecting previously unselected package library-libevent.
(Reading database ... 62440 files and directories currently installed.)
Unpacking library-libevent (from .../library-libevent_1.2.10.1_solaris-i386.deb) ...
Selecting previously unselected package network-transmission.
Unpacking network-transmission (from .../network-transmission_1.2.10.2_solaris-i386.deb) ...
Setting up library-libevent ( ...
Setting up network-transmission ( ...

查看 Transmission 版本,2.73,不是最新也尚可:

[email protected]:~# transmission-cli --version
transmission-cli 2.73 (13592)

创建一个新用户 torrentd,用于替换 root 来运行 Transmission 服务进程。

[email protected]:~# mkdir -p /export/home/torrentd
[email protected]:~# cd /export/home/
[email protected]:/export/home# useradd -d /export/home/torrentd -s /bin/false torrentd
[email protected]:/export/home# chown torrentd:other torrentd/
[email protected]:/export/home# ls -la
total 6
drwxr-xr-x 4 root     root  4 Feb  8 00:24 .
drwxr-xr-x 3 root     sys   3 Feb  8  2013 ..
drwxr-xr-x 2 admin    staff 6 Feb  8  2013 admin
drwxr-xr-x 2 torrentd other 2 Feb  8 00:24 torrentd

你可以同时创建 BT 使用的存储目录。NexentaStor 下无疑你希望用上自己的 ZFS 池。

[email protected]:~# mkdir -p /volumes/main/stuff/btdownloads
[email protected]:~# chown -R torrentd:other /volumes/main/stuff/btdownloads


这些基本步骤过后,我们还需要配置 Transmission,而创建配置文件最方便容易的方式莫过于运行 transmission-daemon,它会为我们创建一个母本。通常情况下,这些配置文件将在当前登录的用户主目录中生成,在多用户环境中这是 OK 的,但在这里的场景下我们把它们放在 /var/transmission 目录中。

[email protected]:~# mkdir /var/transmission/
[email protected]:~# transmission-daemon --config-dir /var/transmission -f
[00:35:04.262] Transmission 2.73 (13592) started (session.c:720)
[00:35:04.263] RPC Server Adding address to whitelist: (rpc-server.c:803)
[00:35:04.263] RPC Server Serving RPC and Web requests on port (rpc-server.c:997)
[00:35:04.263] RPC Server Whitelist enabled (rpc-server.c:1001)
[00:35:04.263] UDP Failed to set receive buffer: No buffer space available (tr-udp.c:58)
[00:35:04.263] UDP Failed to set receive buffer: requested 4194304, got 57344 (tr-udp.c:77)
[00:35:04.263] DHT Generating new id (tr-dht.c:309)
[00:35:04.263] Using settings from "/var/transmission" (daemon.c:517)
[00:35:04.263] Saved "/var/transmission/settings.json" (bencode.c:1731)
[00:35:04.263] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:72)
[00:35:04.263] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:72)
[00:35:12.337] Port Forwarding Port Forwarding (port-forwarding.c:93)
[00:35:12.337] Port Forwarding Port Forwarding (port-forwarding.c:93)
[00:35:37.568] DHT Attempting bootstrap from dht.transmissionbt.com (tr-dht.c:247)

现在进程已经起来,配置文件也已经生成,按 CTRL-C 把 transmission-daemon 进程杀掉。你可以看到一些文件已经生成出来:

[email protected]:~# cd /var/transmission/
[email protected]:/var/transmission# ls -la
total 11
drwxr-xr-x  5 root root    6 Feb  8 00:37 ./
drwxr-xr-x 41 root sys    41 Feb  8 00:34 ../
drwxr-xr-x  2 root root    2 Feb  8 00:35 blocklists/
drwxr-xr-x  2 root root    2 Feb  8 00:35 resume/
-rw-------  1 root root 2147 Feb  8 00:37 settings.json
drwxr-xr-x  2 root root    2 Feb  8 00:35 torrents/

最重要的文件是 settings.json ,我们需要在其中设置下载目录(download-directory)以及对本地局域网设置白名单(whitelist) (我这里是 192.168.168.*)。

关于设置文件的一个注意事项:你可以任意编辑此文件,但如果你编辑 settings.json 时 transmission-daemon 处于运行状态,那么服务进程停止时设置文件将被覆写。所以要停掉 transmission-daemon 之后再编辑 settings.json。

"download-dir": "/volumes/main/stuff/btdownloads",
"rpc-authentication-required": false,
"rpc-bind-address": "",
"rpc-enabled": true,
"rpc-password": "------------",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": ",192.168.168.*",
"rpc-whitelist-enabled": true,

Web GUI 的默认端口为 9091,这可以通过编辑 rpc-port 值来变更。



[email protected]:/var/transmission# chown -R torrentd:other /var/transmission

Transmission 配置为系统服务

最后一步是将 Transmission 集成到系统的 Service Management Facility (smf) 当中。这需要一个描述了 Transmission 服务的 XML 配置文件。

基本的 XML 配置文件在 4amlunch.net 可以找到。但因为该配置文件中需要设置一些特定的目录,所以此处编辑了这个文件以适合本文中的叙述。新文件可以在这里找到:

假设传送至 /tmp 目录。

[email protected]:/tmp# unzip transmission.zip
Archive:  transmission.zip
  inflating: transmission-daemon
  inflating: transmission-daemon.xml

[email protected]:/tmp# mv transmission-daemon /lib/svc/method/
[email protected]:/tmp# chmod +x /lib/svc/method/transmission-daemon
[email protected]:/tmp# chown root:bin /lib/svc/method/transmission-daemon
[email protected]:/tmp# svccfg import -V transmission-daemon.xml

现在,我们已经将 transmission-daemon 安装成为了 NexentaStor 的一个服务,它可以使用 svcadm 命令来启动及停止,并使用 svcs 来检查其运行状态。

svcadm enable transmission-daemon
svcadm disable transmission-daemon

以下步骤将启用 Transmission 服务,并检查其状态。

[email protected]:/tmp# svcadm enable transmission-daemon
[email protected]:/tmp# svcs -x transmission-daemon
svc:/application/transmission-daemon:default (Transmission BitTorrent Client (Daemon))
 State: online since February  8, 2013 01:33:33 AM PST
   See: transmission-daemon(1)
   See: http://www.transmissionbt.org
   See: /var/svc/log/application-transmission-daemon:default.log
Impact: None.

这样就可以了,服务已启动并运行,现在我们可以在端口 9091 访问 Transmission 的 WebGUI:


如果希望使用 uTorrent 风格的客户端,那推荐你使用 RPC 客户端来访问 Transmission 守护进程,比如 Transmission Remote GUI,比 Web GUI 更方便强大:

Oracle Solaris 11 Information Library (简体中文)

Oracle Solaris 11 Information Library (简体中文)



Sun文件系统ZFS的十佳特性 [2009年文章编译]





ZFS文件系统采用了256位校验和,当向磁盘写入数据的时候,校验和就会被作为元数据与它相关的数据分开保存。与普通的磁盘块校验和不同的是,这种校验和可以检测出错位写、误读取和误写入、DMA奇偶错误、驱动器bug、意外过量写入以及常见的物理存储的衰减(bit rot)


ZFS文件系统使用多项技术确保数据在磁盘上的一致性/连续性,其中就包括写时才拷贝(Copy on Write),也就是当数据发生变更的时候它并不会覆盖写入——它总是在指针指向变更数据之前被写入到一个新块并产生校验和。旧的数据可能被保存下来,在发生变更的过程中创建文件系统的快照。利用ZFS的文件写入是事务型的——要么将所有数据写入到磁盘,要么什么都不写入。

3、利用Time Slider的数据快照






RAID 5有一个广为人知的缺陷——RAID5 Write Hole。RAID 5在写数据的时候,是分为两步的,首先将数据写到磁盘阵列上,然后将该stripe上数据的校验码记录到阵列上,如果在刚写完数据的时候,系统断电,那么该数据对应的校验码就没有机会再恢复了。如果接下来再发生磁盘故障,RAID重建流程将出现错误数据。唯一的解决方案就是,如果整个stripe发生覆盖写入,就创建一个正确的奇偶校验块。

RAIDZ通过使用可变宽度的条带来解决这个问题,这样每次写入实际上是一个完全的条带写入。再加上ZFS的写入时才拷贝特性,这就完全消除了RAID 5的Write Hole缺陷。RAIDZ2同理,但它使用双奇偶校验,允许阵列中丢失两个磁盘。



可以通过向存储池中添加高性能的SSD,使其变成一个固态混合存储池。当这些固态盘作为高性能缓存时,ZFS会用其储存常用数据以提高性能。另外ZFS还采用了L2 ARC(自适应替代高速缓存)技术来暂存那些无需立即保存的数据——在时间和资源允许的情况下,这些数据会被慢慢迁移到传统的更持久的硬盘驱动器中。









zpool create poolname raidz c1t0d0 c2t0d0 c3t0d0 c4t0d0 c5t0d0