kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: danielhilst@gmail.com (Daniel Hilst)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Online migration of arbitrary filesystems, possible?
Date: Mon, 01 Apr 2013 18:00:01 -0300	[thread overview]
Message-ID: <5159F551.7050207@gmail.com> (raw)
In-Reply-To: <CAGpXXZLCLHk4hD8pVoPV5_xu02VOfpWrbS4dR++Cw1gHMwQ0Pg@mail.gmail.com>

On 29-03-2013 17:28, Greg Freemyer wrote:
> On Fri, Mar 29, 2013 at 4:09 PM, Daniel Hilst <danielhilst@gmail.com> wrote:
>> Suppose that I have two big filesystems, dest fs and source fs.. I want
>> to copy whole source fs to dest fs, but I need to keep
>> source filesystem online I can't mount source fs read only and copy..
>>
>> The idea is, mount both filesystems "together", and make write/read
>> operations go on this way
>> Read operations:
>>       1. See if data is already on dest fs,
>>       2. If is then read data and bright back to caller (lets call this
>> cold read)
>>       3. If is not, then read file from source fs, put it on page cache,
>> and change the backstorage of that page..
>>       3.1 So when this page get dirty or too old, it will be writed to
>> dest fs
>>
>>       The problem here is, I need to remap every data and metadata on
>> step 3 (inodes and stuff), I think that read only data, isn't writed to
>> disk,
>>       so in case of old page, this page would be freed from memory and
>> not write to dest fs.. so I need read only pages to be forced dirty..
>>
>> Write operations:
>>      1. Write data to dest fs
>>      2. Mark data as present on dest fs
>>
>>
>> Also I need to know when copy is finished, so I need a tool to
>> crosscheck both filesystems and say what was copied and what wasn't, and
>> give me some percent of remaining unsynced data. When I get 100% of data
>> in sync I can umount source filesystem and use its storage for other
>> propose.
>>
>> The go here is move data online, where I can't bring data offline..
>>
>> I'm a kernel newbie, I have just read a lot about page cache and VSF,
>> but this seems possible, right?
>
> Are you looking for a pre-existing solution?  Or you want to write something?
>
> Greg
>
I can do this with btrfs snapshots, I think LVM2 can do this with 
snapshots too... I was searching for something like that, but using a 
kind of VFS hack

So I want to know if is possible, in theory, then I can start write 
something like that

-- 
Follow the white rabbit!

  reply	other threads:[~2013-04-01 21:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 20:09 Online migration of arbitrary filesystems, possible? Daniel Hilst
2013-03-29 20:28 ` Greg Freemyer
2013-04-01 21:00   ` Daniel Hilst [this message]
2013-04-01 21:39     ` Jason Ball
2013-03-29 21:06 ` Valdis.Kletnieks at vt.edu
2013-04-01 20:50   ` Daniel Hilst
2013-04-02 18:24     ` Valdis.Kletnieks at vt.edu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5159F551.7050207@gmail.com \
    --to=danielhilst@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).