130 Commits

Author SHA1 Message Date
Patryk
32e8d297f6 mount: Added support for mounting with mount instead of using mfsmount directly
This commit adds support for new mount scheme that is compliant with
other, non-LizardFS mounts. Instead of specifying master hostname, port
and subfolder in mount options, it is now possible to specify them as
mount user would probably expect, that is e.g.: `mfsmount
lizardfs-master:9421:/ /mnt/lizardf` instead of `mfsmount -o
mfssubfolder=/ -o mfsmaster=lizardfs-master -o mfsport=9421
/mnt/lizardfs`. New mount scheme applies both to /etc/fstab and CLI. Old
scheme is still supported for backward compability.

Fixes #822

Change-Id: Icb7bd6455e6c98493418bfd02602cea2dcc5f6ce
2019-04-29 15:58:29 +02:00
Patryk
5adf40470f mount, doc: Added -o nonempty option for FUSE3
FUSE3 removed `-o nonempty` mount option, mounting over non-empty
directories is always allowed in FUSE3. This behaviour is undesirable in
lizardfs-client3 because running `mount -a` for shares mounted with
mfsmount3 resulted in multiple mounts of the same share. This commit
fixes this issue.

Fixes #807

Change-Id: I16888169857cf20302dcad4828c5ef83f808eb67
2019-04-19 15:23:14 +02:00
Patryk
aeda70c397 mount, doc: Added -o nostdmountoptions option
mount, doc: This commit introduces mfsmount -o nostdmountoptions that is
equivalent of the --nostdopts but unlike --nostdopts it can be used in
/etc/fstab as a mount option.

Fixes #802

Change-Id: I3316b129dd9296583e9cb66ac0dedcd640ba82e5
2019-04-17 14:57:58 +02:00
Piotr Sarna
50785fa8f9 uraft: Expand documentation
This commit adds more documentation entries to lizardfs-uraft.

Change-Id: I8a0a028b264298fe6047b3f73aeaaebb22ce97d9
2018-06-22 16:39:28 +02:00
Hazeman
462350980e uraft: Add uraft
This commit adds uraft implementation.

Change-Id: If766e654301dc52b7bdc22cdcfd1771e3b0c2b1c
2018-06-21 14:34:25 +02:00
Hazeman
50394e4d2d mount: Turn off readahead cache by default
This commit turns off readahead cache by default.

Change-Id: I844169517c2a84fa58058605d8ba05912fb886dc
2018-06-14 12:10:23 +02:00
Matthias Van Woensel
84211cfb95 doc: Fix a typo
This commit fixes a typo in mfsmount man page.

Closes #637

Change-Id: If65b2890260ba7b96464bddb55d59a29022f2ab5
2018-05-23 11:59:34 +02:00
Fretek
071f16cefe mount: Turn on readahead cache by default
This commit turns on readahead cache by default.
It also clears polonise code to use default values from client.

Change-Id: Id7bb839e2fada43d8297bbec80e4a9a74fb428ea
2017-11-28 11:47:02 +01:00
Piotr Sarna
01ffb2ac5b chunkserver: Make replication limits configurable
This commit makes the following replication timeouts configurable:
 - total timeout (previously - 60s);
 - wave timeout (previously - 300ms);
 - connection timeout (previously - 1s).
These changes allow replications to succeed even on very slow networks,
i.e. ones slower than 1MBps bandwidth and >1s TCP handshake time.

Change-Id: I81e910b94e2ab42adbad41261e997ae37ace25ce
2017-11-16 14:37:17 +02:00
Hazeman
1dc583b0e8 master: Improve file test loop
This commit makes small modification to test loop,
so it counts number of operations more accurately.
Also default value of FILE_TEST_LOOP_MIN_TIME has been changed
from 300 to 3600 (to reduce master server load).

Change-Id: I35416acbc86ba4779ce5a427751db0fc0564df68
2017-06-05 15:19:59 +02:00
Hazeman
5a64a756e9 master: Add option to set file test loop time
This commit adds option to specify files test loop time.

