linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Nick Gilmour <nickeforos@gmail.com>,
	Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: IO Error (.snapshots is not a btrfs subvolume)
Date: Sun, 11 Feb 2018 10:08:24 +0300	[thread overview]
Message-ID: <2bc46917-7504-2c05-834d-a88db438382d@gmail.com> (raw)
In-Reply-To: <CAH-drozv-pgkrreOduoDUvS8ct0_BjHEwLBvQ9be3atnRpfZTw@mail.gmail.com>

08.02.2018 18:43, Nick Gilmour пишет:
> On Thu, Feb 8, 2018 at 5:32 AM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>> 08.02.2018 06:03, Chris Murphy пишет:
>>> On Wed, Feb 7, 2018 at 6:26 PM, Nick Gilmour <nickeforos@gmail.com> wrote:
>>>> Hi all,
>>>>
>>>> I have successfully restored a snapshot of root but now when I try to
>>
...
> 
>> How exactly was it done?
> 1. # mount /dev/sde6 /mnt
> 2. # cd /mnt
> 3. # mv @ @_old
> 4. # btrfs subvol snapshot /mnt/@_old/.snapshots/1594/snapshot /mnt/@
> 

That's wrong for openSUSE. When you have installation with snapshots
enabled, @ is dummy subvolume that never holds actual content.

>> No, you should create subvolume @/.snapshots and mount it as /.snapshots
>> (and have it in /etc/fstab). Snapshots should always be available in
>> running system under fixed path and this only possible when it is
>> mounted, otherwise after rollback /.snapshots will be lost just like it
>> happened now.
> 
> When I run this command I get an error:
> # btrfs subvolume create @/.snapshots
> ERROR: cannot access '@': No such file or directory
> 

You have to give it path on mounted btrfs filesystem of course.

> but when I'm doing this:
> # btrfs subvolume create /.snapshots
> Create subvolume '//.snapshots'
> it works
> 
> and this is what I see in the subvolumes list:
> ID 3541 gen 175955 parent 3540 top level 3540 path .snapshots
> 

Without actual command that shows where you look it does not provide
much useful information.

> and then I can create a snapshot with snapper:
> # snapper -c root create --description "test"
> 
> but snapper starts numbering from 1 again which I don't really like. I
> would like to keep the previous snapshots and continue the numbering
> after the last restored snapshot (1594).
> 

openSUSE offers native support for reverting to previous root snapshot
while keeping all existing snapper snapshots. May be you should look at
it instead of reinventing the wheel?

      parent reply	other threads:[~2018-02-11  7:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08  1:26 IO Error (.snapshots is not a btrfs subvolume) Nick Gilmour
2018-02-08  3:03 ` Chris Murphy
2018-02-08  4:32   ` Andrei Borzenkov
2018-02-08 15:43     ` Nick Gilmour
2018-02-08 19:34       ` Nick Gilmour
2018-02-11  7:08       ` Andrei Borzenkov [this message]

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=2bc46917-7504-2c05-834d-a88db438382d@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=nickeforos@gmail.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 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).