Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
0
answers
101
views
lsyncd fails on FreeBSD system
I can successfully copy the `css` folder, yet cannot copy the `newsimages` folder. The `lsyncd` service keeps stopping. * If `lsyncd` is pointed at the `/pool/www/yiiazertag/azertag/css/` folder, it works fine. ```shell-session root@main2:/ # service lsyncd status lsyncd is running as pid 2044. ```...
I can successfully copy the
css
folder, yet cannot copy the newsimages
folder.
The lsyncd
service keeps stopping.
* If lsyncd
is pointed at the /pool/www/yiiazertag/azertag/css/
folder, it works fine.
-session
root@main2:/ # service lsyncd status
lsyncd is running as pid 2044.
The log file reports:
Wed Nov 6 13:27:11 2019 Normal: --- Startup, daemonizing ---
Wed Nov 6 13:27:11 2019 Normal: --- Startup ---
Wed Nov 6 13:27:11 2019 Normal: recursive startup rsync: /pool/www/yiiazertag/azertag/css/ -> root@10.0.0.55:/pool/www/yiiazertag/azertag/css/
sending incremental file list
sent 1,697 bytes received 15 bytes 3,424.00 bytes/sec
total size is 974,876 speedup is 569.44
Wed Nov 6 13:27:11 2019 Normal: Startup of /pool/www/yiiazertag/azertag/css/ -> root@10.0.0.55:/pool/www/yiiazertag/azertag/css/ finished.
* However, if lsyncd
is supposed to work with /pool/www/yiiazertag/azertag/newsimages/
, it does not work any more:
-session
root@main2:/ # service lsyncd status
lsyncd is not running.
Log file:
Wed Nov 6 15:01:38 2019 Normal: --- Startup, daemonizing ---
Wed Nov 6 15:01:38 2019 Normal: --- Startup ---
* For reference,
the configuration file /usr/local/etc/lsyncd.conf
is:
settings {
logfile = "/var/log/lsyncd.log",
statusFile = "/var/log/lsyncd.status",
statusInterval = 1,
maxProcesses = 1,
insist = 1,
}
sync{
default.rsync,
delay = 0,
source = "/pool/www/yiiazertag/azertag/newsimages/",
target = "root@10.0.0.55:/pool/www/yiiazertag/azertag/newsimages/",
rsync = {
archive = true,
compress = true,
acls = true,
verbose = true,
owner = true,
group = true,
perms = true,
temp_dir="/tmp/",
-- binary = "/usr/local/bin/rsync",
-- sparse = true,
-- update = true,
-- protect_args = false,
-- whole_file = false,
-- links = true,
_extra = { "--omit-dir-times" },
rsh = "ssh -p 44400 -o StrictHostKeyChecking=no",
-- rsync_path = "/usr/local/bin/sudo /usr/local/bin/rsync"
},
delete = true
}
The file limits should not pose a problem:
| sysctl
| value |
|:---------------------- | --------:|
| kern.maxfiles
| 500000
|
| kern.maxfilesperproc
| 490000
|
| kern.openfiles
| 274
|
Alekperov
(11 rep)
Nov 6, 2019, 12:35 PM
• Last activity: Sep 7, 2024, 05:35 AM
7
votes
4
answers
2394
views
Centralized $HOME for roaming devices - sync instead of NFS?
For over a decade now I have been working in a full Debian environment in my small office (currently 1 server, 7 users, 3 desktops, 4 laptops). Authentication is based on Kerberos, user profiles are managed in LDAP, and $HOME is served to all of the clients over NFSv4 with the help of pam_mount or a...
For over a decade now I have been working in a full Debian environment in my small office (currently 1 server, 7 users, 3 desktops, 4 laptops). Authentication is based on Kerberos, user profiles are managed in LDAP, and $HOME is served to all of the clients over NFSv4 with the help of pam_mount or autofs. This setup is very much ok for desktop users working on the local lan.
Two years ago, I started using the same setup for laptop users. The WiFi connection caused some additional sluggishness, and for sure once the users tried to use the laptop outside of the office, things got really slow. Optimizing $XDG_{CACHE,DATA,CONFIG}_HOME and looking into specific optimizations for Firefox on NFS made things a bit better.
I'm now thinking of moving the $HOMES to the laptops+desktops. It is nice that a user can switch devices if one goes down, but that only happens once in a while. Sacrificing this flexibility for a faster day-to-day user experience seems like a good decision. If I could bi-directionally sync the local $HOME to the central server on startup and shutdown, there probably wouldn't be a tradeoff at all...
- 'unison' seems like a good candidate for keeping the local $HOME in
sync with a central copy, but it seems to require exact same versions
between server and client, and that I cannot commit to.
- 'lsyncd' seems to be a very good candidate, but I don't seem to find any user
stories using the tool for their $HOME directories...
- I even had a brief look at 'GlusterFS', but that seems like it's a non-trivial replacement.
Anyone has any experience and maybe best practices to share? I don't mind a bit of experimenting, but I'm afraid I'm missing some obvious downsides to the above... Thx!
zenlord
(738 rep)
Dec 16, 2021, 12:28 PM
• Last activity: Jan 9, 2022, 09:15 PM
1
votes
1
answers
2143
views
lsyncd -- one way synchronisation but for the whole folder
I have two folders `~/A` and `~/B`. With some content. I write an `lsyncd` configuration file `~/.config/lsyncd/lsyncd.conf`: # NOTE: Use only absolute path names # NOTE: check "man rsync" for parameters inside "rsync{}". # Global settings settings { logfile = "/home/ziga/.config/lsyncd/lsyncd.log",...
I have two folders
~/A
and ~/B
. With some content.
I write an lsyncd
configuration file ~/.config/lsyncd/lsyncd.conf
:
# NOTE: Use only absolute path names
# NOTE: check "man rsync" for parameters inside "rsync{}".
# Global settings
settings {
logfile = "/home/ziga/.config/lsyncd/lsyncd.log",
statusFile = "/home/ziga/.config/lsyncd/lsyncd-status.log",
statusInterval = 5
}
# Synchronisation A ⟶ B
sync {
default.rsync,
source = "/home/ziga/A",
target = "/home/ziga/B",
delete = true,
rsync = {
binary = "/usr/bin/rsync",
executability = true,
existing = false,
}
}
And I start lsyncd
like this:
lsyncd -nodaemon ~/.config/lsyncd/lsyncd.conf
> **Note:** Parameter -nodemon
is there only to give me more information
> in the terminal where I run the above command.
Immediately after the command is executed, synchronisation takes place and content of folder ~/A
is transfered to the folder ~/B
. This is okay.
According to my configuration file I would expect that if I delete a file in ~/B
, it will not be deleted from ~/A
which is also the case! And this is a wanted behaviour - I want to prevent accidental deletion of content in folder ~/A
.
But at this point I would also expect that lsyncd
will detect that folder ~/B
is missing a just deleted file and will sync the folders again by copying the missing file from ~/A
to ~/B
like it does immediately when it is started! **But this does not happen.**
How can this be done?
71GA
(1296 rep)
Oct 28, 2021, 03:26 PM
• Last activity: Nov 1, 2021, 07:40 PM
Showing page 1 of 3 total questions