Change-Id: I9c6fa2ff4891ebf574f48bafd638d89f1df6e6e4
2017-05-08 16:49:53 +02:00
Maksymilian Paszkiewicz
fc6b765c4b master: Add configurable initial snapshot batch limit
This commit adds SNAPSHOT_INITAL_BATCH_SIZE_LIMIT
configuration option for master.
Its value is used to limit initial batch size of
all snapshot requests.

Change-Id: Id3742c3c9af5d8d0897a7c96f54f4ed5f424e34c
2017-04-26 13:11:47 +02:00
Maksymilian Paszkiewicz
0a580a21ba tools, master: Add options to makesnapshot command
This commit adds two options to makesnapshot command.
Usage:
-s <value> (Set initial batch size)
This option is used to specify number of nodes that
will be atomically cloned
-i (ignore missing source nodes in snapshot request)

SNAPSHOT_INITIAL_BATCH_SIZE - mfsmaster config option
that allows setting initial batch size of snapshot
requests (Default value is 1000)

Change-Id: Iff645ceadd37043d3575b2e1c29ffbef00967713
2017-04-25 15:44:40 +02:00
Adam Heath
6f6cb80ed5 master: Add option PREFER_LOCAL_CHUNKSERVER
When set, any client that is running on the same node as a chunkserver
will prefer replicated chunks to be serviced by the local node.

Closes #250

Change-Id: I3d93baf34ee23ccf5e8dd6171d70db599d19ad15
2017-04-25 15:05:42 +02:00
Maksymilian Paszkiewicz
33c1d28728 master: Add minimal extra parts option for writing
This commit adds an option to set minimal number of
extra (above required) chunk parts available in order to
successfully write a chunk.
In case of a goal which by definition has less extra
chunk parts than given minimum, this option has no effect.

Closes #227

Change-Id: I1839e5e306c1dc6311d6f2ab0b85881cfc60bf94
2017-04-21 13:50:16 +02:00
Piotr Sarna
fe0d220362 chunkserver, master: Add chunkserver load awareness
This commit introduces master's awareness of chunkserver load
while picking servers for writing/reading/rebalancing.

After this patch, chunkservers with high I/O will be picked
less frequently, which would reduce their chances of overload.

This functionality works if ENABLE_LOAD_FACTOR is set to 1
in chunkserver's mfschunkserver.cfg config file.
It is currently disabled by default.

This commit also introduces LOAD_FACTOR_PENALTY configuration option
for master (mfsmaster.cfg). This percentage of penalty will be added
to each chunkserver's usage if it is heavily loaded,
which will result in picking it for operations less frequently.

Closes #307

Change-Id: Ie503ec4e61cc5086330e5f2cc029447de029231c
2017-04-05 14:45:31 +02:00
Maksymilian Paszkiewicz
a4a836f50d master: Add option to avoid same-ip chunkservers
This commit adds option to change process of selecting
chunkservers for chunks.
If AVOID_SAME_IP_CHUNKSERVERS is set to 1, master will
try to avoid choosing chunkservers that share the same ip.

Change-Id: Ie0f1188e9a73b6ec9831431c188dbaf7f7a83083
2017-04-04 14:36:44 +02:00
Maksymilian Paszkiewicz
d39f4ee70b master, tools: Add recursive remove operation
This commit adds new tool which is used for removing
files and directories recursively.
It is advised to use this command once tools for stopping tasks
are available.

Closes #254

Change-Id: I2f1043a1b707c2db66ed4d37de08eb9a51935eee
2017-03-17 11:32:04 +01:00
Maksymilian Paszkiewicz
1a3b73ea4d master, tools: Add correct-only flag to filerepair
This commit adds a functionality to filerepair utility:
with correct-only flag, a chunk will be restored from previous versions
if possible, but it will never be erased.

Closes #404

Change-Id: I5e26b99c4106470f923a32e5d0f6726144fb0243
2017-01-04 14:37:56 +01:00
klemens
13b2cda9e8 all: Fix spelling mistakes
This commit fixes typos found by misspell_fixer:
https://github.com/ka7/misspell_fixer

