Menu

Fine tuning partition save/restore parameters

Kirkx
2014-10-01
2014-12-19
  • Kirkx

    Kirkx - 2014-10-01

    For now I only use Clonezilla image files to save and restore Linux logical partitions. I can save and restore partitions without problems but I'm trying to fine tune my command parameters. Any ideas would be appreciated. Here is the layout:

    • hard disk: 500 GB with 512 byte sectors (Seagate ST500DM002)
    • MBR and 3 Windows primary partitions: for now backed-up and restored with Acronis True Image on BartPE (because it has incremental backups)
    • several logical Ext4 partitions with a few Linux distros (backed-up and restored with Clonezilla)
    • dedicated Clonezilla image repository partition: file system type XFS
    • Clonezilla v2.2.3-25 (because it has been tested and works ok on my hardware)

    I have three questions.

    1) Is it really a good idea to have XFS file system type for the dedicated Clonezilla image repository partition? I have read somewhere that XFS is better than Ext4 if you have large files. Some of my image files are 2-3 GB, so XFS seems to make sense.

    2) In my script that runs "saveparts" I have turned off image file splitting by using:

    -i 1024000

    instead of the default:

    -i 2000

    Are there any advantages of having image files split into a few parts? I've been using single image files for my Windows XP Acronis backups w/o any problems for years. Windows XP full backup image file is always around 8 GB (incrementals are around 500 MB). Linux distros' full backup image files created with Clonezilla are much smaller (2.2 GB with gzip, 2.6 GB with lzop) so I'm not sure about the merits of splitting them up.

    Here is the complete "saveparts" script:

    #!/bin/bash
    datetime=$(date +"%y%m%d-%H%M")
    /usr/sbin/ocs-sr -q2 -j2 -z1 -i 1024000 -fsck-src-part-y -p true saveparts linuxlite-$datetime sda21 sda22
    

    The last line was cut off by the forums text formatting and should be as follows:

    /usr/sbin/ocs-sr -q2 -j2 -z1 -i 1024000 -fsck-src-part-y -p true saveparts linuxlite-$datetime sda21 sda22

    3) In my script that runs "restoreparts" I have the parameter -e2. It was preset by defualt and I just left it intact because I'm not sure if it's really needed in my particular situation:

    a) the bootloader installed in MBR is BootUS (it boots to different versions of Windows)
    b) the bootloader installed in PBR of 3rd primary partition is Grub4Dos (it boots to different Linux distros)
    c) Grub2 of any Linux distro is never used for normal booting and is only used in emergencies
    d) I never restore MBR with Clonezilla (parameter -t)
    e) I don't want Clonezilla to overwrite existing partition table when restoring a partition (parameter -k)

    Here is the complete "restoreparts" script:

    #!/bin/bash
    /usr/sbin/ocs-sr -e2 -c -t -r -k -p true restoreparts ask_user sda21 sda22
    

    The last line was cut off by the forums text formatting and should be as follows:

    /usr/sbin/ocs-sr -e2 -c -t -r -k -p true restoreparts ask_user sda21 sda22

    -e2 [--load-geometry-from-edd]: force to use the CHS (cylinders, heads, sectors) from EDD (Enhanced Disk Device) instead of from kernel when creating partition table by sfdisk. Recommended for non-grub bootloader.

    -t: do not restore MBR
    -k: do not create/overwrite partition table

    Should the parameter -e2 be removed from the command line or is it better to leave it as is?


    Help Links:

    http://clonezilla.org/clonezilla-live/doc/02_Restore_disk_image/advanced/09-advanced-param.php

    http://drbl.org/faq/fine-print.php?path=./2_System/88_mbr_related_options.faq#88_mbr_related_options.faq

     

    Last edit: Kirkx 2014-10-02
  • Steven Shiau

    Steven Shiau - 2014-11-01

    For your questions,

    1. XFS should work fine, you can just use it.
    2. Yes, using "-i 1024000" normally should be better than "-i 2000". The reason we choose "-i 2000" is because if user use FAT as the repository, the max file size is 2 GB.
    3. It's better to keep the option "-e2".

    Steven.

     
  • Kirkx

    Kirkx - 2014-11-27

    Thanks for your answers.

    I would suggest that some more explanation about the default parameter "-i 2000" be included in the parameter "help" line that's available when you run "saveparts" or "savedisk" in interactive mode (expert mode). I think it's safe to assume that most of Clonezilla users don't have FAT16 partitions as their image repositories. Those who use FAT32 partition should set this parameter to "-i 4096" (because of max file size of 4 GB) and those who have Ext2/4 or XFS should disable image file splitting altogether.

    I deliberately use multiples of 1024 here to avoid some unexpected problems down the road.

     
  • Steven Shiau

    Steven Shiau - 2014-12-19

    Thanks for your suggestion. We will update that in the future release.

    Steven.

     

Log in to post a comment.

MongoDB Logo MongoDB