At some point in the last couple of Fedora releases, it was decided to eliminate /sbin and /bin and use /usr/sbin and /usr/bin instead. For compatibility, there are symbolic links in the root for bin -> /usr/bin and sbin -> /usr/sbin. Great! Do not have to worry anymore about the different locations for programs. BTW, a similar thing is done for /lib and /lib64.
Really simplifying things.
BUT (and here is the rub) anaconda (in rawhide) lets you put /usr on a separate BTRFS subvolume but it will not let you put /etc on a separate subvolume.
IIRC, the idea of /sbin and /bin (as well as /etc) was that it had to be there for the system to bootup and if it was on a separate partition, that could not be guarenteed. I am equating partition and subvolume as equivalent.
If I can put /usr on a different subvolume which will include /usr/bin, /usr/sbin, /usr/lib, and /usr/lib64, then I should be able to put /etc on a separate subvolume and anaconda should be enhanced to permit it.
On the other hand, if I need all of those directories, then anaconda has a bug and should be updated to disallow putting /usr on a separate subvol or partition or LVMlv.
My reason for bring this up is that I recently screwed up one of my systems and had to reinstall. Well, asside from the OS itself, I did have backups for /home and my development directories which are on separate BTRFS subvolumes.
To do backups, I use btrfs-snapshot and then btrfs-send for a baseline or delta. This proved to work well. I simply had the do btrfs-receive the baseline and install it in the new btrfs-filesystem. Then do another btrfs-receive for the delta.. Since both the restored snapshots are r/o, I could then do a new btrfs-snapshot to r=create a r/w subvol.
When I realized how well this worked and how easy it was to do, I wanted to do the same thing for /etc becuase I change a lot of stuff in it such as /etc/libvirt definitions.
OK, is putting /usr on a different btrfs subvol a bug or a feature?
Gene
If I can put /usr on a different subvolume which will include /usr/bin, /usr/sbin, /usr/lib, and /usr/lib64, then I should be able to put /etc on a separate subvolume and anaconda should be enhanced to permit it.
That gets really messy though, because /etc/fstab is what contains the partition configuration...
When I realized how well this worked and how easy it was to do, I wanted to do the same thing for /etc becuase I change a lot of stuff in it such as /etc/libvirt definitions.
Right, the tricky thing with /etc is that it is a mix of OS defaults and your custom state. That's why the OSTree model introduces /usr/etc which holds defaults; so at any point, you can do "ostree admin config-diff" and get a diff of just your changes to /etc. You can then just back this up.
The reason OSTree needs /usr/etc is to implement upgrades - it ensures your changes propagate forwards.
OK, is putting /usr on a different btrfs subvol a bug or a feature?
I'd say it's an option. You can snapshot /usr and that's OK but it does lead to questions about /etc and the other major directories: /boot and /var. Basically if you use snapshots of /usr you get to keep both pieces (literally! ;) )
On 05/13/2014 10:09 AM, Colin Walters wrote:
If I can put /usr on a different subvolume which will include /usr/bin, /usr/sbin, /usr/lib, and /usr/lib64, then I should be able to put /etc on a separate subvolume and anaconda should be enhanced to permit it.
That gets really messy though, because /etc/fstab is what contains the partition configuration...
When I realized how well this worked and how easy it was to do, I wanted to do the same thing for /etc becuase I change a lot of stuff in it such as /etc/libvirt definitions.
Right, the tricky thing with /etc is that it is a mix of OS defaults and your custom state. That's why the OSTree model introduces /usr/etc which holds defaults; so at any point, you can do "ostree admin config-diff" and get a diff of just your changes to /etc. You can then just back this up.
The reason OSTree needs /usr/etc is to implement upgrades - it ensures your changes propagate forwards.
The "OSTree" is new to me. I have not seen it previously mentioned. Also, /usr/etc ? Is this something new in Fedora 21?
OK, is putting /usr on a different btrfs subvol a bug or a feature?
I'd say it's an option. You can snapshot /usr and that's OK but it does lead to questions about /etc and the other major directories: /boot and /var. Basically if you use snapshots of /usr you get to keep both pieces (literally! ;) )
Doing snapshots is only part of the solution. Then it is using btrfs-send to put baseline and delta files on some backup system. If your system goes tango-uniform then you can restore much easier with those backups. With respect to the backup of /etc, for restore I would bring back the shapshots and then selectively copy my updates from the snapshot to the new /etc. I always assume that I will be re-installing the system so that it is my data and configuration changes I need to use for the re-installed system.
/boot on a btrfs subvol is interesting. I seem to remember cmurph mumbling something about wanting to boot off snapshots ... you know, that just might work! I think I will give it a try.
BTW, how about re-enabling btrfs subvols, btrfs volumes, and LVMlv in anaconda? With the updated grub2-2.02 and os-prober in rawhide, all you need is my grubby.c patch and, like magic, it works the way it is suppose to.
Gene
On Sun, May 18, 2014 at 2:00 PM, Gene Czarcinski gczarcinski@gmail.com wrote:
The "OSTree" is new to me. I have not seen it previously mentioned.
It was a side project of mine for a while, but is now targeted for more production use in:
https://fedoraproject.org/wiki/Changes/Atomic_Cloud_Image
Also, /usr/etc ? Is this something new in Fedora 21?
/usr/etc is synthesized on the rpm-ostree compose side; it doesn't exist for traditional package installs yet, though some people wanted that.
Doing snapshots is only part of the solution. Then it is using btrfs-send to put baseline and delta files on some backup system. If your system goes tango-uniform then you can restore much easier with those backups. With respect to the backup of /etc, for restore I would bring back the shapshots and then selectively copy my updates from the snapshot to the new /etc.
Ah, you mean compute the delta by having a btrfs snapshot of /etc and doing the comparison vs that? Would mostly work except you're creating a snapshot of an *old* /etc that won't get updated as packages change.
On 05/20/2014 02:54 PM, Colin Walters wrote:
On Sun, May 18, 2014 at 2:00 PM, Gene Czarcinski gczarcinski@gmail.com wrote:
The "OSTree" is new to me. I have not seen it previously mentioned.
It was a side project of mine for a while, but is now targeted for more production use in:
https://fedoraproject.org/wiki/Changes/Atomic_Cloud_Image
Also, /usr/etc ? Is this something new in Fedora 21?
/usr/etc is synthesized on the rpm-ostree compose side; it doesn't exist for traditional package installs yet, though some people wanted that.
Doing snapshots is only part of the solution. Then it is using btrfs-send to put baseline and delta files on some backup system. If your system goes tango-uniform then you can restore much easier with those backups. With respect to the backup of /etc, for restore I would bring back the shapshots and then selectively copy my updates from the snapshot to the new /etc.
Ah, you mean compute the delta by having a btrfs snapshot of /etc and doing the comparison vs that? Would mostly work except you're creating a snapshot of an *old* /etc that won't get updated as packages change.
Understand that and is why I consikder the compare and updat a manual thing.
Gene
anaconda-devel@lists.stg.fedoraproject.org