All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: "Andrei Borzenkov" <arvidjaar@gmail.com>,
	"Senén Vidal Blanco" <senenvidal@sgisoft.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Storage and snapshots as historical yearly
Date: Tue, 19 Sep 2017 15:19:56 -0400	[thread overview]
Message-ID: <7653471f-72b9-c1c2-6783-85fba1f61ffe@gmail.com> (raw)
In-Reply-To: <d83f3017-ded3-fabf-856c-95e6d71747e2@gmail.com>

On 2017-09-19 14:33, Andrei Borzenkov wrote:
> 19.09.2017 14:49, Senén Vidal Blanco пишет:
>> Perfect!! Just what I was looking for.
>> Sorry for the delay, because before doing so, I preferred to test to see if it
>> actually worked.
>>
>> I have a doubt. The system works perfectly, but at the time of deleting the
>> writing disk and merging the data on the read-only disk I fail to understand
>> the process.
>>
>> I have tried to remove the seed bit on disk A and delete the write B as you
>> mention, and so move the data to A, but tells me that disk B does not exist.
>> These are the orders I have made:
>>
>> md127-> A
>> md126-> B
>>
>> btrfstune -S 0 /dev /md127
>> mount /dev/md127 /mnt (I mount this disk since the md126 gives error)
>> btrfs device delete /dev/md126 /mnt
>> ERROR: error removing device '/dev/md126': No such file or directory
>>
>> Another thing I've tried is to remove disk B without removing the seed bit,
>> but it gives me the error:
>>
>> ERROR: error removing device '/dev/md126': unable to remove the only writeable
>> device.
>>
>> Any ideas about it?
> 
> Yes, sorry about it. Clearing seed flag on device invalidates
> filesystem. What you can do, is to rotate devices. I.e. remove
> /dev/md126, set seed flag on md127 and add md126 back.
> 
> I actually tested it and it works for me.
Same.  FWIW, this (like many other things in BTRFS) could stand to be 
better documented, especially since it's not likely to be intuitive for 
most people.
> 
>> Thank you very much for the reply.
>> Greetings.
>>
>> El martes, 12 de septiembre de 2017 6:34:15 (CEST) Andrei Borzenkov escribió:
>>> 11.09.2017 21:17, Senén Vidal Blanco пишет:
>>>> I am trying to implement a system that stores the data in a unit (A) with
>>>> BTRFS format that is untouchable and that future files and folders created
>>>> or modified are stored in another physical unit (B) with BTRFS format.
>>>> Each year the new files will be moved to store A and start over.
>>>>
>>>> The idea is that a duplicate of disk A can be made to keep it in a safe
>>>> place and that the files stored there can not be modified until the
>>>> mixture of (A) and (B) is made.
>>>
>>> This can probably be achieved using seed device. Mark original device as
>>> seed and all changes will go to another writable device, similar to
>>> overlay; then remove seed bit from original device, "btrfs device remove
>>> writable" device and it should relocate its content back. Rinse and repeat.
>>
> 
> 


  reply	other threads:[~2017-09-19 19:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 18:17 Storage and snapshots as historical yearly Senén Vidal Blanco
2017-09-11 18:49 ` Austin S. Hemmelgarn
2017-09-11 21:36   ` Pete
2017-09-12 12:16     ` Austin S. Hemmelgarn
2017-09-13 11:51       ` Pete
2017-09-13 12:26         ` Austin S. Hemmelgarn
2017-09-19 19:09   ` Senén Vidal Blanco
2017-09-12  3:34 ` Andrei Borzenkov
2017-09-19 11:49   ` Senén Vidal Blanco
2017-09-19 18:33     ` Andrei Borzenkov
2017-09-19 19:19       ` Austin S. Hemmelgarn [this message]
2017-09-21 10:07       ` Senén Vidal Blanco

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=7653471f-72b9-c1c2-6783-85fba1f61ffe@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=senenvidal@sgisoft.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.