Skip to contentSkip to conversation

make snapshot main volume, delete all others?

DISCUSSION Michael Kofler 2 participants 2 messages Aug 3, 2010 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Fedora provides yum-fs-snapshot. If installed, on each package installation or update a snapshot of all btrfs filesystems is taken, so it is possible to revert the installation/update.

Suppose an update failed and I want to get back: with

# btrfs subvolume set-default yum-snapshot-whatever /

I define which snapshot to use at the next boot.

After rebooting I decide I really want to stay with this snapshot. I can delete all other snapshots, but can I also delete my previous main volume, thus defining the current default snapshot as my new base. (If not, a growing part of the filesystem is wasted for old data I don't need anymore.)

Any insight is appreciated!

Michael Kofler

#1 lore raw

Hi Michael

This theme was discussed several times in the past.

Short answer: now it is not possible, what you are asking.

Long answer: rearranging the layout of the filesystem, it is easy to do what are you asking with the current tools. But this changes have to be integrated in the distribution, and I don't know any distribution that did so. This is my preferred solution (and the only available today)
Another solution require the additional of other API to permit to move the root of a btrfs filesystem (with all the subvolumes) from a subvolume/snapshot to another one.

For additional info see these posts:
http://www.mail-archive.com/[email protected]/msg03484.html
http://www.mail-archive.com/[email protected]/msg05334.html
http://www.mail-archive.com/[email protected]/msg04968.html

Regard
G.Baroncelli

Quoted 25 lines · Michael Kofler

Fedora provides yum-fs-snapshot. If installed, on each package installation or update a snapshot of all btrfs filesystems is taken, so it is possible to revert the installation/update.

Suppose an update failed and I want to get back: with

# btrfs subvolume set-default yum-snapshot-whatever /

I define which snapshot to use at the next boot.

After rebooting I decide I really want to stay with this snapshot. I can delete all other snapshots, but can I also delete my previous main volume, thus defining the current default snapshot as my new base. (If not, a growing part of the filesystem is wasted for old data I don't need anymore.)

Any insight is appreciated!

Michael Kofler

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <[email protected]>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512