First, S10u6 has a different security setting when the server communicates to the outside world.
Run this:
# svccfg -s svc:/system/webconsole setprop options/tcp_listen=true; smcwebserver restart
root@newly # svcs -a|grep web
disabled 10:27:07 svc:/application/management/webmin:default
online 10:28:26 svc:/system/webconsole:console
root@newly # svccfg -s svc:/system/webconsole setprop options/tcp_listen=true; smcwebserver restart
Restarting Sun Java(TM) Web Console Version 3.1 ...
The console is running
root@newly #
Now log on to the console: https://<server_name>:6789
If you do not see the ZFS Administration GUI showing there, do this:
# wcadmin deploy -a zfs -x zfs /usr/share/webconsole/webapps/zfs ; smcwebserver restart
Now you should be able to see the GUI. Install this patch if you see a JVM crash. This will happen if you have at least one zpool configured in the system. Thus, it also happens to servers that use ZFS as their root file system.
For S10 - SPARC,
#141104-01: SunOS 5.10: ZFS Administration Java Web Console Patch
For S10 - x86,
#141105-01: SunOS 5.10_x86: ZFS Administration Java Web Console Patch
Run "patchadd" to install the patch. Make sure you restart the web console by running "smcwebserver restart".
ZFS CLI
查看ZFS存储池状态
root@newly # zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
rpool 15.9G 6.04G 9.84G 38% ONLINE -
root@newly # zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c0d0s0 ONLINE 0 0 0
errors: No known data errors
查看ZFS文件系统状态
root@newly # zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 6.95G 8.67G 34K /rpool
rpool/ROOT 4.95G 8.67G 21K legacy
rpool/ROOT/s10x_u8wos_08a 4.95G 8.67G 4.95G /
rpool/dump 1.00G 8.67G 1.00G -
rpool/export 44K 8.67G 23K /export
rpool/export/home 21K 8.67G 21K /export/home
rpool/swap 1G 9.59G 85.0M -
根池做镜像
root@newly # zpool attach rpool c0d0s0 c0d1s0
cannot attach c0d1s0 to c0d0s0: EFI labeled devices are not supported on root pools.
由于根池不支持EFI标签磁盘需要格式化磁盘并改为SMI标签磁盘
root@newly # format –e
format> l
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? y
You must use fdisk to delete the current EFI partition and create a new
Solaris partition before you can convert the label.
format> fdisk 使用fdisk删除EFI分区并重新label为SMI label
root@newly # prtvtoc /dev/rdsk/c0d0s2 | fmthard -s - /dev/rdsk/c0d1s2
fmthard: New volume table of contents now in place.
root@newly # zpool attach rpool c0d0s0 c0d1s0
Please be sure to invoke installgrub(1M) to make 'c0d1s0' bootable.
安装引导信息
SPARC:
# installboot -F zfs /usr/platform/‘uname -i‘/lib/fs/zfs/bootblk /dev/rdsk/c0t1d0s0
X86:
root@newly # installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0d1s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 272 sectors starting at 50 (abs 16115)
root@newly # zpool status
pool: rpool
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scrub: resilver in progress for 0h3m, 17.10% done, 0h18m to go
config:
errors: No known data errors
查看状态可发现数据正在同步,1.03G为已同步的数据量
拆除镜像
root@newly # zpool detach rpool c0d1s0
root@newly # zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c0d0s0 ONLINE 0 0 0
errors: No known data errors
为存储池创建高速缓存设备
对于根池同样需要设置为SMI标签磁盘
root@newly # zpool add rpool cache c1d1s0
root@newly # zpool status
pool: rpool
state: ONLINE
scrub: resilver completed after 0h20m with 0 errors on Wed Jan 27 11:15:00 2010
config:
errors: No known data errors
更换RAIDZ或镜像中的设备
root@newly # zpool replace testpool c2t2d0 c1d1
root@newly # zpool status testpool
pool: testpool
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Wed Jan 27 11:15:10 2010
config: