RE: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-15 Thread Jorge Schrauwen
Hey Josh, 

I just remembered this https://github.com/joyent/smartos-live/issues/510

So only add_filesystems is implemented. 

Regards 

Jorge 

On 2016-03-14 17:22, Josh Wilsdon wrote:

>> I used vmadm, it works fine for adding but updating/remove is a bit flaky.
> 
> Hi Jorge, 
> 
> Could you be a bit more specific as to what problems you had with vmadm 
> update/remove? 
> 
> Thanks, 
> 
> Josh
> 
> SMARTOS-DISCUSS | Archives [1] [2] | Modify [3] Your Subscription
> [4]
 

Links:
--
[1] https://www.listbox.com/member/archive/184463/=now
[2] https://www.listbox.com/member/archive/rss/184463/26452851-88b650c7
[3]
https://www.listbox.com/member/?;
[4] http://www.listbox.com



---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


RE: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-14 Thread Jorge Schrauwen
Only the _filesystem variants. 

If memory serves me right: adding them on creation -> OK 

Some of add_filesystems, remove_filesystems or update_filesystems was
broken... I think it was update and remove. I just stopped trying that
all together and recreaste the entire zone of I need to do a change. 

On 2016-03-14 17:22, Josh Wilsdon wrote:

>> I used vmadm, it works fine for adding but updating/remove is a bit flaky.
> 
> Hi Jorge, 
> 
> Could you be a bit more specific as to what problems you had with vmadm 
> update/remove? 
> 
> Thanks, 
> 
> Josh
> 
> SMARTOS-DISCUSS | Archives [1] [2] | Modify [3] Your Subscription
> [4]
 

Links:
--
[1] https://www.listbox.com/member/archive/184463/=now
[2] https://www.listbox.com/member/archive/rss/184463/26452851-88b650c7
[3]
https://www.listbox.com/member/?;
[4] http://www.listbox.com



---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


RE: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-14 Thread Jorge Schrauwen
I used vmadm, it works fine for adding but updating/remove is a bit
flaky. 

On 2016-03-14 13:42, Fred Liu wrote:

> FROM: Jorge Schrauwen [mailto:sjorge...@blackdot.be] 
> SENT: 星期六, 三月 12, 2016 19:37
> TO: smartos-discuss@lists.smartos.org
> CC: 王靖
> SUBJECT: Re: [smartos-discuss] How to mount different zfs volumn to the same 
> lx branded zone 
> 
> Yes, it will work as long as the zone is on the same server as the data. 
> 
> type needs to be set to 'lofs', you probably also want 'options' set to [ 
> 'nodevice' ] 
> 
> [Fred]: Did you update these by vmadm or zonecfg?  In  my tests, it works in 
> zonecfg not vmadm. 
> 
> Thanks. 
> 
> Fred 
> 
> SMARTOS-DISCUSS | Archives [1] [2] | Modify [3] Your Subscription
> [4]
 

Links:
--
[1] https://www.listbox.com/member/archive/184463/=now
[2] https://www.listbox.com/member/archive/rss/184463/26452851-88b650c7
[3]
https://www.listbox.com/member/?;
[4] http://www.listbox.com



---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-14 Thread 王靖
vmadm
below is my steps
1、SmartOS already has pool zones(ssd), and I insert the SATA hard disk

zpool create sata_pool c2t3d0

2、test.son

{
  "brand": "lx",
  "image_uuid": "aae64e42-c88d-11e5-a49d-87f422b1820b",
  "alias": "test",
  "kernel_version": "3.10.0",
  "hostname": "test",
  "max_physical_memory": 1024,
  "resolvers": [
"114.114.114.114",
"8.8.8.8"
  ],
  "quota": "10",
  "filesystems": [
{
  "type": "lofs",
  "source":"/sata_pool",
  "target":"/test"
}
  ],
  "nics": [
{
  "nic_tag": "admin",
  "ip": "10.20.2.49",
  "netmask": "255.255.255.0",
  "gateway": "10.20.2.1",
  "primary": "1"
    }
  ]
}


On Mar 14, 2016, at 8:42 PM, Fred Liu 
<fred_...@issi.com<mailto:fred_...@issi.com>> wrote:



From: Jorge Schrauwen [mailto:sjorge...@blackdot.be]
Sent: 星期六, 三月 12, 2016 19:37
To: smartos-discuss@lists.smartos.org<mailto:smartos-discuss@lists.smartos.org>
Cc: 王靖
Subject: Re: [smartos-discuss] How to mount different zfs volumn to the same lx 
branded zone


Yes, it will work as long as the zone is on the same server as the data.

type needs to be set to 'lofs', you probably also want 'options' set to [ 
'nodevice' ]



