Hi All, I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks.
I''m not 100% sure what your question here is, but let me give you a (hopefully) complete answer: (1) ZFS is NOT a clustered file system, in the sense that it is NOT possible for two hosts to have the same LUN mounted at the same time, even if both are hooked to a SAN and can normally see that LUN. (2) ZFS can do failover, however. If you have a LUN from a SAN on hostA, create a ZFS pool in it, and use as normal. Should you with to failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost completely (hung/died/etc) and you are unable to do an ''export'' on it, you can force the import on hostB via ''zpool import -f <zpool>'' ZFS requires that you import/export entire POOLS, not just filesystems. So, given what you seem to want, I''d recommend this: On the SAN, create (2) LUNs - one for your primary data, and one for your snapshots/backups. On hostA, create a zpool on the primary data LUN (call it zpool A), and another zpool on the backup LUN (zpool B). Take snapshots on A, then use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to zpool B. then ''zpool export B'' On hostB, import the snapshot pool: ''zfs import B'' It might just be as easy to have two independent zpools on each host, and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy the snapshot/clone over the wire. -Erik On Wed, 2009-03-11 at 13:18 -0700, Grant Lowe wrote:> Hi All, > > I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks. > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)
Hi Eric, Thanks for the quick response. Then on hostB, the new LUN will need the same amount of disk space for the pool, as on hostA, if I''m understanding you correctly. Correct? Thanks! ----- Original Message ---- From: Erik Trimble <Erik.Trimble at Sun.COM> To: Grant Lowe <glowe at sbcglobal.net> Cc: zfs-discuss at opensolaris.org Sent: Wednesday, March 11, 2009 1:42:06 PM Subject: Re: [zfs-discuss] ZFS on a SAN I''m not 100% sure what your question here is, but let me give you a (hopefully) complete answer: (1) ZFS is NOT a clustered file system, in the sense that it is NOT possible for two hosts to have the same LUN mounted at the same time, even if both are hooked to a SAN and can normally see that LUN. (2) ZFS can do failover, however. If you have a LUN from a SAN on hostA, create a ZFS pool in it, and use as normal. Should you with to failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost completely (hung/died/etc) and you are unable to do an ''export'' on it, you can force the import on hostB via ''zpool import -f <zpool>'' ZFS requires that you import/export entire POOLS, not just filesystems. So, given what you seem to want, I''d recommend this: On the SAN, create (2) LUNs - one for your primary data, and one for your snapshots/backups. On hostA, create a zpool on the primary data LUN (call it zpool A), and another zpool on the backup LUN (zpool B). Take snapshots on A, then use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to zpool B. then ''zpool export B'' On hostB, import the snapshot pool: ''zfs import B'' It might just be as easy to have two independent zpools on each host, and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy the snapshot/clone over the wire. -Erik On Wed, 2009-03-11 at 13:18 -0700, Grant Lowe wrote:> Hi All, > > I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks. > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)
Erik Trimble wrote:> I''m not 100% sure what your question here is, but let me give you a > (hopefully) complete answer: > > (1) ZFS is NOT a clustered file system, in the sense that it is NOT > possible for two hosts to have the same LUN mounted at the same time, > even if both are hooked to a SAN and can normally see that LUN. >Need to be clear on the terminology here. Yes, it is possible for two systems to have access to a single LUN and have ZFS file systems. The ZFS limitation is at the vdev level (partition or slice), which is below the LUN level.> (2) ZFS can do failover, however. If you have a LUN from a SAN on > hostA, create a ZFS pool in it, and use as normal. Should you with to > failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on > hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost > completely (hung/died/etc) and you are unable to do an ''export'' on it, > you can force the import on hostB via ''zpool import -f <zpool>'' >LUN masking or reservations occur at the LUN level, which is why it is often better (safer) to design with the expectation that a LUN will be only available to one host at a time. Or, to say it differently, if you think of one vdev/LUN, then you can innoculate yourself from later grief :-)> > ZFS requires that you import/export entire POOLS, not just filesystems. > So, given what you seem to want, I''d recommend this: > > On the SAN, create (2) LUNs - one for your primary data, and one for > your snapshots/backups. > > On hostA, create a zpool on the primary data LUN (call it zpool A), and > another zpool on the backup LUN (zpool B). Take snapshots on A, then > use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to > zpool B. then ''zpool export B'' > > On hostB, import the snapshot pool: ''zfs import B'' > > > > It might just be as easy to have two independent zpools on each host, > and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy > the snapshot/clone over the wire. >+1 -- richard
On Wed, 2009-03-11 at 13:50 -0700, Grant Lowe wrote:> Hi Eric, > > Thanks for the quick response. Then on hostB, the new LUN will need the same amount of disk space for the pool, as on hostA, if I''m understanding you correctly. Correct? Thanks!I''m assuming you''re referring to my second case, where you don''t bother to ''import''/''export'' and single LUN, and just use the ''send''/''receive'' option. HostB''s zpool only needs to have enough space to handle the snapshot size. You can of course delete a snapshot on either host after it''s taken, so you may not need to keep all snapshots around on both hosts. So, let''s say this happens: pool on hostA is 2TB, with 1TB of active data, and a typical snapshot of 100GB. Which means you can keep around 10 snapshots on hostA. On hostB, you need a zpool of 1TB for the ''live'' data, plus 100GB extra to store an incoming snapshot, but once you''ve received the snapshot, you can delete any older snapshot, so you really only need 1.1TB on hostB. Unless, of course, you want to keep the older snapshots. For old timer''s sake, compare ''zfs send'' and ''zfs''receive'' to ''ufsdump'' and ''ufsrestore'' (respectively) for their utility. -Erik> > > ----- Original Message ---- > From: Erik Trimble <Erik.Trimble at Sun.COM> > To: Grant Lowe <glowe at sbcglobal.net> > Cc: zfs-discuss at opensolaris.org > Sent: Wednesday, March 11, 2009 1:42:06 PM > Subject: Re: [zfs-discuss] ZFS on a SAN > > I''m not 100% sure what your question here is, but let me give you a > (hopefully) complete answer: > > (1) ZFS is NOT a clustered file system, in the sense that it is NOT > possible for two hosts to have the same LUN mounted at the same time, > even if both are hooked to a SAN and can normally see that LUN. > > (2) ZFS can do failover, however. If you have a LUN from a SAN on > hostA, create a ZFS pool in it, and use as normal. Should you with to > failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on > hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost > completely (hung/died/etc) and you are unable to do an ''export'' on it, > you can force the import on hostB via ''zpool import -f <zpool>'' > > > ZFS requires that you import/export entire POOLS, not just filesystems. > So, given what you seem to want, I''d recommend this: > > On the SAN, create (2) LUNs - one for your primary data, and one for > your snapshots/backups. > > On hostA, create a zpool on the primary data LUN (call it zpool A), and > another zpool on the backup LUN (zpool B). Take snapshots on A, then > use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to > zpool B. then ''zpool export B'' > > On hostB, import the snapshot pool: ''zfs import B'' > > > > It might just be as easy to have two independent zpools on each host, > and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy > the snapshot/clone over the wire. > > -Erik > > > > On Wed, 2009-03-11 at 13:18 -0700, Grant Lowe wrote: > > Hi All, > > > > I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks. > > > > _______________________________________________ > > zfs-discuss mailing list > > zfs-discuss at opensolaris.org > > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)
Hi Eric, Thanks. That scenario makes sense. I have a better of how to set things up now. It''s a three-step process, which I didn''t realize. grant ----- Original Message ---- From: Erik Trimble <Erik.Trimble at Sun.COM> To: Grant Lowe <glowe at sbcglobal.net> Cc: zfs-discuss at opensolaris.org Sent: Wednesday, March 11, 2009 1:42:06 PM Subject: Re: [zfs-discuss] ZFS on a SAN I''m not 100% sure what your question here is, but let me give you a (hopefully) complete answer: (1) ZFS is NOT a clustered file system, in the sense that it is NOT possible for two hosts to have the same LUN mounted at the same time, even if both are hooked to a SAN and can normally see that LUN. (2) ZFS can do failover, however. If you have a LUN from a SAN on hostA, create a ZFS pool in it, and use as normal. Should you with to failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost completely (hung/died/etc) and you are unable to do an ''export'' on it, you can force the import on hostB via ''zpool import -f <zpool>'' ZFS requires that you import/export entire POOLS, not just filesystems. So, given what you seem to want, I''d recommend this: On the SAN, create (2) LUNs - one for your primary data, and one for your snapshots/backups. On hostA, create a zpool on the primary data LUN (call it zpool A), and another zpool on the backup LUN (zpool B). Take snapshots on A, then use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to zpool B. then ''zpool export B'' On hostB, import the snapshot pool: ''zfs import B'' It might just be as easy to have two independent zpools on each host, and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy the snapshot/clone over the wire. -Erik On Wed, 2009-03-11 at 13:18 -0700, Grant Lowe wrote:> Hi All, > > I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks. > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)
Hey Richard, That explanation help clarify things. I have another question, but maybe it''ll be a new topic. Basically I would like to export some stuff of vxfs file system on a different host, and import to zfs. Is there a way to do that? grant ----- Original Message ---- From: Richard Elling <richard.elling at gmail.com> To: Erik Trimble <Erik.Trimble at Sun.COM> Cc: Grant Lowe <glowe at sbcglobal.net>; zfs-discuss at opensolaris.org Sent: Wednesday, March 11, 2009 1:52:31 PM Subject: Re: [zfs-discuss] ZFS on a SAN Erik Trimble wrote:> I''m not 100% sure what your question here is, but let me give you a > (hopefully) complete answer: > > (1) ZFS is NOT a clustered file system, in the sense that it is NOT > possible for two hosts to have the same LUN mounted at the same time, > even if both are hooked to a SAN and can normally see that LUN. >Need to be clear on the terminology here. Yes, it is possible for two systems to have access to a single LUN and have ZFS file systems. The ZFS limitation is at the vdev level (partition or slice), which is below the LUN level.> (2) ZFS can do failover, however. If you have a LUN from a SAN on > hostA, create a ZFS pool in it, and use as normal. Should you with to > failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on > hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost > completely (hung/died/etc) and you are unable to do an ''export'' on it, > you can force the import on hostB via ''zpool import -f <zpool>'' >LUN masking or reservations occur at the LUN level, which is why it is often better (safer) to design with the expectation that a LUN will be only available to one host at a time. Or, to say it differently, if you think of one vdev/LUN, then you can innoculate yourself from later grief :-)> > ZFS requires that you import/export entire POOLS, not just filesystems. > So, given what you seem to want, I''d recommend this: > > On the SAN, create (2) LUNs - one for your primary data, and one for > your snapshots/backups. > > On hostA, create a zpool on the primary data LUN (call it zpool A), and > another zpool on the backup LUN (zpool B). Take snapshots on A, then > use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to > zpool B. then ''zpool export B'' > > On hostB, import the snapshot pool: ''zfs import B'' > > > > It might just be as easy to have two independent zpools on each host, > and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy > the snapshot/clone over the wire. >+1 -- richard
On Thu, Mar 12, 2009 at 2:12 AM, Erik Trimble <Erik.Trimble at sun.com> wrote: <snip/>> On the SAN, create (2) LUNs - one for your primary data, and one for > your snapshots/backups. > > On hostA, create a zpool on the primary data LUN (call it zpool A), and > another zpool on the backup LUN (zpool B). ?Take snapshots on A, then > use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to > zpool B. then ''zpool export B''Shouldn''t this be ''zpool export A'' ? -- Sriram
Hi Erik, A couple of questions about what you said in your email. In synopsis 2, if hostA has gone belly up and is no longer accessible, then a step that is implied (or maybe I''m just inferring it) is to go to the SAN and reassign the LUN from hostA to hostB. Correct? ----- Original Message ---- From: Erik Trimble <Erik.Trimble at Sun.COM> To: Grant Lowe <glowe at sbcglobal.net> Cc: zfs-discuss at opensolaris.org Sent: Wednesday, March 11, 2009 1:42:06 PM Subject: Re: [zfs-discuss] ZFS on a SAN I''m not 100% sure what your question here is, but let me give you a (hopefully) complete answer: (1) ZFS is NOT a clustered file system, in the sense that it is NOT possible for two hosts to have the same LUN mounted at the same time, even if both are hooked to a SAN and can normally see that LUN. (2) ZFS can do failover, however. If you have a LUN from a SAN on hostA, create a ZFS pool in it, and use as normal. Should you with to failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost completely (hung/died/etc) and you are unable to do an ''export'' on it, you can force the import on hostB via ''zpool import -f <zpool>'' ZFS requires that you import/export entire POOLS, not just filesystems. So, given what you seem to want, I''d recommend this: On the SAN, create (2) LUNs - one for your primary data, and one for your snapshots/backups. On hostA, create a zpool on the primary data LUN (call it zpool A), and another zpool on the backup LUN (zpool B). Take snapshots on A, then use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to zpool B. then ''zpool export B'' On hostB, import the snapshot pool: ''zfs import B'' It might just be as easy to have two independent zpools on each host, and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy the snapshot/clone over the wire. -Erik On Wed, 2009-03-11 at 13:18 -0700, Grant Lowe wrote:> Hi All, > > I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks. > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA Timezone: US/Pacific (GMT-0800)
Grant, Yes this is correct. If host A goes belly up, you can deassign the LUN from host A and assign to host B. Being that host A has not gracefully exported it''s zpool you will need to ''zpool import -f <poolname>'' to force the pool to be imported because it hasn''t been exported prior to import due to the unexpected inaccessibility of host A. It is possible to have the LUN visible to both machines at the same time, just not in use by both machines. This is in general how clusters work. Be aware that if you do do this and access the disk on both systems then you run a very real risk of corruption of the volume. I use the first approach here quite regularly in what I call ''poor mans clustering''. ;) I tend to install all my software and data environments on SAN based LUNS that allow ease of moving just by exporting the zpool , reassigning the LUN then importing to the new system. Works well as long as both systems are of the same OS revision or greater on the target system. /Scott. Grant Lowe wrote:> Hi Erik, > > A couple of questions about what you said in your email. In synopsis 2, if hostA has gone belly up and is no longer accessible, then a step that is implied (or maybe I''m just inferring it) is to go to the SAN and reassign the LUN from hostA to hostB. Correct? > > > > ----- Original Message ---- > From: Erik Trimble <Erik.Trimble at Sun.COM> > To: Grant Lowe <glowe at sbcglobal.net> > Cc: zfs-discuss at opensolaris.org > Sent: Wednesday, March 11, 2009 1:42:06 PM > Subject: Re: [zfs-discuss] ZFS on a SAN > > I''m not 100% sure what your question here is, but let me give you a > (hopefully) complete answer: > > (1) ZFS is NOT a clustered file system, in the sense that it is NOT > possible for two hosts to have the same LUN mounted at the same time, > even if both are hooked to a SAN and can normally see that LUN. > > (2) ZFS can do failover, however. If you have a LUN from a SAN on > hostA, create a ZFS pool in it, and use as normal. Should you with to > failover the LUN to hostB, you need to do a ''zpool export <zpool>'' on > hostA, then ''zpool import <zpool>'' on hostB. If hostA has been lost > completely (hung/died/etc) and you are unable to do an ''export'' on it, > you can force the import on hostB via ''zpool import -f <zpool>'' > > > ZFS requires that you import/export entire POOLS, not just filesystems. > So, given what you seem to want, I''d recommend this: > > On the SAN, create (2) LUNs - one for your primary data, and one for > your snapshots/backups. > > On hostA, create a zpool on the primary data LUN (call it zpool A), and > another zpool on the backup LUN (zpool B). Take snapshots on A, then > use ''zfs send'' and ''zfs receive'' to copy the clone/snapshot over to > zpool B. then ''zpool export B'' > > On hostB, import the snapshot pool: ''zfs import B'' > > > > It might just be as easy to have two independent zpools on each host, > and just do a ''zfs send'' on hostA, and ''zfs receive'' on hostB to copy > the snapshot/clone over the wire. > > -Erik > > > > On Wed, 2009-03-11 at 13:18 -0700, Grant Lowe wrote: > >> Hi All, >> >> I''m new on ZFS, so I hope this isn''t too basic a question. I have a host where I setup ZFS. The Oracle DBAs did their thing and I know have a number of ZFS datasets with their respective clones and snapshots on serverA. I want to export some of the clones to serverB. Do I need to zone serverB to see the same LUNs as serverA? Or does it have to have preexisting, empty LUNs to import the clones? Please help. Thanks. >> >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>-- _______________________________________________________________________ Scott Lawson Systems Architect Manukau Institute of Technology Information Communication Technology Services Private Bag 94006 Manukau City Auckland New Zealand Phone : +64 09 968 7611 Fax : +64 09 968 7641 Mobile : +64 27 568 7611 mailto:scott at manukau.ac.nz http://www.manukau.ac.nz ________________________________________________________________________ perl -e ''print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'' ________________________________________________________________________