On Tue, Jun 30, 2015 at 1:40 AM, jdd <jdd@dodin.org> wrote:
Le 30/06/2015 08:36, Andrei Borzenkov a écrit :
If the first one breaks, any copy made this way will be hopelessly outdated to be of any use.
why?
it's only useful for system disk, of course, but data have to be backed anyway
Yeah I think it's better that the work on stateless systems actually happens. And maybe once the Btrfs seed device stuff stabilizes it can help out and for some people even obviate the traditional installer. So the idea of the seed device with live media install is there is an btrfs image set as seed device (means it mounts read-only). The installer's job is fairly simple (which of course is fairly not simple behind the scenes to deal with myriad possible pre-existing layouts, but simple to the user as in, far fewer options than most Linux installers currently have), which is just to set a standard layout. For example one partition for LUKS+Btrfs, and another partition LUKS+swap, (and extra partitions for booting as needed). The LUKS block device is added, so the sequence is like this: mount -t btrfs /run/media/live-os/opensuse<version>btrfsseed.img /mnt/sysimage btrfs device add /dev/sda2 /mnt/sysimage mount -o remount,rw /dev/sda2 /mnt/sysimage btrfs device delete /run/media/live-os/opensuse<version>btrfsseed.img /mnt/sysimage So now this is a multiple device Btrfs volume: seed device + local user device. And it live migrates chunks from the seed to the user's drive. The user can continue to use the live environment normally, web browsing and setting application preferences. No need to reboot from this installation. After the seed is removed, it's possible to snapshot the current state as a reset point, and be able to do system reset or refresh, without removing user data on /home. Better, with some more discipline it would be possible to better separate OS binaries from OS settings from OS applications (bundled) from extra installed applications, user settings and user data. There's still a lot of confusion around /var and /etc data, and the work to make it possible to boot with them empty and get populated from default data found in /usr. This means less dependence on snapshotting to do a system reset, and to use snapshots mainly as a means to rollback OS subversions (from a bad update, which arguably shouldn't happen, but...) dd as a way to get to statelessness is really tedious and slow because you have to read and write all sectors on the partition even if they're useless. The see device approach (of course even rsync) is much faster. Also, it's possible to concatenate seeds. https://btrfs.wiki.kernel.org/index.php/Seed-device -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org