[Fred]: Did you update these by vmadm or zonecfg?  In  my tests, it works in 
zonecfg not vmadm.



Thanks.



Fred

smartos-discuss | Archives<https://www.listbox.com/member/archive/184463/=now> 
[https://www.listbox.com/images/feed-icon-10x10.jpg3e17dd9.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc]
 <https://www.listbox.com/member/archive/rss/184463/27989153-41c8820b>  | 
Modify<https://www.listbox.com/member/?;> Your Subscription   
[https://www.listbox.com/images/listbox-logo-small.png3e17dd9.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
 <http://www.listbox.com/>




---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


RE: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-14 Thread Fred Liu


From: Fred Liu [mailto:fred_...@issi.com]
Sent: 星期六, 三月 12, 2016 17:50
To: smartos-discuss@lists.smartos.org; smartos-discuss@lists.smartos.org
Subject: Re: [smartos-discuss] How to mount different zfs volumn to the same lx 
branded zone

It seems hardware pass-through is not applicable in SmartOS from what I know. 
But
there are some indirect methods(NFS/iSCSI) you can try for there is almost no 
network
overhead in LX.


[Fred]: I need to correct my aforementioned typing. Sorry for that! Zones do 
support to import raw and block
devices(including zvol) by using zonecfg. I did test adding  
the smartos usb stick to an OS vm. It works.
   I can make file system(ufs) on it and write some data on it. But 
the bizarre bits are  all the data written in OS
   Vm will vanish if this device is re-imported by global zone 
again. But anyway, passing raw disk to OS vm does occur
  in  heritage from Solaris.



---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread Ian Collins

On 03/12/16 22:49, Fred Liu wrote:
It seems hardware pass-through is not applicable in SmartOS from what 
I know. But
there are some indirect methods(NFS/iSCSI) you can try for there is 
almost no network

overhead in LX.



What problem are you trying to solve?

Have you tried just using one pool and found that option to be inadequate?

Don't forget most Linux applications aren't written with ZFS in mind so 
they suggest all sorts of "performance" tricks we don't have to use.


--
Ian.




---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread Jorge Schrauwen
Yes, it will work as long as the zone is on the same server as the data.


type needs to be set to 'lofs', you probably also want 'options' set to
[ 'nodevice' ] 

Regards 

Jorge

On 2016-03-12 12:08, 王靖 wrote:

> Thanks for your reply. 
> 
> Do you mean that I can solve this issue without using NFS/iSCSI/SMB? 
> In my case, there are one physical machine, 4 SSD,  1 SATA. I group SATA into 
> a pool naming sata_zpool and also group SSD to a pool naming zones. 
> 
> #zpool create sata_zpool c2t3d0 
> #zfs create -V 50G sata_zpool/test 
> 
> #zpool status 
> 
> pool: sata_zpool 
> state: ONLINE 
> scan: none requested 
> config: 
> 
> NAMESTATE READ WRITE CKSUM 
> sata_zpoolONLINE   0 0 0 
> c2t3d0ONLINE   0 0 0 
> 
> errors: No known data errors 
> 
> pool: zones 
> state: ONLINE 
> scan: none requested 
> config: 
> 
> NAMESTATE READ WRITE CKSUM 
> zones   ONLINE   0 0 0 
> raidz1-0  ONLINE   0 0 0 
> c0t0d0  ONLINE   0 0 0 
> c0t1d0  ONLINE   0 0 0 
> c0t2d0  ONLINE   0 0 0 
> c0t3d0  ONLINE   0 0 0 
> 
> errors: No known data errors 
> 
> Then I can write the json file like below 
> 
> test.json 
> { 
> "brand": "lx", 
> "image_uuid": "d5b3865c-0804-11e5-be21-dbc4ce844ddc", 
> "alias": "test", 
> "kernel_version": "2.6.32", 
> "hostname": "test", 
> "max_physical_memory": 1024, 
> "resolvers": [ 
> "114.114.114.114", 
> "8.8.8.8" 
> ], 
> "filesystem": [ 
> { 
> "type": "zfs", 
> "source":"/sata_zpool/test", 
> "target":"/test" 
> } 
> ], 
> "nics": [ 
> { 
> "nic_tag": "admin", 
> "ip": "10.20.2.49", 
> "netmask": "255.255.255.0", 
> "gateway": "10.20.2.1", 
> "primary": "1" 
> } 
> ] 
> }  
> 
> #vmadm create -f test.son 
> #zlogin UUD 
> #df -h 
> 
> Filesystem  Size  Used Avail Use% Mounted on 
> none 11G  562M   10G   6% / 
> 
> It seems that it does not work. Could you please help me? Thanks very much. 
> 
> On Mar 12, 2016, at 5:52 PM, Jorge Schrauwen  wrote: 
> 
> If you just want the storage and not the zfs management layer... 
> 
> You can look in 'man vmadm' under the filesystems property. I use it and it 
> works great to expose my bulk data to multiple zones.
> 
> On 2016-03-12 10:49, Fred Liu wrote: 
> It seems hardware pass-through is not applicable in SmartOS from what I know. 
> But 
> there are some indirect methods(NFS/iSCSI) you can try for there is almost no 
> network 
> overhead in LX. 
> 
> Thanks.
> 
> 发送自 Outlook Mobile [1] 
> 
> On Sat, Mar 12, 2016 at 1:02 AM -0800, "Ian Collins"  
> wrote:
> 
> On 03/12/16 21:49, 王靖 wrote:
>> Thanks for your reply. I try to install NOSQL database aerospike in a > lx 
>> branded zone. It seems that aerospike can put data in SSD and > SATA, so I 
>> want to have a lx branded zone that have SSD and SATA, in > this way I can 
>> store most of the data on SATA while use SSD as a > cache.
> 
> You will probably be much better of just using the SSD as a cache for the 
> zones pool.
> 
> SmartOS is designed to work with a single pool.  Unlike legacy file systems, 
> you generally don't have to mess about with drive configurations with ZFS.
> 
> -- 
> Ian.

 SMARTOS-DISCUSS | Archives [2] [3] | Modify [4] Your 
Subscription
 [5]

 

Links:
--
[1] https://aka.ms/sdimjr
[2] https://www.listbox.com/member/archive/184463/=now
[3] https://www.listbox.com/member/archive/rss/184463/26452851-88b650c7
[4]
https://www.listbox.com/member/?;
[5] http://www.listbox.com



---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread 王靖
Thanks for your reply.

Do you mean that I can solve this issue without using NFS/iSCSI/SMB?
In my case, there are one physical machine, 4 SSD,  1 SATA. I group SATA into a 
pool naming sata_zpool and also group SSD to a pool naming zones.

#zpool create sata_zpool c2t3d0
#zfs create -V 50G sata_zpool/test

#zpool status
  pool: sata_zpool
  state: ONLINE
  scan: none requested
config:

NAMESTATE READ WRITE CKSUM
sata_zpoolONLINE   0 0 0
 c2t3d0ONLINE   0 0 0

errors: No known data errors

  pool: zones
 state: ONLINE
  scan: none requested
config:

NAMESTATE READ WRITE CKSUM
zones   ONLINE   0 0 0
 raidz1-0  ONLINE   0 0 0
   c0t0d0  ONLINE   0 0 0
   c0t1d0  ONLINE   0 0 0
   c0t2d0  ONLINE   0 0 0
   c0t3d0  ONLINE   0 0 0

errors: No known data errors

Then I can write the json file like below

test.json
{
  "brand": "lx",
  "image_uuid": "d5b3865c-0804-11e5-be21-dbc4ce844ddc",
  "alias": "test",
  "kernel_version": "2.6.32",
  "hostname": "test",
  "max_physical_memory": 1024,
  "resolvers": [
"114.114.114.114",
"8.8.8.8"
  ],
  "filesystem": [
{
  “type”: “zfs”,
  "source":”/sata_zpool/test",
  "target":”/test"
}
  ],
  "nics": [
{
  "nic_tag": "admin",
  "ip": "10.20.2.49",
  "netmask": "255.255.255.0",
  "gateway": "10.20.2.1",
  "primary": "1"
}
  ]
}

#vmadm create -f test.son
#zlogin UUD
#df -h
Filesystem  Size  Used Avail Use% Mounted on
none 11G  562M   10G   6% /

It seems that it does not work. Could you please help me? Thanks very much.

On Mar 12, 2016, at 5:52 PM, Jorge Schrauwen 
> wrote:


If you just want the storage and not the zfs management layer...

You can look in 'man vmadm' under the filesystems property. I use it and it 
works great to expose my bulk data to multiple zones.



On 2016-03-12 10:49, Fred Liu wrote:

It seems hardware pass-through is not applicable in SmartOS from what I know. 
But
there are some indirect methods(NFS/iSCSI) you can try for there is almost no 
network
overhead in LX.

Thanks.

发送自 Outlook Mobile



On Sat, Mar 12, 2016 at 1:02 AM -0800, "Ian Collins" 
> wrote:

On 03/12/16 21:49, 王靖 wrote:
> Thanks for your reply. I try to install NOSQL database aerospike in a > lx 
> branded zone. It seems that aerospike can put data in SSD and > SATA, so I 
> want to have a lx branded zone that have SSD and SATA, in > this way I can 
> store most of the data on SATA while use SSD as a > cache.

You will probably be much better of just using the SSD as a cache for the zones 
pool.

SmartOS is designed to work with a single pool.  Unlike legacy file systems, 
you generally don't have to mess about with drive configurations with ZFS.

--
Ian.

smartos-discuss | Archives 
[https://www.listbox.com/images/feed-icon-10x10.jpg3e17dd9.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc]
   | 
Modify Your Subscription   
[https://www.listbox.com/images/listbox-logo-small.png3e17dd9.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
 




---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread Jorge Schrauwen
If you just want the storage and not the zfs management layer... 

You can look in 'man vmadm' under the filesystems property. I use it and
it works great to expose my bulk data to multiple zones.

On 2016-03-12 10:49, Fred Liu wrote:

> It seems hardware pass-through is not applicable in SmartOS from what I know. 
> But 
> there are some indirect methods(NFS/iSCSI) you can try for there is almost no 
> network 
> overhead in LX. 
> 
> Thanks.
> 
> 发送自 Outlook Mobile [1] 
> 
> On Sat, Mar 12, 2016 at 1:02 AM -0800, "Ian Collins"  
> wrote:
> 
> On 03/12/16 21:49, 王靖 wrote:
>> Thanks for your reply. I try to install NOSQL database aerospike in a > lx 
>> branded zone. It seems that aerospike can put data in SSD and > SATA, so I 
>> want to have a lx branded zone that have SSD and SATA, in > this way I can 
>> store most of the data on SATA while use SSD as a > cache.
> 
> You will probably be much better of just using the SSD as a cache for the 
> zones pool.
> 
> SmartOS is designed to work with a single pool.  Unlike legacy file systems, 
> you generally don't have to mess about with drive configurations with ZFS.
> 
> -- 
> Ian.
> 
> SMARTOS-DISCUSS | Archives [2] [3] | Modify [4] Your Subscription
> [5]
 

Links:
--
[1] https://aka.ms/sdimjr
[2] https://www.listbox.com/member/archive/184463/=now
[3] https://www.listbox.com/member/archive/rss/184463/26452851-88b650c7
[4]
https://www.listbox.com/member/?;
[5] http://www.listbox.com



---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread Ian Collins

On 03/12/16 21:49, 王靖 wrote:
Thanks for your reply. I try to install NOSQL database aerospike in a  > lx branded zone. It seems that aerospike can put data in SSD and > 
SATA, so I want to have a lx branded zone that have SSD and SATA, in > 
this way I can store most of the data on SATA while use SSD as a > cache.


You will probably be much better of just using the SSD as a cache for 
the zones pool.


SmartOS is designed to work with a single pool.  Unlike legacy file 
systems, you generally don't have to mess about with drive 
configurations with ZFS.


--
Ian.




---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread 王靖
Thanks for your reply.
I try to install NOSQL database aerospike in a lx branded zone. It seems that 
aerospike can put data in SSD and SATA, so I want to have a lx branded zone 
that have SSD and SATA, in this way I can store most of the data on SATA while 
use SSD as a cache.
Jing
On Mar 12, 2016, at 4:22 PM, Ian Collins 
> wrote:

On 03/12/16 20:15, 王靖 wrote:

> Dear all, My physical machine has one SSD and several SATA. Then I > wan to 
> create a lx branded zone and put some specified data in SSD > and the other 
> data in SATA. I created ssd_pool and sata_pool by these > commands > > zpool 
> create ssd_pool c2t3d0 zfs create -V 50G ssd_pool/mydata > > After I use 
> these commands, what next steps can I do?  Do you have > any ideas? Thank 
> very much.

That isn't the usual way of doing things with SmartOS.  is there any reason why 
you can't use a single pool with the SSD as (depending on the device and your 
workload) a log or cache device?

--
Ian.

smartos-discuss | Archives 
[https://www.listbox.com/images/feed-icon-10x10.jpg3e17dd9.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc]
   | 
Modify Your Subscription   
[https://www.listbox.com/images/listbox-logo-small.png3e17dd9.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
 




---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] How to mount different zfs volumn to the same lx branded zone

2016-03-12 Thread Ian Collins

On 03/12/16 20:15, 王靖 wrote:

Dear all, My physical machine has one SSD and several SATA. Then I  > wan to create a lx branded zone and put some specified data in SSD > 
and the other data in SATA. I created ssd_pool and sata_pool by these > 
commands > > zpool create ssd_pool c2t3d0 zfs create -V 50G 
ssd_pool/mydata > > After I use these commands, what next steps can I 
do?  Do you have > any ideas? Thank very much.


That isn't the usual way of doing things with SmartOS.  is there any 
reason why you can't use a single pool with the SSD as (depending on the 
device and your workload) a log or cache device?


--
Ian.




---
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_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com