Closes #508

Change-Id: I412d3d462d6892a75e6f5559312594dc6afca182
2017-01-04 13:59:11 +01:00
Michal Bielicki
860031c3a5 doc: Add manpage for mfsmount.cfg.5
This commit adds missing page for mfsmount.cfg(5).

Change-Id: I6ca6ffa7ecb5b7bef78be88afc2b5fbdb3ebf165
2016-10-27 13:39:22 +02:00
Piotr Sarna
75edd8b2e5 mount, doc: Add man pages and set new default for read cache
This commit adds man pages to new mount options which allow configuring
readahead mechanism. It also makes readahead turned off by default.

Change-Id: I4b119729b8fef9e3cc6481dfb2e8d4b7a97f79cf
2016-10-25 16:54:51 +02:00
Christian Lademann
84763d73a6 mount: Add '-o askpassword' synonym to '-p'
This commit adds a synonym to '-p' option which makes mount binary
prompt user for password before mounting.

Change-Id: Ifa84a3024f37ab6ba64bd5e400c212af91615c98
2016-08-18 15:16:32 +02:00
Maksymilian Paszkiewicz
23e3af5ac7 tools: Add lizardfs command to perform tools operations
This commit introduces new means of using lizardfs tools.
From now on, tools can be used with command:
lizardfs [tool_name] [params]
(eg. old 'mfsgetgoal' is 'lizardfs getgoal')
Additionally, running 'lizardfs' command without
parameters opens a prompt that allows clients to
perform tools operations by their name
(eg. dirinfo [params])
and supports basic operations like 'cd' or 'ls'.

Change-Id: I35d72e46febc36677f38a22fc09f0cc187804225
2016-08-09 09:13:23 +02:00
Piotr Sarna
8d94dd50b5 master, tests: Add OPERATIONS_DELAY_* to config
This commit replaces REPLICATIONS_DELAY_DISCONNECT and
REPLICATIONS_DELAY_INIT config entries with OPERATIONS_DELAY_*.
New config entries have expanded responsibilities - they influence
more chunk operations than replication only:
 - everything handled in chunk loop,
 - periodic metadata checks.

REPLICATIONS_DELAY_* entries are deprecated, but work as new entries
to ensure backward compatibility.

Change-Id: I2f87219776c6aa5b763d891b3bc8177f046c0064
2016-07-11 14:34:27 +02:00
Maksymilian Paszkiewicz
5928fcf931 master: Add loop watchdog to trash emptying
This commit adds loop watchdog to trash emptying routines.
From now on, trash will be cleared gradually in order not to hang
master for a long period of time (like previous implementation could).

This commit also deprecates EMPTY_TRASH_PERIOD configuration variable.

Change-Id: I02bdaf6b687be912e1d6af62cf87bb4580efe8ca
2016-05-23 15:26:03 +02:00
Hazeman
8c760daa55 master: Replace use of C strings for file names with hstorage
This commit modifies master so it uses hstorage classes
to store and compare file names.

There are two options available for storing file/directory names.
First one uses system memory and is enabled by default.
Second option uses Berkeley DB for storing names on disk.

New config options were introduced to manage name storage.

USE_BDB_NAME_STORAGE - if true then Berkeley DB is used
DBD_NAMESTORAGE_CACHE_SIZE - name cache size in MB (in system memory)

Additionally this commit modifies test framework, so it randomly
chooses one of the available storages.

Change-Id: I635929a30a5496e4e81433fdcd0cf313ca8876e9
2016-05-06 14:48:37 +02:00
Fretek
605b634dca common, doc: Fix FreeBSD compilation
This commit fixes FreeBSD issues:
 * typo in sockets.cc,
 * incorrect compiler directives in portable_endian.h,
 * doc validation.

Change-Id: I3a25671222914d91d116eafae9018d3d1399c199
2016-03-14 14:35:13 +01:00
Hazeman
f09ab4fe35 doc: Add information about EC goals
This commit adds entry with description
of erasure code goals to manual.

