mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Adds missing / in mount point specification
Adds example configuration file
This commit is contained in:
parent
496971e9c9
commit
7c64ee26f9
7 changed files with 51 additions and 27 deletions
|
|
@ -42,8 +42,11 @@ EXTRA_DIST = \
|
|||
README AUTHORS HISTORY INSTALL COPYING \
|
||||
snapraid.d snapraid.1 snapraid.txt snapraid.html \
|
||||
test.conf \
|
||||
snapraid.conf.example \
|
||||
acinclude.m4
|
||||
|
||||
man_MANS = snapraid.1
|
||||
|
||||
clean-local:
|
||||
rm -f valgrind.log callgrind.log
|
||||
rm -rf test
|
||||
|
|
|
|||
13
elem.c
13
elem.c
|
|
@ -96,6 +96,19 @@ struct snapraid_disk* disk_alloc(const char* name, const char* dir)
|
|||
disk = malloc_nofail(sizeof(struct snapraid_disk));
|
||||
snprintf(disk->name, sizeof(disk->name), "%s", name);
|
||||
snprintf(disk->dir, sizeof(disk->dir), "%s", dir);
|
||||
|
||||
/* ensure that the dir terminate with "/" if it isn't empty */
|
||||
if (disk->dir[0] != 0) {
|
||||
char last = disk->dir[strlen(disk->dir) - 1];
|
||||
if (last != '/'
|
||||
#ifdef _WIN32
|
||||
&& last != '\\'
|
||||
#endif
|
||||
) {
|
||||
snprintf(disk->dir, sizeof(disk->dir), "%s/", dir);
|
||||
}
|
||||
}
|
||||
|
||||
disk->first_free_block = 0;
|
||||
tommy_list_init(&disk->filelist);
|
||||
tommy_hashdyn_init(&disk->fileset);
|
||||
|
|
|
|||
27
snapraid.conf.example
Normal file
27
snapraid.conf.example
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Configuration for snapraid
|
||||
|
||||
# Define the block size in kilo bytes (1024 bytes).
|
||||
# Format: "block_size SIZE_IN_KB"
|
||||
# Default value is 128 -> 128 kilo bytes
|
||||
block_size 128
|
||||
|
||||
# Define the file to use as parity storage
|
||||
# It must me in an different disk than the data disk
|
||||
# Format: "parity FILE_PATH"
|
||||
parity /mnt/dp/parity
|
||||
|
||||
# Define the file to use as content list
|
||||
# Format: "content FILE_PATH"
|
||||
# It must me in an different disk than the data disk
|
||||
# It can be in the same disk used for parity storage
|
||||
content /mnt/dp/content
|
||||
|
||||
# Define to data disk to use
|
||||
# Format: "disk DISK_NAME DISK_MOUNT_POINT"
|
||||
disk d1 /mnt/d1/
|
||||
disk d2 /mnt/d2/
|
||||
disk d3 /mnt/d3/
|
||||
disk d4 /mnt/d4/
|
||||
disk d5 /mnt/d5/
|
||||
disk d6 /mnt/d6/
|
||||
|
||||
|
|
@ -196,12 +196,7 @@ Options
|
|||
For example, it happens if all the files in a disk are
|
||||
missing.
|
||||
|
||||
-e, --exclude PATTERN
|
||||
This option define an exclusion pattern to be applyed at
|
||||
the files with the "sync" command. It has no effect with
|
||||
other commands.
|
||||
|
||||
-v, --verboe
|
||||
-v, --verbose
|
||||
Prints more information in the processing.
|
||||
|
||||
-h, --help
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ You can stop using SnapRAID at any time.
|
|||
</li>
|
||||
</ul>
|
||||
<h2><a name="3">3</a>
|
||||
Misfeatures
|
||||
Limitations
|
||||
</h2>
|
||||
SnapRAID is in between a RAID and a backup program trying to get the best
|
||||
benefits of them. Altough it also has some downsides that you should
|
||||
|
|
@ -310,16 +310,7 @@ missing.
|
|||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr valign="top" align="left"><td><strong>
|
||||
-e, --exclude PATTERN
|
||||
</strong></td></tr><tr><td>
|
||||
This option define an exclusion pattern to be applyed at
|
||||
the files with the "sync" command. It has no effect with
|
||||
other commands.
|
||||
</td></tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr valign="top" align="left"><td><strong>
|
||||
-v, --verboe
|
||||
-v, --verbose
|
||||
</strong></td></tr><tr><td>
|
||||
Prints more information in the processing.
|
||||
</td></tr>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ The main features of SnapRAID are:
|
|||
You can stop using SnapRAID at any time.
|
||||
|
||||
|
||||
3 MISFEATURES
|
||||
3 LIMITATIONS
|
||||
=============
|
||||
|
||||
SnapRAID is in between a RAID and a backup program trying to get the best
|
||||
|
|
@ -218,12 +218,7 @@ SnapRAID provides three simple commands that allow to:
|
|||
For example, it happens if all the files in a disk are
|
||||
missing.
|
||||
|
||||
-e, --exclude PATTERN
|
||||
This option define an exclusion pattern to be applyed at
|
||||
the files with the "sync" command. It has no effect with
|
||||
other commands.
|
||||
|
||||
-v, --verboe
|
||||
-v, --verbose
|
||||
Prints more information in the processing.
|
||||
|
||||
-h, --help
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
block_size 1
|
||||
parity test/parity
|
||||
content test/content
|
||||
disk d1 test/disk1/
|
||||
disk d2 test/disk2/
|
||||
disk d3 test/disk3/
|
||||
disk d1 test/disk1
|
||||
disk d2 test/disk2
|
||||
disk d3 test/disk3
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue