[Rear-users] SF.net SVN: rear:[748] trunk/usr/share/rear

dag- at users.sourceforge.net dag- at users.sourceforge.net
Mon Jan 16 15:47:52 CET 2012


Revision: 748
          http://rear.svn.sourceforge.net/rear/?rev=748&view=rev
Author:   dag-
Date:     2012-01-16 14:47:51 +0000 (Mon, 16 Jan 2012)
Log Message:
-----------
Added ext4 support using tune4fs

Modified Paths:
--------------
    trunk/usr/share/rear/doc/rear-documentation.txt
    trunk/usr/share/rear/dr/GNU/Linux/12_describe_filesystems.sh

Modified: trunk/usr/share/rear/doc/rear-documentation.txt
===================================================================
--- trunk/usr/share/rear/doc/rear-documentation.txt	2011-12-21 19:03:26 UTC (rev 747)
+++ trunk/usr/share/rear/doc/rear-documentation.txt	2012-01-16 14:47:51 UTC (rev 748)
@@ -1,9 +1,9 @@
 = Relax and Recover: User guide
 :author: Dag Wieers and Jeroen Hoekx
+:version: 0.4 draft
 :data-uri:
+:doctype: book
 :encoding: UTF-8
-:icons:
-:iconsdir: /usr/share/asciidoc/images/icons
 :numbered:
 :toc:
 :toclevels: 2
@@ -62,8 +62,8 @@
 == Features and functionality
 Relax and Recover has a wide range of features:
 
-// FIXME: Insert the various features from the Release Notes
-//        include the information from the presentations
+// FIXME: Insert the various features from the Release Notes +
+//        include the information from the presentations +
 //        and optionally the rescue creation and recovery workflow
 // FIXME: Get rid of the below list when everything is in the feature set
 
@@ -163,15 +163,15 @@
 
 
 == Overview
-// FIXME: Describe the concept behind Rear
-//  - Creating a rescue environment (bootable media and optionally backup)
+// FIXME: Describe the concept behind Rear +
+//  - Creating a rescue environment (bootable media and optionally backup) +
 //  - Restoring from booted media
 
 
 == Scenarios
-// FIXME: Add the various scenarios, merge with configuration-examples.txt and
-//        the below content
-//  e.g. using different backup methods,
+// FIXME: Add the various scenarios, merge with configuration-examples.txt +
+//        and the below content +
+//  e.g. using different backup methods, +
 //       using different output methods
 
 == Using Rear with USB storage devices
@@ -1296,7 +1296,7 @@
 
 
 == Design and implementation
-// FIXME: This chapter explains the concepts and implementation details
+// FIXME: This chapter explains the concepts and implementation details +
 //        This should include the layout information from Jeroen
 
 

Modified: trunk/usr/share/rear/dr/GNU/Linux/12_describe_filesystems.sh
===================================================================
--- trunk/usr/share/rear/dr/GNU/Linux/12_describe_filesystems.sh	2011-12-21 19:03:26 UTC (rev 747)
+++ trunk/usr/share/rear/dr/GNU/Linux/12_describe_filesystems.sh	2012-01-16 14:47:51 UTC (rev 748)
@@ -2,37 +2,50 @@
 # check interval, etc.
 
 while read mountpoint device mountby filesystem junk ; do
-	mkdir -p $VAR_DIR/recovery$device
-	vol_id $device >$VAR_DIR/recovery$device/fs_vol_id
-	StopIfError "Cannot determine filesystem info on '$device'
+    mkdir -p $VAR_DIR/recovery$device
+    vol_id $device >$VAR_DIR/recovery$device/fs_vol_id
+    StopIfError "Cannot determine filesystem info on '$device'
 Your udev implementation (vol_id or blkid) does not recognize it."
