WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Thoughts on mydata.tgz  (Read 1873 times)

Offline trans

  • Newbie
  • *
  • Posts: 10
Thoughts on mydata.tgz
« on: May 27, 2012, 10:27:05 AM »
I was thinking about the way tinycore works and had a few thoughts.

The way it handles `mydata.tgz` strikes me as inefficient, having to save and restore this file with each shutdown and boot. I would think a directory union (unionfs) would be a much more efficient approach and robust. I don't think the fact that `mydata.tgz` if a tar archive is really the most important thing --after all that's easy enough to create on demand. But if keeping to one file is important than alternately, a virtual file system that accesses the tar archive dynamically with fallback to the real file system would be another more efficient and robust option.

Another thought, wouldn't it be good if there were per-user "mydata.tgz". That is, when a user logs in then their home files come on line. instead of restoring every user's home files on boot? This wouldn't be needed for most embedded applications but it seems like it would be good option to have for other usecases.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Thoughts on mydata.tgz
« Reply #1 on: May 27, 2012, 12:36:56 PM »
Quote
The way it handles `mydata.tgz` strikes me as inefficient, having to save and restore this file with each shutdown and boot. I would think a directory union (unionfs) would be a much more efficient approach and robust.

That would also wear down any flash drives quickly, and come with all the bugs of unionfs. It's not an universally better solution.

Accessing a tarball dynamically is going to suck; not only because of FUSE, but because of its design of being compressed as one file (compare zip, per-file compression).

I assume you've checked out persistent home and opt? You can avoid backup if you wish.
The only barriers that can stop you are the ones you create yourself.

Offline trans

  • Newbie
  • *
  • Posts: 10
Re: Thoughts on mydata.tgz
« Reply #2 on: May 28, 2012, 01:10:49 AM »
There are other options besides unionfs if it is not mature, like AuFS. Not sure how bad the wear would be on flash, though I suspect in a few more years those worries are going to start to be rather moot.

Also accessing a tarball dynamically, if done well, shouldn't suck. But it is a lot more work.

Nothing to do with persistent home/opt. I'm really just looking at the boot and shutdown times and the robustness of a system --what happens when there is a power loss and the mydata.tgz doesn't get saved?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Thoughts on mydata.tgz
« Reply #3 on: May 28, 2012, 01:33:09 AM »
Hi trans
Quote
Nothing to do with persistent home/opt. I'm really just looking at the boot and shutdown times
When you have persistent /home and /opt, you don't include them in your backup. That means faster boots
and shutdowns.
Quote
and the robustness of a system --what happens when there is a power loss and the mydata.tgz doesn't get saved?
When the machine comes back up, it will be restored to the point of your last backup. If your /home and /opt
directories are not persistent, they reside in RAM, and are vulnerable to a power outage.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Thoughts on mydata.tgz
« Reply #4 on: May 28, 2012, 04:58:52 AM »
aufs has a different set of bugs. It's not stable enough either.
The only barriers that can stop you are the ones you create yourself.