Announcement

Collapse
No announcement yet.

Figure up partition requirements

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Figure up partition requirements

    My company is about to send me a new laptop on which I plan to install Kubuntu LTS, but I haven't installed Linux in bare metal for many years. I want to ensure I don't mess the things that cannot be fixed after OS installation.

    In particular, I need:
    1. Disk encryption
    2. Hibernation (aka suspend to disk)
    3. Full and differential disk partition backups to an external USB drive (ideally while I'm using the system)
    In case it isn't clear what #3 means, I want to make daily backup copies during my lunch break. The process needs to be fast, it should make the best use of disk space (i.e., have as many backup sets as possible) and I should be able to restore either the whole system or individual files. I've been using a Windows application called Macrium Reflect Free that copies entire partitions rather than individual files, using Shadow Copy Services, so it's lighting fast and differential copies allow me to keep one month worth of data. So I'm looking for a Linux alternative that provides something similar, even if the implementation differs.

    Backup copies need to be encrypted too, but I suppose I can just encrypt the USB drive.

    Kubuntu provides guided installation for encrypted LVM, which I think solves #1 (obviously) and #2 (I can resize partitions later) but I'm unsure about #3. Guided set up creates ext4 partitions and I don't know if I need btrfs to accomplish that using snapshots, or I totally misunderstood what snapshots provide. I've tried manual partitioning in VirtualBox and it's a no-go zone unless you know what you're doing.

    Do you think ext4 is right for me or I really need btrfs? What advice could you give me?






    #2
    1. part of the installer
    2. Not enabled by default, and good support is hardware-specific, so though it probably will work fine, there is the chance it might not. The first part of THIS page has the steps you need.
    3. The only way to get an actual partition level snapshot/imaging without rebooting into a text mode would be something like BTRFS. Which is quick, you don't even notice when they are happening - you don't have to do it during breaks or anything like that. BTRFS is a filesystem level of snapshot, and using a tool like Timeshift (not included, it is third party), you can browse the snapshots to restore individual files, as well as a Windows-like restore point.

    Manual partitioning is not difficult, to be honest. Use the included Partition Manager in a live session to create the root and swap before running the installer, it is MUCH clearer/easier than using the installer's tool for this. Then, when using the manual install option, you just have to assign partition to "/" and "swap". Check it out in virtualbox to see how it works.

    You need an EFI partition, which you already have for Windows, so you don't need to create that. Then you need a single partition for btrfs, and one for swap that is bigger then the amount of ram you have. You should be able to shrink the main windows partition directly within Windows to create the free space, if you wish.

    if you don't create a swap partition, then the installer will; create a swap file instead, which makes hibernation setup more difficult, as it will take some extra steps and configs.

    Comment


      #3
      The only way I've ever gotten encryption to work lately is by using whole disk encryption with the "use entire disk, encrypted lvm" option. Otherwise the kubuntu installer does not set up any encrypted partitions.

      Encryption with a non-encrypted swap partition/file can be a problem for some organizations - if the activity done on the encrypted partition is stored in the clear on the swap file, what good is having encryption?

      Personally, I never use swap partitions anymore and if the installer creates one, I couldn't tell you where it is on my system. I also never use hibernation - the system is either up and running or turned off. The "recent files" is good enough for the work that I don't keep track of myself.

      Comment


        #4
        Originally posted by kAlvaro View Post
        ... backup copies ... the process needs to be fast, it should make the best use of disk space (i.e., have as many backup sets as possible)
        IMO for this you definitely want btrfs (or ZFS) using incremental send/receive. Without btrfs the advantage of incremental backups is speed, but with btrfs send/receive there's also that the snapshot structure goes to the backup too.

        For example, on my desktop I use a backup hard drive and it has weekly(-ish) snapshots going back two years, a hundred snapshots or so. It's still only one backup (I have other backups too), one copy of the data, but the state of that data at each backup is available, and is instantly accessible using dolphin or whatever.

        Now, if you churn through a lot of data, say editing videos, it all has to go somewhere. I've moved my browser caches, and other data I don't need such as big downloads, to other subvolumes that are not backed up to limit unnecessary churn.

        One could feasibly take "as many as possible" quite far. The performance impact of frequent snapshots, say half-hourly, being sent to a backup server, could be unnoticeable.
        Regards, John Little

        Comment


          #5
          Originally posted by jlittle View Post
          One could feasibly take "as many as possible" quite far. The performance impact of frequent snapshots, say half-hourly, being sent to a backup server, could be unnoticeable.
          Taking a snapshot has zero performance impact. Making a backup using send|receive uses disk IO but backgrounds itself quite nicely. If you send backups via a network, it is generally not recommended to use send|receive because a blip in the network traffic can corrupt the entire backup, nor directly to a USB device for the same reason. BTRFS does not yet have the capability to resume an interrupted backup. The recommended method is to "send" to a file, then rsync the file, then "recieve" it to a BTRFS file system. Still very doable. It's not to say that if you have a solid network (aka local) you can't do it, but verification of success would be required IMO.

          To me, the largest impact of "as many as possible" would be excellent housekeeping procedures to prevent the backup drive from filling up.

          Please Read Me

          Comment


            #6
            I was wondering how LVM+encryption+ext4/btrfs work together, so I used VirtualBox to learn that the guided encrypted LVM installation creates 4 good old physical partitions. It seems that the one for LVM is what is actually encrypted, and then the logical volume has 3 virtual partitions for actual files and swap. (Sorry, I had prepared a couple of screenshots but I'm not allowed to post links or upload attachments.)

            This makes me think that:
            • I only need to reformat the root virtual partition as btrfs before installing
            • Swap partition is already encrypted
            • I'll need to resize swap because it's tiny
            Please correct me if I got some fundamental concept wrong. Thank you for all the information!

            Comment

            Working...
            X