Change-Id: I687a79963938d19bec9433fc69dccf2735d27f1c
2016-03-14 13:46:45 +01:00
Hazeman
96b6491df6 chunkserver: Add punching holes in chunk files
This commit modifies chunkserver so it detects
zeros in chunk data and frees corresponding
file system blocks.

Configuration entry HDD_PUNCH_HOLES can be used
to enable this feature in chunkserver.

Closes #370

Change-Id: I06b94290e059a3583e5314f711017dd81437b191
2016-03-11 14:18:24 +01:00
Hazeman
b8adb3c5b7 tools: Add option to set/get quota per directory
This commit adds option to set quota per directory.

Change-Id: I97000d75bff614c9f731368a9d276f5c6b2f44e6
2016-03-02 10:34:01 +01:00
Piotr Sarna
172f3dc905 all: Remove splice
This commit removes splice functionality from chunkserver.
While splice can bypass memory copying, it creates spurious situations
when descriptor is written to while being read from, which causes
inconsistent data to be read by client.

Change-Id: Ieb7d72c685e55a53929c83f9ae4db91dadfd733a
2016-02-23 13:38:12 +01:00
Piotr Sarna
491254a6f6 mount: Add bandwidth overuse ratio to client configuration
This commit enables bandwidthoveruse option to be passed to mount.
When set to 1.618, up to 61.8% more bandwidth would be used for fetching
redundant data from chunkservers. Thanks to that, read request will
be finished as soon as minimum required number of parts arrives.
Data sent by slowest chunkservers is discarded.
When set to 1.0, only required number of parts is requested from
chunkservers.

Example:
 $ mfsmount -o bandwidthoveruse=1.618 mountpoint/

Change-Id: I54a90fea70926c63dbd56be13936415af073b613
2016-02-17 15:32:42 +01:00
Hazeman
53bfb153d1 mount: Replace use of MultiVariantReadPlanner with ChunkReadPlanner
This commit removes old MultiVariantReadPlanner class
and replaces it with ChunkReadPlanner. This requires
small changes to the rest of mount code (i.e. replacing
basicreadto parameter with wavereadto).

Change-Id: I7f67a6cb84e57619e63d55071a397448d01c4ead
2016-02-17 15:32:19 +01:00
Piotr Sarna
d1e3898b66 mount: Make global locks disabled by default
Global file locks are necessary only for specific purposes
and they generate overhead in master, so this commit
disables them by default.

Change-Id: Ie8b22d9262aca1d8b10e386cc0bbe8bb7b839edf
2016-01-20 13:51:47 +01:00
Piotr Sarna
b3a894f0a8 chunkserver: Adjust default number of hdd workers
This commit replaces default number of hdd workers per network worker
from 20 to 2. Previous value was proven to cause I/O overload on regular
disks.

Change-Id: Iff00b9f14ceb586a1365d0b42a534b7302b2d52f
2015-10-30 11:45:10 +01:00
Wojciech Donderowicz
78aea2a0ed mount: Add enablefilelocks mount option
This commit allows mount to enable or disable file locking features.
File locks are enabled by default.

If file lock management is disabled, all calls are handled by local
locking mechanism provided by FUSE.

Change-Id: Id6cb0cca9ab7f365ad2a1d58951c367154b2c8fa
2015-10-21 15:17:47 +02:00
Piotr Sarna
28aaf054b9 mount: Add symlink cache timeout value to config
This commit enables users to set symlink cache timeout in configuration file.
Additionally, default value was changed from 1 minute to 1 hour.

Change-Id: Ic5852931ec921b5f4f91611e08b61dba8278469b
2015-10-19 15:19:36 +02:00
Piotr Sarna
42a3f7c6fc master: Enhance checks for endangered chunks
This commit adds missing check of serving limit for endangered chunks.
Until now, chunks were still enqueued as endangered even if collecting
endangered chunks was disabled in config (by setting serving limit to 0).
It also introduces ENDANGERED_CHUNKS_MAX_CAPACITY config entry,
which limits memory usage of endangered chunks queue.
Default value for max capacity is 1Mi.

