ovios-shell -guide

OviOS Linux version 2.10 Antares

      OviOS is a linux based storage OS, with out-of-the-box support for iSCSI, SMB and NFS.

      The ovios-shell is the storage management shell for OviOS Linux. The ovios-shell is designed to assist in setting up the server, and requires very little Linux/UNIX/storage knowledge.
      Most commands are interractive and if an error occurs, the messages can be found using 'ovilogs'.

      Do NOT create pools, volumes, LUNs and targets using the Linux bash shell. These will not work well in ovios-shell.
      Objects created and managed with the ovios-shell have specific configurations and specific options set.

      There are 4 steps to create a storage server in less then 10 minutes using the ovios-shell. These are:

1. Configure the network using bondadm and netsetup.

2. Create storage pools. use storage to list all available disks and pool create to create a pool.
If running a Live session, all drives can be used, otherwise pay attention at the message warning abut using the root device.

3. SAN. create one or more iSCSI targets. Use target create to achieve this step.
Create one or more LUNs. Use lun_setup to create and map LUNs in one step. Or use lun create and lun map to create and map a LUN.
NOTE: Make sure to run iscsi reload after every new LUN has been mapped. iscsi reload is very important to make sure the clients will see the new LUNs added to the target.

4. NAS. create one or more volumes with vol create. 
NFS: use nfs_export to make the volume available via NFS.
SMB: without AD: create local SMB users with smbuseradd. 
NOTE: The path to the home will be in this format: /pool/volume
Run smb_export to make the volume available via SMB.
          with AD: run smbjoindc to join a Windows Domain Controller.
Run smb_export to make the volume available via SMB.

      1. Configure the network.

      1.1. Use 'bondadm' to create aggregated links if desired.
      The syntax is: # bondadm -n name -i interface1 -i interface2 -m mode
      'bondadm' is also available in the ovios-shell

      1.2. Use 'netsetup' to setup the network, by setting a static IP or enabling DHCP.

      2. Create the RAID sets or storage pools.
      There are multiple settings available:
                1. Add Raid0 (Stripped devices.) pool
                2. Add Raid1 (Mirrored devices. mirror) pool
                3. Add Raid5 (raidz) pool
                4. Add Raid6 (raidz2) pool
                5. Add Raid10 (mirrored stripped) pool

      2.1. Choose the number corresponding to the desired RAID level.
      Enter a name for the pool, and enter the devices to create the pool.
      Use 'storage' to get a list of all available devices.
      The system accepts devices which can be found in /dev/, such as sda, sdc, sdd etc.
      Or use the full path, such as /dev/disk/by-path/disk1 etc
      For simplicity, the admin should use only dev names (sdb sdc etc). When the pools are imported during a boot up,
      the zfs-admin script will import the devices by path.

      2.2. Add spares and log devices.
      To add spare disks, just type "spare disk1 disk2 disk3..", at the end of the disk list, where disk1,2,3 are the dev names.
      For EX: "Enter devices to add to the pool: sdb sdc sdd sde spare sdf sdg sdh"
      In a mirrored pool (Raid10) you can add spares at the end of the last mirror created, or at the end of each mirror.
      You can add LOG devices as well. EX: "Enter devices to add to the pool: sdb sdc sdd log sde spare sdg sdf"
      Example for a RAID10 setup:
      Enter devices to add to the pool: sdb sdc log sdd spare sde
      Enter devices to create the mirror: sdf sdg spare sdh log sdi

      3. Set up SAN storage
      Use OviOS Linux as an iSCSI Server. OviOS LUNs can be used in UNIX/Linux environments, Windows or VMWare.
      To setup an iSCSI server, the admin must create iSCSI targets, LUNs and map the LUNs to targets.
      Start the iSCSI server with 'iscsi start'

      3.1. Create iSCSI targets.
      Run 'target create' and enter a name for the target when prompted to do so. Enter only a custom name, the IQN and server identifier
      will be added automatically.

      3.2. Create LUNs. Run 'lun create' and create a LUN. A LUN must be created in a storage pool. Enter the storage pool name when prompted.
      A LUN can be thin or thick provisioned. Thin provisioning is disabled by default in OviOS at iSCSI level, because the uderlying
      filesystem (ZFS) doesn't support this functionality yet. However, thin LUNs can be created.
      I strongly recommend to create only thick LUNs to have a better grip on the space available.
      If targets already exist, run 'lun_setup' to create and map the LUN in a single command.
      Map the LUN to a target using 'lun map'. A unique LUN ID will be assigned automatically. This LUN ID will not be changed.
      After LUNs have been mapped, run 'iscsi reload' to make them available.
      A LUN can only be mapped to one target.
          Use meaningfull target names.
          Use only thick LUNs.
          Use target ACL (when creating targets the command will ask for initiator IP or IQN) to control the iSCSI sessions

      4. Set up NAS storage.
      OviOS can be used to share volumes via NFS and SMB.
      Create a volume in a pool with 'vol create' to start.

      4.1. NFS server
      Start with 'nfs start' Supports all NFS versions, up to 4.2.
      Run 'nfs_export' to export a volume via NFS. If client IPs must be enterred, use colon to separate them.
      EX: etc.

      4.2. OviOS SMB server
      Start with 'smb start'

      4.2.1. With local authentication.
      Run 'smbuseradd' to add an emb user. The command will ask for the path where the user's home will be.
      This should be a volume and the path MUST be in this format: /pool/volume
      Do not leave out the first slash and don't append a final slash.

      4.2.2. With remote authentication.
      Join the OviOS SMB Server to a DC. Run 'smbjoindc'. This is a TUI tool which requires:
          - A DC admin user
          - a path to users' homes in this format: /pool/volume
          - DC domain name
          - AD name
          - DNS, NTP and DC IP
      'smb ad-users' will list all available AD users.
      4.2.3. Share volumes via SMB. Run 'smb_export'. This tool will require a user (can be local smb user or AD user) which will be granted admin rights to this share. Permissions can then be assigned from a windows client using this user.
      For more advanced permissions, the admin can use the linux terminal and 'setfacl' to set user permissions.
      Advanced Settings not available from ovios-shell. These require some advanced Linux knowledge.
      Feel free to send me an email at  ovi@ovios.org if you need help with these settings.
      I will use your feedback to improve the ovios-shell and will provide an updated ovios-shell package.
      - CHAP authentication for iSCSI Targets
      - iSNS setup