Hacker News new | ask | show | jobs
by e12e 110 days ago
> A filesystem with snapshots makes software installation transactional. You take a snapshot, install some software, and if it doesn't work right, you can revert to the snapshot. (With very slightly more flexible snapshots, you can limit the snapshot to just some part of the directory tree, but this is not essential; it merely permits more flexibility.)

Eh, you don't typically have a lock mechanism for the filesystem equivalent to that of a database.

Who's to say something like this doesn't happen:

  - snapshot fs
  - op/system adjust firewall rules
  - "you" install updates
  - you rollback
  - firewall rules is now missing patches
Don't get me wrong zfs is great - but it doesn't come with magical transactions.
2 comments

A snapshot is taken before installing updates, so you'd get two snapshots from your example. Rolling back would leave you right after adjusting firewall rules.
Not if someone else modified firewall rules while you were installing updates? (Eg: someone else being a Cron job).
That's an easy thing to account for.
> Don't get me wrong zfs is great - but it doesn't come with magical transactions.

I never said it did!

But if you have a snapshotting FS underneath, transactional software maintenance becomes an order or two of magnitude easier to achieve.

The underlying philosophies of Unix are "keep it in files" and "keep it simple". That's why it didn't even have a file-hiding mechanism -- the dot-file thing was an accental, emergent property.

Keep it simple, keep it visible, keep it human-readable and human-fixable.

Because the more complex you make it, the more likely it is to go wrong, and some poor sap is going to have to fix it. Do not get in their way. Instead, think about them, allow for that, and help keep their life easy.