我最近通过增加了两个驱动器扩展了我的存储池“zstorage”。 在RAID-Z中有3个3TB磁盘驱动器,并且在RAID-Z中也增加了两个1.5TB磁盘驱动器(据我所知,它和镜像效果是一样的)。 我知道这不是最有效的设置,但这是我的驱动器。 我预计在平价的情况下,我应该使用第一套的6TB和第二套的1.5TB,共计7.5TB。
添加后,一切看起来都很好,从下面的命令中可以看到,现在有更多的空间列在zpool列表中,驱动器显示为我所期望的zpool状态。 但是,可用磁盘空间量并未增加,如下所示。
任何想法,为什么我没有得到更多的磁盘空间呢? 我似乎没有从添加两个1.5TB驱动器获得什么。
kevin @ atlas:〜$ sudo zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT zstorage 10.8T 7.79T 3.05T 71% 1.00x ONLINE -
kevin @ atlas:〜$ sudo zfs list -t all
NAME USED AVAIL REFER MOUNTPOINT zstorage 5.19T 1.48T 5.19T /zstorage
kevin @ atlas:〜$ sudo zpool status -v
pool: zstorage state: ONLINE scan: scrub in progress since Sat Apr 5 10:49:13 2014 317G scanned out of 7.79T at 262M/s, 8h18m to go 1.50M repaired, 3.97% done config: NAME STATE READ WRITE CKSUM zstorage ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 ata-WDC_WD30EZRX-00DC0B0_WD-WCC1T1735698 ONLINE 0 0 0 (repairing) ata-WDC_WD30EZRX-00DC0B0_WD-WMC1T0506289 ONLINE 0 0 0 ata-WDC_WD30EZRX-00MMMB0_WD-WCAWZ2711600 ONLINE 0 0 0 raidz1-1 ONLINE 0 0 0 ata-WDC_WD15EADS-00P8B0_WD-WMAVU0454800 ONLINE 0 0 0 ata-WDC_WD15EADS-00P8B0_WD-WMAVU0524642 ONLINE 0 0 0 errors: No known data errors
kevin @ atlas:〜$ df -h / zstorage /
Filesystem Size Used Avail Use% Mounted on zstorage 6.7T 5.2T 1.5T 78% /zstorage
一切正常。 你TiB TB与TiB混淆。
zpool list ) zfs list ) 你有:
产生了12TB的原始存储量。
○ → units 12TB TiB * 10.913936 / 0.091625969
这大致是你在zpool列表中获得的空间:
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT zstorage 10.8T 7.79T 3.05T 71% 1.00x ONLINE -
至于可用:
在TiB:
○ → units 7.5TB TiB * 6.8212103 / 0.14660155
你有:
NAME USED AVAIL REFER MOUNTPOINT zstorage 5.19T 1.48T 5.19T /zstorage
zstorage文件系统使用了5.19TiB和1.48TiB(总共6.67TiB)。 足够接近6.82TiB(我会有一些开销)。
你应该检查自动扩展属性是为你的zpool设置的。
$ zpool get autoexpand zstorage
如果该属性设置为closures,则应将其设置为打开以使您的池自动展开以填充可用空间。
$ zpool set autoexpand=off zstorage
为了清楚起见,我将包含手册页的相关部分。
autoexpand=on | off Controls automatic pool expansion when the underlying LUN is grown. If set to on, the pool will be resized according to the size of the expanded device. If the device is part of a mirror or raidz then all devices within that mirror/raidz group must be expanded before the new space is made available to the pool. The default behavior is off. This property can also be referred to by its shortened column name, expand.
我相信你也可以使用
$ zpool online -e zstorage
指示池手动扩展,但我自己并没有使用这个命令。 我不确定是否需要首先离线(我认为这是不必要的)。
zpool online [-e] pool device... Brings the specified physical device online. This command is not applicable to spares or cache dev- ices. -e Expand the device to use all available space. If the device is part of a mirror or raidz then all devices must be expanded before the new space will become available to the pool.