[PVE-User] ZFS iSCSI issues

Usama Ahmad u.usama at gmail.com
Tue Aug 18 00:11:38 CEST 2015


Hello Michael,

Thank you for the pointers, I have it up and running now. Steps to bandage
issue for posterity below.

Sincerely,
Usama

On SmartOS box

> # stmfadm import-lu /dev/zvol/rdsk/zones/vm/vm-104-disk-1

which will then give output for

> # stmfadm list-lu -v
>  <crop>
> LU Name: 600144FAADBAFCF10D99DF39554264B0
>     Operational Status: Online
>     Provider Name     : sbd
>     Alias             : /dev/zvol/rdsk/zones/vm/vm-104-disk-1
>     View Entry Count  : 1
>     Data File         : /dev/zvol/rdsk/zones/vm/vm-104-disk-1
>     Meta File         : not set
>     Size              : 107374182400
>     Block Size        : 512
>     Management URL    : not set
>     Vendor ID         : SUN
>     Product ID        : COMSTAR
>     Serial Num        : not set
>     Write Protect     : Disabled
>     Writeback Cache   : Disabled
>     Access State      : Active

and we follow with

>  # stmfadm add-view 600144FAADBAFCF10D99DF39554264B0


Now just need to add this to my bootup script



# cat /opt/custom/share/svc/smartos_setup.sh


> #!/bin/bash

# Simple Ad Hoc SmartOS Setup Service



set -o xtrace



. /lib/svc/share/smf_include.sh



cd /

PATH=/usr/sbin:/usr/bin:/opt/custom/bin:/opt/custom/sbin; export PATH


> case "$1" in

'start')

    #### Insert code to execute on startup here.


>     cp /opt/custom/init /etc/default/init

    hostname "store" && hostname > /etc/nodename

    rtc -z US/Eastern

    GROUPNAME=store

    TARGETNAME=iqn.2010-08.org.illumos:02:$GROUPNAME

    LOCAL_ADDRESS=172.16.35.90

    svcadm enable stmf

    svcadm enable -r svc:/network/iscsi/target:default

    sbdadm create-lu /dev/zvol/rdsk/zones/iscsi

    GUID=$(sbdadm list-lu | tail -n 1 | cut -f1 -d' ')

    stmfadm add-view $GUID

    itadm create-tpg "$GROUPNAME" $LOCAL_ADDRESS

    itadm create-target -t "$GROUPNAME" -n $TARGETNAME

    ;;


> 'stop')

    ### Insert code to execute on shutdown here.

    ;;


> *)

    echo "Usage: $0 { start | stop }"

    exit $SMF_EXIT_ERR_FATAL

    ;;

esac

exit $SMF_EXIT_OK




On Mon, Aug 17, 2015 at 3:16 PM, Michael Rasmussen <mir at miras.org> wrote:

> On Mon, 17 Aug 2015 14:44:39 -0400
> Usama Ahmad <u.usama at gmail.com> wrote:
>
> > That is indeed the issue. It may be off topic/list but any pointers on
> how
> > I should fix that.
> >
> > [root at store ~]# stmfadm list-lu -v | grep -B3 'zones/vm/vm-104-disk-1'
> > grep: illegal option -- B
> > grep: illegal option -- 3
>
> What solaris brand and version are you using?
>
> grep with option -B has been supported for a very long time.
>
> --
> Hilsen/Regards
> Michael Rasmussen
>
> Get my public GnuPG keys:
> michael <at> rasmussen <dot> cc
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
> mir <at> datanom <dot> net
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
> mir <at> miras <dot> org
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
> --------------------------------------------------------------
> /usr/games/fortune -es says:
> I'm definitely not in Omaha!
>
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-user/attachments/20150817/66fbe9ba/attachment.htm>


More information about the pve-user mailing list