Change-Id: I98ef83701258b8495ce815fddfbca37b24c777b6
2015-09-24 15:23:33 +02:00
Wojciech Donderowicz
b45fe1fd8a master: Use new config format in goal config loader
As a result of changes in structures describing goal,
format of goals config was extended.

This commit amends goal config loader to make it understand
the new format.

Change-Id: If50165f36d1fb4a94f3057e8fd7895ade16b1756
2015-09-18 16:41:44 +02:00
Hazeman
ed9cca86cb master, tools: Remove support for +/- flags in setgoal
This commit removes support for increasing and
decreasing goal modifiers in setgoal.
With goal labels and different types of goals (like xor)
increasing/decreasing goal id leads to unpredictable
behaviour. Because there is no sensible modification to make
this option work it was removed altogether.
Test validating this functionality is also changed.

Change-Id: Ieb79bc5a76db9e7465c18f7a4557627ee8ce2419
2015-09-18 11:01:06 +02:00
Hazeman
c172000030 master: Improve inode pool management in master
This commit replaces old inode pool management code with
the one using new class IdPool. It's faster (constant time ops)
and it uses much less memory.
It also removes master/shadow dependency on exact behaviour
of id acquisition code and adds some sanity checks (like testing
if id pool was exhausted).

Change-Id: I08d7403edd049fcbcd6d111a3c856fb5d72fed8f
2015-09-14 10:03:08 +02:00
Hazeman
f102e9f790 master: Add option to increase CHUNK_LOOP frequency
This patch adds option to increase CHUNK_LOOP frequency.
Additionaly it's now possible to set hard limit to CPU
usage by chunk processing loop.

Change-Id: Iba199ff0368deddcc4c97a4b7928e6726512f94c
2015-07-27 16:02:49 +02:00
Piotr Sarna
acdf77a089 tools: Add -f option to mfsmakesnapshot
This commit aliases existing -o (overwrite) option for mfsmakesnapshot
with -f (force).

Change-Id: I8341b0cdb0527ddd2db56272161502b59dedf93a
2015-07-27 13:22:53 +02:00
wajcha
9147fa737b Merge lizardfs into efs
Change-Id: If8a62b747d20da38334730a2cf8a6e9f84d33a65
2015-06-19 09:57:15 +02:00
wajcha
d0dca04f88 Merge branch 'lizardfs' into efs
Change-Id: I35e701686f0caf1ab7ad14c1bac62cb4e0cdd9eb
2015-06-01 15:25:13 +02:00
Marcin Sulikowski
1ca0b89a0d cmake: Modify ETC_PATH to point to /etc/mfs
ETC_PATH was always suffixed with "/etc", so this commit modifies this
variable to point to <prefix>/etc/mfs instead of <prefix>/etc. This is
also to make it work the same way as DATA_PATH, which is by default
/var/lib/mfs.

Change-Id: Ib42d9fff0b1cf5380b754f1f216008d339ac4f59
2015-05-27 10:03:06 +02:00
Alek Lewandowski
73226d02b2 chunkserver: Restore backward compability of chunks
Restore backward compability broken in

    17a8a79085e6ad845a4ae747bd4870b2e865219b
    chunkserver: Change chunk format breaking backward compatibility

Change-Id: Idb61d8941f9bbfba38737d6bb9f4a2d40fd8b23d
2015-05-18 16:10:20 +02:00
Dmitry Smirnov
d7351b695e all: Correct spelling
This commit applies codespell spelling corrections to LizardFS source.

Closes #274

Change-Id: I2c4adcbd15b5e03b2a72430ac26441f9d0b598fb
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2015-05-14 12:02:02 +02:00
Michał Kaźmierowski
9202b621a4 doc: Update copyright year
Copyright is now until 2015.

Change-Id: I388b73a1b32dcc7d81f0ba2ef7e25c981a5d9f36
2015-04-08 15:48:06 +02:00