Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Can I make a hot copy of an iSCSI drive?

  1. #1
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Can I make a hot copy of an iSCSI drive?

    That's my question: te reason I have a de-gradated pool that I have to rearrange but I could be best if I first move the iSCSI service to another server.

    Is it possible to do it? I mean with al the service still running...


    regards,
    Marcelo

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Can I make a hot copy of an iSCSI drive?

    I am not quite sure what you mean, but making a copy of the data of a mass-storage device while it is in use (except when that is read-only usage) will of course not be trustworthy and inconsistent in itself.
    Henk van Velden

  3. #3
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Re: Can I make a hot copy of an iSCSI drive?

    If I do a couple of rsyncs to al the data and then one after y swicht betten server that could work.

    but my quiestion is if I can do that but to the whole iscsi disk not only the data inside...

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Can I make a hot copy of an iSCSI drive?

    Quote Originally Posted by maniat1k View Post
    If I do a couple of rsyncs to al the data and then one after y swicht betten server that could work.

    but my quiestion is if I can do that but to the whole iscsi disk not only the data inside...
    What is the difference? When you copy something where somewhere internal things are changing, te result can be everything from correct to utterly mess. It depends of course very much on what is inside. When (some of it) is a database, your whole database could become corrupt. When it is a bunch of "letters to the editor", maybe only one letter will be damaged.

    It is your data, you know what it is, how important it is, etc. Thus you are reponsable. And I assume you can imagin what can happen when you copy one block of a file before a change is made and the next block after a change is made.
    Henk van Velden

  5. #5
    Join Date
    Apr 2011
    Location
    loading ...
    Posts
    53

    Default Re: Can I make a hot copy of an iSCSI drive?

    Quote Originally Posted by hcvv View Post
    What is the difference?
    it's a big difference to copy a lot of small data to a hole disk (that's why I'm making the question if there's a way)

    Quote Originally Posted by hcvv View Post
    When you copy something where somewhere internal things are changing, te result can be everything from correct to utterly mess. It depends of course very much on what is inside. When (some of it) is a database, your whole database could become corrupt. When it is a bunch of "letters to the editor", maybe only one letter will be damaged.
    that's why you do a couple of rsyncs, and a then the final one (with the origin server not publishing anything) will fix those corrupts files....


    Quote Originally Posted by hcvv View Post
    It is your data, you know what it is, how important it is, etc. Thus you are reponsable. And I assume you can imagin what can happen when you copy one block of a file before a change is made and the next block after a change is made.
    that's why I'm asking the question...

    regards,
    Marcelo

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,743

    Default Re: Can I make a hot copy of an iSCSI drive?

    It all depends on the type of data but in almost any case I can think of it is a bad idea to try and back live data that is changing. It is like trying to change tires while driving down the road. You of course do it but your back up data may will be inconsistent. In a production environment It is probably best to mirror the drive and hot swap out the mirrored data periodical. or schedule a maintenances period when a backup can happen. Or lock the file while being copied to stop writes.

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Can I make a hot copy of an iSCSI drive?

    On 2015-08-04 15:36, maniat1k wrote:

    > that's why you do a couple of rsyncs, and a then the final one (with the
    > origin server not publishing anything) will fix those corrupts files....


    No.

    Some files will have finished writing, but others will have started.


    > hcvv;2722462 Wrote:
    >>
    >> It is your data, you know what it is, how important it is, etc. Thus you
    >> are reponsable. And I assume you can imagin what can happen when you
    >> copy one block of a file before a change is made and the next block
    >> after a change is made.

    >
    > that's why I'm asking the question...


    .... which nobody can answer but you :-)


    Me, I would not do it.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Can I make a hot copy of an iSCSI drive?

    On 2015-08-04 18:26, gogalthorp wrote:
    >
    > It all depends on the type of data but in almost any case I can think of
    > it is a bad idea to try and back live data that is changing. It is like
    > trying to change tires while driving down the road. You of course do it
    > but your back up data may will be inconsistent. In a production
    > environment It is probably best to mirror the drive and hot swap out the
    > mirrored data periodical. or schedule a maintenances period when a
    > backup can happen. Or lock the file while being copied to stop writes.


    It would be possible to create a system that creates a photo of a large
    filesystem, at a precise point in time. But it is far from trivial.

    You'd need to completely freeze the filesystem; and in order to avoid
    stopping services and applications, all write operations would have to
    deviate to another space. A read operation would go first to the main
    system, then to the second one to get the most recent changes. During
    this time, a snapshot could be taken, and when finished, all recent
    changes would have to be committed to the main filesystem. I have seen
    this with databases.

    Or, you can do something similar with btrfs. Create a snapshot, then
    make a copy from the snapshot directory, while the filesystem continues
    writing things.


    The result is consistent, in the meaning that all sectors were copied at
    the same point in time. That doesn't mean that the contents are
    consistent: a file could be caught while it was being written to,
    midways. Or worse, rewritten with changed content.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  9. #9
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,055

    Default Re: Can I make a hot copy of an iSCSI drive?

    On Tue, 04 Aug 2015 11:06:01 +0000, maniat1k wrote:

    > That's my question: te reason I have a de-gradated pool that I have to
    > rearrange but I could be best if I first move the iSCSI service to
    > another server.
    >
    > Is it possible to do it? I mean with al the service still running...


    In theory, you could mirror the iSCSI target and then break the mirror
    when the data is duplicated. I haven't tried it myself, but I don't see
    why you couldn't do that.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Can I make a hot copy of an iSCSI drive?

    Quote Originally Posted by hendersj View Post
    In theory, you could mirror the iSCSI target and then break the mirror
    when the data is duplicated. I haven't tried it myself, but I don't see
    why you couldn't do that.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C
    But the moment you brake the mirror, you still can have files that are halway some change. You can of course then restore the situation later, but you can not restore all applications to the state they were in when that situation was valid.

    When someone is editing, changing all occurences in his file of the word "aap" in the word "noot" and halfway the mirror is split, the edit will go on and finish the change, but the split off file will only have half of the changes. Using that for a restore will not please any user. I hope this simple example will be enough for the OP to draw his conclusions.
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •