Hi, all
I want to add a ZFS volume to non-global zone, I use these steps to do this
    1)create a non-global zone, such as LX branded zone, the test.json file is 
like below and the image is CentOS.

{

  "alias": "lx-addZFSVolume",

  "brand": "lx",

  "kernel_version": "3.13.0",

  "max_physical_memory": 2048,

  "cpu_cap": 100,

  "hostname": "lx-zfs-volume",

  "quota": 20,

  "image_uuid": "07b33b7a-27a3-11e6-816f-df7d94eea009",

  "resolvers": [

       "10.20.5.1",

       "10.20.5.2",

       "114.114.114.114",

       "8.8.8.8"],

  "nics": [

    {

      "interface": "net0",

      "nic_tag": "admin",

      "ip": "10.20.5.150",

      "gateway": "10.20.5.1",

      "netmask": "255.255.255.0"

    }

  ]

}

2) After I use “vmadm create –f test.json” command, I can get the <UUID> of 
this zone. Then I use the zfs and zonecfg command to add the zfs volume
# zfs create –V 5gb zones/vol
#zonecfg –z <UUID>
>add device
>set match=/dev/zvol/dsk/zones/vol
>end
>commit
>verify
>exit
#vmadm restart <UUID>

3) After I restart this virtual matchine, I find that there will be one 
directory zones under /dev/zvol/dsk.  But I can not find the vol directory, I 
also can not use “fdisk –l” command in this LX branded zone, I do not know 
whether
I successful add the ZFS volume to this lx branded zone

My question is that

1)       How can I know whether successfully add the ZFS volume to this LX 
branded zone(CentOS)

2)       Besides the zonecfg command, do I have some other methods to add the 
ZFS volume to this lx branded zone, like modifying the json file to achieve 
this target.

Thanks
Jing
Briphant Technologies Co., Ltd.






-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to