Professional Web Applications Themes

moving files - Linux / Unix Administration

When a filesystem is restructured (e.g. new space is made available), and data needs to be moved from an old space to a new space, what's a good plan for doing that? Our sysadmin copies the data (through cp or two tars or whatever). And later deletes the data. That's fine with me, but he doesn't lock down the old area (by e.g. keeping everyone else out while the cp is going on by restricting permissions). So, as people keep using the old area, he has no idea whether the new area is still in sync with the old area. ...

  1. #1

    Default moving files

    When a filesystem is restructured (e.g. new space is made available), and
    data needs to be moved from an old space to a new space, what's a good plan
    for doing that?

    Our sysadmin copies the data (through cp or two tars or whatever). And
    later deletes the data. That's fine with me, but he doesn't lock down the
    old area (by e.g. keeping everyone else out while the cp is going on by
    restricting permissions). So, as people keep using the old area, he has no
    idea whether the new area is still in sync with the old area.

    Isn't this a bad idea?


    sinister Guest

  2. #2

    Default Re: moving files

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    sinister wrote: 

    FWIW, this is my opinion only. Take it for what it's worth.

    When making backups or moving directory trees around, unless you are willing
    to live with potential file syncronization errors, the sysadm should take the
    system into single user mode before starting the copy, and revert to multiuser
    mode once the copy (and validation) is complete.

    S/he might risk remaining in multiuser mode /if/ the directory tree is stable
    (no changes to it will be made during the time the backup or move process is
    executing), but for active directory trees (/var or /home, for instance) the
    only /safe/ way to move them is to restrict access to read only or no access
    at all.

    Having said all that, it depends on the environment and the use of the
    machine. Some systems can be permitted to be volatile or unstable, while
    others are required to be available 7/24. In either case, it may be unsuitable
    to restrict write access to directories and files while backing them up or
    moving them. That's a risk that site management must evaluate and deal with.

    - --
    Lew Pitcher

    Master Codewright & JOAT-in-training | GPG public key available on request
    Registered Linux User #112576 (http://counter.li.org/)
    Slackware - Because I know what I'm doing.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.7 (GNU/Linux)

    iD8DBQFDD6RnagVFX4UWr64RAgxRAJ9F+2vOTwQbTBL+5I156g jrsCaZtwCgj0VQ
    S2KU8ccD1/yQHhZ+6d4MhHg=
    =evN9
    -----END PGP SIGNATURE-----
    Lew Guest

  3. #3

    Default Re: moving files

    Lew Pitcher wrote: 


    >
    > FWIW, this is my opinion only. Take it for what it's worth.
    >
    > When making backups or moving directory trees around, unless you are willing
    > to live with potential file syncronization errors, the sysadm should take the
    > system into single user mode before starting the copy, and revert to multiuser
    > mode once the copy (and validation) is complete.
    >
    > S/he might risk remaining in multiuser mode /if/ the directory tree is stable
    > (no changes to it will be made during the time the backup or move process is
    > executing), but for active directory trees (/var or /home, for instance) the
    > only /safe/ way to move them is to restrict access to read only or no access
    > at all.[/ref]

    Use logical volume managers and modern filesytem formats
    to grow the storage in place continuing to use the old
    devs.

    Use LVM level mirroring to move the data to the new hardware
    on the same host. Add new devs to group, mirror and sync to
    new devs, break mirror, del old devs, grow LVM and FS to the
    added storage.

    Moving from host to host, that's more of a challenge. For a
    way that works on medium-to-low activity trees like source
    code I've done replacing with symbolic links to the new NFS
    tree as in http://relocation.wopr.net/ Improving this model
    by doing CRC or similar would be even better. With an OS
    like Windows that does mandatory locks on open files this
    strategy could work by only migrating closed files.

    Doug Guest

  4. #4

    Default Re: moving files


    "Doug Freyburger" <com> wrote in message
    news:googlegroups.com... 
    >> 
    >> 
    >>
    >> FWIW, this is my opinion only. Take it for what it's worth.
    >>
    >> When making backups or moving directory trees around, unless you are
    >> willing
    >> to live with potential file syncronization errors, the sysadm should take
    >> the
    >> system into single user mode before starting the copy, and revert to
    >> multiuser
    >> mode once the copy (and validation) is complete.
    >>
    >> S/he might risk remaining in multiuser mode /if/ the directory tree is
    >> stable
    >> (no changes to it will be made during the time the backup or move process
    >> is
    >> executing), but for active directory trees (/var or /home, for instance)
    >> the
    >> only /safe/ way to move them is to restrict access to read only or no
    >> access
    >> at all.[/ref]
    >
    > Use logical volume managers and modern filesytem formats
    > to grow the storage in place continuing to use the old
    > devs.[/ref]

    OS is Solaris 9; old filesystem is ufs IIRC. The new system is under
    Veritas, which was pitched as allowing the storage to grow in place. Looks
    like he's using rsync to copy the files over.

    Does that make what he's doing OK?

    At least in the past I've seen him copy data over from one ufs filesystem to
    another, and then after a few days they got out of sync.

    Maybe Veritas plus rsync makes that a moot point.

    Thanks for the reply.
     


    sinister Guest

Similar Threads

  1. Moving Files
    By paulwill90 in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: February 24th, 04:46 AM
  2. Moving files in ct3
    By javabean13 in forum Macromedia Contribute General Discussion
    Replies: 2
    Last Post: September 17th, 07:13 AM
  3. moving files from bad sectors
    By David Bear in forum FreeBSD
    Replies: 2
    Last Post: February 16th, 05:29 PM
  4. moving files on LAN
    By Bill in forum Windows Networking
    Replies: 2
    Last Post: July 13th, 06:40 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139