-	echo "$device" >$VAR_DIR/recovery$device/depends
-	case $filesystem in
-		ext*)
-			tmp_fs_parameters=$(mktemp $TMP_DIR/fs_parameters.XXXXXX)
-			StopIfError "Failed creating a temporary file in $TMP_DIR."
-			tune2fs -l $device > $tmp_fs_parameters
-			StopIfError "Could not run tune2fs or failed to write to $tmp_fs_parameters."
-			FS_RESERVED_BLOCKS=$(grep "Reserved block count" $tmp_fs_parameters | sed -e 's/^.*: \+\([0123456789]\+\).*$/\1/g')
-			FS_MAX_MOUNTS=$(grep "Maximum mount count" $tmp_fs_parameters | sed -e 's/^.*: \+\([-0123456789]\+\).*$/\1/g')
-			FS_CHECK_INTERVAL=$(grep "Check interval" $tmp_fs_parameters | sed -e 's/^.*: \+\([0123456789]\+\).*$/\1/g')
+    echo "$device" >$VAR_DIR/recovery$device/depends
+    case $filesystem in
+        (ext2|ext3)
+            tmp_fs_parameters=$(mktemp $TMP_DIR/fs_parameters.XXXXXX)
+            StopIfError "Failed creating a temporary file in $TMP_DIR."
+            case "$filesystem" in
+                (ext2|ext3)
+                    tune2fs -l $device > $tmp_fs_parameters
+                    ;;
+                (ext4)
+                    tune4fs -l $device > $tmp_fs_parameters
+                    ;;
+                (*)
+                    Log "The filesystem $filesystem on $device does not support extended filesystem"
+                    Log "parameters like max mount count, check imterval etc. or it"
+                    Log "is not implemented in Rear yet"
+                    Log "Please file a bug if you think this is an error"
+                    ;;
+            esac
+            StopIfError "Could not run tune2fs or failed to write to $tmp_fs_parameters."
+            FS_RESERVED_BLOCKS=$(grep "Reserved block count" $tmp_fs_parameters | sed -e 's/^.*: \+\([0123456789]\+\).*$/\1/g')
+            FS_MAX_MOUNTS=$(grep "Maximum mount count" $tmp_fs_parameters | sed -e 's/^.*: \+\([-0123456789]\+\).*$/\1/g')
+            FS_CHECK_INTERVAL=$(grep "Check interval" $tmp_fs_parameters | sed -e 's/^.*: \+\([0123456789]\+\).*$/\1/g')
 
-			# The check interval is displayed in seconds, but tune2fs only allows us to set
-			# the interval in days, weeks or month. So we have to convert the seconds to days
-			(( FS_CHECK_INTERVAL = FS_CHECK_INTERVAL / 86400 ))
-			rm  $tmp_fs_parameters
-			fs_parameters=$VAR_DIR/recovery$device/fs_parameters
-			> $fs_parameters
-			StopIfError "Could not write to $fs_parameters"
-			echo "FS_RESERVED_BLOCKS=$FS_RESERVED_BLOCKS" > $fs_parameters
-			echo "FS_MAX_MOUNTS=$FS_MAX_MOUNTS" >> $fs_parameters
-			echo "FS_CHECK_INTERVAL=$FS_CHECK_INTERVAL" >> $fs_parameters
-			;;
-		*)
-			Log "The filesystem $filesystem on $device does not support extended filesystem"
-			Log "parameters like max mount count, check imterval etc. or it"
-			Log "is not implemented in Rear yet"
-			Log "Please file a bug if you think this is an error"
-			;;
-	esac
+            # The check interval is displayed in seconds, but tune2fs only allows us to set
+            # the interval in days, weeks or month. So we have to convert the seconds to days
+            (( FS_CHECK_INTERVAL = FS_CHECK_INTERVAL / 86400 ))
+            rm $tmp_fs_parameters
+            fs_parameters=$VAR_DIR/recovery$device/fs_parameters
+            >$fs_parameters
+            StopIfError "Could not write to $fs_parameters"
+            echo "FS_RESERVED_BLOCKS=$FS_RESERVED_BLOCKS" >>$fs_parameters
+            echo "FS_MAX_MOUNTS=$FS_MAX_MOUNTS" >>$fs_parameters
+            echo "FS_CHECK_INTERVAL=$FS_CHECK_INTERVAL" >>$fs_parameters
+            ;;
+        (*)
+            Log "The filesystem $filesystem on $device does not support extended filesystem"
+            Log "parameters like max mount count, check imterval etc. or it"
+            Log "is not implemented in Rear yet"
+            Log "Please file a bug if you think this is an error"
+            ;;
+    esac
 done <$VAR_DIR/recovery/mountpoint_device

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rear-users mailing list