Changeset 2030 in MondoRescue


Ignore:
Timestamp:
Oct 3, 2008, 1:50:44 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • Fix #252
  • Improve OCFS2 support (ocfs2 is a SANE_FORMAT)
Location:
branches/2.2.7/mondo/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.7/mondo/src/common/libmondo-archive.c

    r1967 r2030  
    6262extern bool g_cd_recovery;
    6363extern char *g_mondo_home;
     64/*
    6465extern char *g_tmpfs_mountpt;
     66*/
    6567extern char *g_serial_string;
    6668extern char *g_getfacl;
     
    285287    int retval = 0;
    286288    int res = 0;
     289    int tries = 0;
     290    /*
    287291    int i = 0;
    288     int tries = 0;
    289292    static int free_ramdisk_space = 9999;
     293    */
    290294
    291295    /*@ buffers ************************************************************ */
     
    374378    }
    375379
     380    /*
    376381    if (g_tmpfs_mountpt[0] != '\0') {
    377382        i = atoi(call_program_and_get_last_line_of_output
     
    389394        }
    390395    }
     396    */
    391397    paranoid_free(command);
    392398    paranoid_free(zipparams);
  • branches/2.2.7/mondo/src/common/libmondo-fifo.c

    r1645 r2030  
    1 /* libmondo-fifo.c
     1/*
    22   $Id$
    3 
    4 
    5 04/17
    6 - replaced INTERNAL_TAPE_BLK_SIZE with bkpinfo->internal_tape_block_size
    7 
    8 04/04/2004
    9 - ps wax is now ps wwax
    10 
    11 09/10/2003
    12 - p75 is now p80 in outopening tape call
    13 - negotiate largest buffer possible when opening tape drive
    14 - fall back to dd if buffer fails
    15 
    16 09/09
    17 - better logging for tape users
    18 - working on try_hard_to_fwrite(), try_hard_to_fread()
    19 - replaced internal w/ EXTERNAL 'buffer' exe.
    20 
    21 08/30
    22 - tweaked error msgs in try_hard_to_fwrite()
    23 
    24 08/02
    25 - updated is_incoming_block_valid() to make it
    26   return end-of-tape if >300 flotsam blocks
    27 
    28 05/02
    29 - when logging tape errors, don't repeat self
    30 
    31 04/24
    32 - added lots of log_OS_error()'s and assert()'s
    33 
    34 04/22
    35 - copy_file_from_here_to_there() --- added a bit of fault tolerance;
    36   if write fails, retry a few times before reporting error
    37 
    38 04/07/2003
    39 - line 866 --- set block_size used by internal buffer to 32768;
    40   was INTERNAL_TAPE_BLK_SIZE/2
    41 
    42 10/01 - 11/30/2002
    43 - is_incoming_block_valid() --- always make
    44   checksums %65536, just in case int size is
    45   odd (GRRR, ArkLinux)
    46 - disabled rotor-related superfluous warnings
    47 - added INTERNAL_TAPE_BLK_SIZE
    48 - do_sem() now returns int explicitly
    49 - changed internal_block_size
    50 - some irregularities (e.g. bad 'type'-ing) found by Kylix; fixed by Hugo
    51 
    52 09/01 - 09/30
    53 - change 64k to TAPE_BLOCK_SIZE
    54 - added internal_block_size; set it to TAPE_BLOCK_SIZE*2
    55 - if data is flowing FROM tape TO hard disk then set the threshold to 10 (not 75)
    56 - lots of multitape-related fixes
    57 - finally caught & fixed the 'won't finish unzipping last bigfile' bug
    58 - added WIFEXITED() after waitpid(), to improve multi-tape support
    59 
    60 08/01 - 08/31
    61 - trying to catch & stop 'won't finish unzipping last bigfile' bug by
    62   changing the copy_file_rom_here_to_there code
    63 - changed % threshold from 95 back to 75
    64 - don't insist on full 256K write of last block to tape
    65 - if >25 secs go by & all data (AFAIK) has been copied thru by FIFO wrapper
    66   and g_tape_stream is _still_ not closed then shrug shoulders & pthread_exit
    67   anyway...
    68 - change fprintf()'s to log_it()'s
    69 - added a header+footer to each block as it is read/written to/from tape
    70   by copy_file_from_here_to_there
    71 - wrote workaround to allow >2GB of archives w/buffering
    72 - changed % threshold from 75 to 95
    73 - added calls to set_signals(); 'buffer' was killing mondoarchive as
    74   it terminated
    75 - cleaned up struct-passing, to improve reliability and eliminate
    76   some race conditions
    77 - changed some forks to pthreads
    78 - added some comments
    79 - created libfifo{.c,.h,-EXT.h}
    80 - copied core of 'buffer' here
    81 - added some other, Mondo-specific functions
    82 - hacked 'buffer' into user-friendliness
    833*/
    844
     
    9919#include <sys/stat.h>
    10020#include <sys/ipc.h>
    101 #include <sys/shm.h>
    102 #include <sys/sem.h>
    103 #include <sys/wait.h>
    104 #include <pthread.h>
    10521
    10622#include "my-stuff.h"
  • branches/2.2.7/mondo/src/common/libmondo-filelist.c

    r1967 r2030  
    1 /* libmondo-filelist.c
     1/*
    22   $Id$
    3 
    4 - for subroutines which manipulate the filelist
    5 
    6 
    7 01/11/2005
    8 - change  time_of_last_full_backup =  to st_mtime to allow manipulation of
    9 - /var/cache/mondo-archive/difflevel.0
    10 - Conor Daly <conor.daly@met.ie>
    11 
    12 10/01
    13 - don't try to sort non-existent file; return 0 instead
    14 
    15 09/14
    16 - dropped 'sort -o' (busybox doesn't support); use 'sort > ' instead
    17 
    18 08/02
    19 - add \ in front of [, ], ? or * when generating filelist subset
    20 
    21 07/27
    22 - sort filelists after creating them
    23 
    24 07/14
    25 - disabled ACL, xattr stuff; moved it to libmondo-archive.c
    26 - max sane size for a file is now 32MB
    27 
    28 07/10
    29 - added ACL and xattr support for afio users
    30 
    31 07/05
    32 - exclude /dev/shm from backup (Roberto Alsina)
    33 
    34 06/09
    35 - exclude /media/floppy or SuSE 9.1 freezes :(
    36 
    37 01/18/2004
    38 - exclude /sys as well as /proc
    39 
    40 10/18/2003
    41 - load_filelist() --- make sure you add the paths
    42   leading to the file, e.g. if you add /usr/lib/thingy.so
    43   then add /usr, /usr/lib first
    44 - rewritten load_filelist(), save_filelist(),
    45 - add_string_at_node(), find_string_at_node(),
    46 - save_filelist_entries_in_common()
    47 
    48 09/27
    49 - line 1269 had one too many '%s's
    50 
    51 09/26
    52 - fix newt* to be enclosed in #ifndef _XWIN
    53 - added superior progress display to mondo_makefilelist()
    54 
    55 09/18
    56 - call locate w/ 2> /dev/null at end of str
    57 
    58 09/16
    59 - replaced mondo-makefilelist with C subroutine
    60 
    61 06/06
    62 - fixed silly bug in load_filelist() which stopped
    63   funny German filenames from being handled properly
    64 
    65 05/19
    66 - misc clean-up (Steve Hindle)
    67 
    68 05/04
    69 - added Herman Kuster's multi-level bkp patch
    70 
    71 04/26
    72 - maximum max_set_size_for_a_file = maxsetsizeK*2
    73 - maximum is also 32MB
    74 
    75 04/24
    76 - added lots of assert()'s and log_OS_error()'s
    77 
    78 04/22
    79 - added lots of asserts() and log_OS_errors()'s
    80 
    81 04/07
    82 - cleaned up code a bit
    83 
    84 04/04
    85 - max_sane_size_for_a_file = maxsetsizeK*2 (was *8)
    86 
    87 01/02/2003
    88 - tell mondo-makefilelist that it's a custom catalog (if it is)
    89 
    90 10/01 - 10/31/2002
    91 - don't make large .bz2 or .tbz files into biggiefiles
    92 - max_sane_size_for_a_file = maxsetsizeK*8, or 64MB
    93   ...whichever is smaller
    94 
    95 08/01 - 08/31
    96 - if last filelist is <=2 bytes long then delete it
    97 - max_sane_size_for_a_file = maxsetsizeK
    98   (was SLICESIZE*4 or something)
    99 - cleaned up some log_it() calls
    100 
    101 07/26
    102 - started
    1033*/
    1044
  • branches/2.2.7/mondo/src/common/libmondo-tools.c

    r1999 r2030  
    1 /* libmondo-tools.c                                  misc tools
     1/*
    22   $Id$
    33*/
     
    6464/**
    6565 * The location where tmpfs is mounted, or "" if it's not mounted.
    66  */
    6766char *g_tmpfs_mountpt = NULL;
     67 */
    6868char *g_magicdev_command = NULL;
    6969
     
    426426    char *hostname, *ip_address;
    427427    int retval = 0;
    428     long avm = 0;
    429428    char *colon;
    430429    char *cdr_exe;
    431430    char *tmp;
    432431    char call_before_iso_user[MAX_STR_LEN] = "\0";
     432    /*
     433    long avm = 0;
    433434    int rdsiz_MB;
     435    */
    434436    char *iso_dev;
    435437    char *iso_mnt;
     
    471473    run_program_and_log_output("cat /etc/*-release", 5);
    472474    run_program_and_log_output("cat /etc/*issue*", 5);
     475    /*
    473476    sprintf(g_tmpfs_mountpt, "%s/tmpfs", bkpinfo->tmpdir);
    474477    sprintf(command, "mkdir -p %s", g_tmpfs_mountpt);
    475478    paranoid_system(command);
    476479    rdsiz_MB = PPCFG_RAMDISK_SIZE + g_tape_buffer_size_MB;
     480    */
    477481#ifdef __FreeBSD__
     482    /*
    478483    strcpy(tmp,
    479484           call_program_and_get_last_line_of_output
     
    486491    sprintf(command, "mdmfs -s %d%c md9 %s", rdsiz_MB, 'm',
    487492            g_tmpfs_mountpt);
     493            */
    488494#else
     495    /*
    489496    strcpy(tmp,
    490497           call_program_and_get_last_line_of_output
     
    493500    sprintf(command, "mount /dev/shm -t tmpfs %s -o size=%d%c",
    494501            g_tmpfs_mountpt, rdsiz_MB, 'm');
     502            */
    495503    run_program_and_log_output("cat /proc/cpuinfo", 5);
    496504    run_program_and_log_output
     
    498506         5);
    499507#endif
     508    /*
    500509    if (avm / 1024 > rdsiz_MB * 3) {
    501510        if (run_program_and_log_output(command, 5)) {
     
    509518        log_it("It doesn't seem you have enough swap to use tmpfs. Fine.");
    510519    }
     520    */
    511521
    512522    if (bkpinfo->use_lzo) {
     
    14291439        malloc_string(g_boot_mountpt);
    14301440        malloc_string(g_mondo_home);
     1441        /*
    14311442        malloc_string(g_tmpfs_mountpt);
     1443        */
    14321444        malloc_string(g_serial_string);
    14331445        malloc_string(g_magicdev_command);
     
    14351447        paranoid_free(g_boot_mountpt);
    14361448        paranoid_free(g_mondo_home);
     1449        /*
    14371450        paranoid_free(g_tmpfs_mountpt);
     1451        */
    14381452        paranoid_free(g_serial_string);
    14391453        paranoid_free(g_magicdev_command);
  • branches/2.2.7/mondo/src/common/newt-specific.c

    r1999 r2030  
    3737
    3838    extern pid_t g_mastermind_pid;
     39    /*
    3940    extern char *g_tmpfs_mountpt;
     41    */
    4042    extern char *g_boot_mountpt;
    4143    extern char *ps_options;
     
    324326        kill_anything_like_this("ntfsclone");
    325327        sync();
     328        /*
    326329        sprintf(tmp, "umount %s", g_tmpfs_mountpt);
    327         chdir("/");
    328330        for (i = 0; i < 10 && run_program_and_log_output(tmp, 5); i++) {
    329331            log_msg(2, "Waiting for child processes to terminate");
     
    331333            run_program_and_log_output(tmp, 5);
    332334        }
    333 
     335        */
     336
     337        chdir("/");
    334338        if (g_selfmounted_isodir) {
    335339            sprintf(command, "umount %s", g_selfmounted_isodir);
  • branches/2.2.7/mondo/src/include/my-stuff.h

    r2029 r2030  
    3737#endif
    3838#include <sys/types.h>
    39 #include <sys/shm.h>
    4039#include <sys/ipc.h>
    4140#include <sys/ioctl.h>
     
    323322#define DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE  "/dev/md"
    324323#define RAID_DEVICE_STUB    DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE
    325 #define SANE_FORMATS        "swap image vfat ext2 ext3 xfs vfs jfs reiserfs vmfs dos minix coda nfs ntfs hpfs raid lvm cifs"
     324#define SANE_FORMATS        "swap image vfat ext2 ext3 xfs vfs jfs reiserfs vmfs dos minix coda nfs ntfs hpfs raid lvm cifs ocfs ocfs2"
    326325#define ALT_TAPE        "/dev/ht0"
    327326#define MKE2FS_OR_NEWFS "mke2fs"
     
    349348#define ARCH_BUFFER_NUM (ARCH_THREADS*4)    // Number of permissible queued afio files
    350349#define FORTY_SPACES "                                         "    ///< 40 spaces.
    351 #define PPCFG_RAMDISK_SIZE 350  ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo).
     350    ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo).
     351/*
     352#define PPCFG_RAMDISK_SIZE 350
     353*/
    352354
    353355#define DO_MBR_PLEASE "/tmp/DO-MBR-PLEASE"
  • branches/2.2.7/mondo/src/mondoarchive/mondoarchive.c

    r1967 r2030  
    136136    log_msg(2, "Unmounting old ramdisks if necessary");
    137137    stop_magicdev_if_necessary();   // for RH+Gnome users
     138    /*
    138139    run_program_and_log_output
    139140        ("umount `mount | grep shm | grep mondo | cut -d' ' -f3`", 2);
     141        */
    140142    unmount_supermounts_if_necessary(); // for Mandrake users whose CD-ROMs are supermounted
    141143    //  stop_autofs_if_necessary(); // for Xandros users
  • branches/2.2.7/mondo/src/mondorestore/mondo-rstr-tools.c

    r2029 r2030  
    4545extern bool g_ISO_restore_mode; /* are we in Iso Mode? */
    4646extern bool g_I_have_just_nuked;
     47/*
    4748extern char *g_tmpfs_mountpt;
     49*/
    4850extern char *g_isodir_device;
    4951extern char *g_isodir_format;
     
    9799paranoid_free(g_mountlist_fname);
    98100paranoid_free(g_mondo_home);
     101/*
    99102paranoid_free(g_tmpfs_mountpt);
     103*/
    100104paranoid_free(g_isodir_device);
    101105paranoid_free(g_isodir_format);
     
    19321936    malloc_string(g_mountlist_fname);
    19331937    malloc_string(g_mondo_home);
     1938    /*
    19341939    malloc_string(g_tmpfs_mountpt);
     1940    */
    19351941    malloc_string(g_isodir_device);
    19361942    malloc_string(g_isodir_format);
  • branches/2.2.7/mondo/src/mondorestore/mondorestore.c

    r2022 r2030  
    3939 * Globals                                                                *
    4040 **************************************************************************/
     41/*
    4142extern char *g_tmpfs_mountpt;   // declared in libmondo-tools.c
     43*/
    4244extern bool g_text_mode;
    4345extern FILE *g_fprep;
     
    29492951    strcpy(g_mondo_home,
    29502952           call_program_and_get_last_line_of_output("which mondorestore"));
     2953    /*
    29512954    sprintf(g_tmpfs_mountpt, "/tmp/tmpfs");
    29522955    make_hole_for_dir(g_tmpfs_mountpt);
     2956    */
    29532957    g_current_media_number = 1; // precaution
    29542958
Note: See TracChangeset for help on using the changeset viewer.