在osol jeos 中安装 程序 2
Part2: Creating NAS server on OpenSolaris JeOS Prototype
2.Option 1: Install STORAGE-SERVER with all servers/protocol
Note: This one is too BIG for small CLI JeOS Prototype, it install a GUI X/Gnome dependencies and large driver set, see bellow:
2. Install storage-nas and COMSTAR
Enable NFS server start even when no NFS shares are defined:
6. Play now for example with ZFS compression
Export ZVOL as iSCSI deciveroot@osol-jeos:~# zfs get compressratio rpool/export/home/cifsshareNAME PROPERTY VALUE SOURCErpool/export/home/cifsshare compressratio 1.00x -root@osol-jeos:~# zfs set compression=on rpool/export/home/cifsshareCopy there some data which can be well compressed like logs:root@osol-jeos:~# zfs get compressratio rpool/export/home/cifsshareNAME PROPERTY VALUE SOURCErpool/export/home/cifsshare compressratio 1.89x -
1. First we need to activate COMSTAR
root@osol-jeos:~# svcadm disable iscsitgtroot@osol-jeos:~# svcadm enable stmroot@osol-jeos:~# svcs stmfSTATE STIME FMRIonline 12:16:51 svc:/system/stmf:defaultroot@osol-jeos:~# svcadm enable iscsi/targetroot@osol-jeos:~# svcs iscsi/targetSTATE STIME FMRIonline 12:18:05 svc:/network/iscsi/target:default
Create a zpool RIADZ ‘ipool’ from pre-prepared disks
Note: From preprepared 3x 6Gb disks size of 2 disks will be avaiable for ZVOL and snapshost
root@osol-jeos:~# pkg install SUNWinstall-testDOWNLOAD PKGS FILES XFER (MB)Completed 1/1 7/7 0.25/0.25PHASE ACTIONSInstall Phase 23/23Deleting content cacheroot@osol-jeos:~# /opt/install-test/bin/test_td -dDisk discoveryTotal number of disks: 6---------------------------------num | name| ctype|size [MB]|---------------------------------1 |* c1t0d0| scsi| 8192|2 | c1t1d0| scsi| 80|3 | c1t2d0| scsi| 6144|4 | c1t3d0| scsi| 6144|5 | c1t4d0| scsi| 6144|6 | dump|unknown| 384|---------------------------------root@osol-jeos:~# zpool create ipool raidz c1t2d0 c1t3d0 c1t4d0root@osol-jeos:~# zpool list ipoolNAME SIZE USED AVAIL CAP HEALTH ALTROOTipool 17.9G 740K 17.9G 0% ONLINE -root@osol-jeos:~# zfs list ipoolNAME USED AVAIL REFER MOUNTPOINTipool 91.2K 11.7G 25.3K /ipool
I will create a 8G zpool so we have space for snapshots
root@osol-jeos:~# zfs list ipool/iscsishareNAME USED AVAIL REFER MOUNTPOINTipool/iscsishare 8G 11.7G 21.3K -
Share this iscsipool by iSCSI (with COMSTAR)
root@osol-jeos:~# ls /dev/zvol/rdsk/ipool/iscsishare/dev/zvol/rdsk/ipool/iscsishareroot@osol-jeos:~# sbdadm create-lu /dev/zvol/rdsk/ipool/iscsishareCreated the following LU:GUID DATA SIZE SOURCE-------------------------------- ------------------- ----------------600144f0b9a2c80000004b2782400001 8589869056 /dev/zvol/rdsk/ipool/iscsishareroot@osol-jeos:~# stmfadm add-viewroot@osol-jeos:~# stmfadm list-view -l 600144f0b9a2c80000004b2782400001View Entry: 0Host group : AllTarget group : AllLUN : 0root@osol-jeos:~# itadm create-targetTarget iqn.1986-03.com.sun:02:b2229ed6-abb8-c3ce-af87-d5924432c8e7 successfully created
Now you can use iSCSI Initiator (Client) in your OS to access share,interesting option is to use a build in iSCSI initiator build in VirtualBox Virtualization, see more blog:
Using Solaris iSCSI target in VirtualBox iSCSI Initiator
RAIDZ Hint: You can use a disk corrupting scrip to test a ZFS RAIDZ functionality, like Ronny’s DD random harmer in: