Results 1 to 3 of 3

Thread: Virtual disk recommendations per partition needed - VirtualBox

  1. #1
    Join Date
    May 2009
    Beans
    3

    Virtual disk recommendations per partition needed - VirtualBox

    I am what I would classify as between a novice and intermediate Linux user. Definitely not a 100% n00b, but I still have a lot to learn, and I'm definitely not a system administrator, on Linux or any other flavor of machine.
    I'm looking for some guidelines, opinions, advice, etc. specifically around setting up Linux on a VirtualBox VM. I know that there won't be too many differences, but what I really think I need guidance on is which partitions (with matching virtual drives in this case) should be versioned with the snapshot, and which should NOT be versioned, or set to write-through.
    On both my regular install and my VM install, I have a separate partition for each of the following paths; on my VM install, each partition has its own virtual disk:

    • /
    • /boot
    • /home
    • /tmp
    • /usr
    • /usr/local
    • /var
    • /var/log
    • swap

    This partition tree is due to recommendations I read a while ago that then you can leave your home directory alone on new installs, prevent log or tmp floods from taking down your entire system, set appropriate flags such as noexec and nosuid, etc.
    On my regular computer, my backup strategy only hits /home and /usr/local because I don't care if I have to reinstall. I'm strict about my scripts (which are rare anyway) going to sub-directories of /usr/local.
    But since I'm setting up the VM AND it gives me the ability to snapshot, I'm thinking a workflow of somethilng like this:

    • Get it set up how I want it
    • Snapshot it
    • Regular backup strategy continues on /home and /usr/local,
    • New updates are out so:
      • Roll back to the latest snapshot,
      • Update,
      • Snapshot,
      • Test it out,
      • Delete the old snapshot (merges this snapshot backward) when happy.

    • New software out that I want to try:
      • Install it
      • Try it out
      • Roll back to the last snapshot,
      • And if I liked the software, install and snapshot


    My Question

    So my question, finally, is with that workflow, am I OK with setting the following to write-through (not versioned on snapshot):

    • /home
    • /usr/local
    • /tmp because I don't need to roll these back
    • /var/log because I don't need to roll these back

    and leaving the rest of the partitions / virtual drives be imaged when I do snapshots?

  2. #2
    Join Date
    Nov 2009
    Beans
    47

    Re: Virtual disk recommendations per partition needed - VirtualBox

    The only problem I see is skipping the changes on /usr/local and that is really only if you are planning on adding your own software to the system. That said if you are not actively using that directory on your own I would encourage you to include it in your snapshots just to be safe that any future updates or software packages you install don't add stuff to that directory that wouldn't then get properly rolled back during any uses of your snapshots.

  3. #3
    Join Date
    May 2009
    Beans
    3

    Re: Virtual disk recommendations per partition needed - VirtualBox

    Thanks for the reply!

    I do make backups of /home and /usr/local, which is why I wasn't going to snapshot it. But you make a good point, I rarely change it, so I'm probably fine just snapshotting it.

    One other thing I thought of after posting this is I could (should) just take whatever strategy I try and make sure I can load the VM successfully on another machine, simulating a restore.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •