From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: "Lentes, Bernd" <bernd.lentes@helmholtz-muenchen.de>,
"'linux-btrfs@vger.kernel.org'" <linux-btrfs@vger.kernel.org>
Subject: Re: rollback of a snapshot is just read-only
Date: Mon, 27 Apr 2015 07:47:03 -0400 [thread overview]
Message-ID: <553E21B7.2030808@gmail.com> (raw)
In-Reply-To: <15785B7E063D464C86DD482FCAE4EBA501CAC3EF69DB@XCH11.scidom.de>
[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]
On 2015-04-24 10:26, Lentes, Bernd wrote:
> Hi,
>
> it should be just a small problem, but it is one. How can I rollback to a snapshot of my root filesystem ?
> Googeling, I found a lot of solutions, each different.
> I finally choosed this one: https://btrfs.wiki.kernel.org/index.php/UseCases#I_want_to_be_able_to_do_rollbacks_with_Btrfs
>
> I made the snapshot, changed some configuration, and afterwards I'd like to rollback to the snapshot:
>
> - btrfs subvolume snapshot -r / /.snapshots/vor_nvidia
>
> - change some configuration
>
> - btrfs subvolume set-default 625 (id of the snapshot)
>
> - reboot
>
> My /-folder is again the old one, that's ok. The change of the configuration has disappeared. But it is just read-only:
> pc63422:~ # touch /test
> touch: cannot touch '/test': Read-only file system
>
> mount says:
>
> ...
> /dev/sda1 on / type btrfs (rw,ssd,space_cache)
> ...
>
> It seems to be rw !?
>
> OS: SLES 12 64bit
> kernel: 3.12.38-44-default
>
> pc63422:~ # rpm -qa|grep -i btrfs
> btrfsprogs-3.16.2-7.1.x86_64
> libbtrfs0-3.16.2-7.1.x86_64
> btrfsmaintenance-0.1-7.1.noarch
>
> pc63422:~ # btrfs --version
> Btrfs v3.16.2+20150127
>
> pc63422:~ # btrfs fi show
> Label: none uuid: 7edcb64a-4ca6-47ec-8979-54e158c96ac2
> Total devices 1 FS bytes used 145.19GiB
> devid 1 size 450.00GiB used 150.04GiB path /dev/sda1
>
> pc63422:~ # btrfs fi df /
> Data, single: total=146.01GiB, used=142.74GiB
> System, single: total=32.00MiB, used=16.00KiB
> Metadata, single: total=4.00GiB, used=2.44GiB
> GlobalReserve, single: total=512.00MiB, used=0.00B
>
> Thanks for any hint.
>
>
So, a snapshot being read-only is totally different from the FS being
mounted read-only. There is a special property on the snapshot that
determines whether it is read-only or writable, which is first set when
the snapshot is created. To change that property so that the snapshot
is writable, you can use the following command from the top directory of
the snapshot:
btrfs property set . ro false
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2967 bytes --]
next prev parent reply other threads:[~2015-04-27 11:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 14:26 rollback of a snapshot is just read-only Lentes, Bernd
2015-04-27 11:47 ` Austin S Hemmelgarn [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-24 14:08 Lentes, Bernd
2015-04-24 14:42 ` Hugo Mills
2015-04-27 10:38 ` Juergen Sauer
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=553E21B7.2030808@gmail.com \
--to=ahferroin7@gmail.com \
--cc=bernd.lentes@helmholtz-muenchen.de \
--cc=linux-btrfs@vger.kernel.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).