nice, thanks a lot !mv wrote:The patch should be fixed now to build in all cases.
cheers
I don't know. AFAIK systemd does not have proper dependencies and probably also not a standard route during shutdown which is crucial for the script.costel78 wrote:Is it possible to port the init script to systemd?
Essentially, it is the "start" and "stop" which would have to be called at the proper place. The other provided command are only for wrapper scripts to check the current state (e.g. whether it would be saved). Probably one could put a part in a "library" which is sourced.I looked over actual openrc script, but it is too far complex to simple migrating the commands
At least the mount and umount commands from sys-apps/util-linux provide a way to call helper scripts for mount and umount of certain filesystem types. I have never dealt with them and do not know how compatible this setting is. But it might be a possible to invent a "new" filesystem type and to do the actual action in these helper scripts. However, this needs to be well-tested: e.g. aufs also uses such helper scripts, so "recursive" callings of such scripts must be possible.costel78 wrote:As you said, I found no way to prevent systemd to try to umount the partition and kill tar process.

Code: Select all
/etc/init.d/squash_portage restart
* Unmounting /usr/portage ... [ ok ]
* Mounting /squashed_dirs/portage.sqfs as /usr/portage ... [ ok ]This is strange. I cannot reproduce it here. Are you sure that you do not have a .no-save file and not set any threshold?slycordinator wrote:And the portage.sqfs is not recompressed
Code: Select all
/etc/init.d/squash_portage print_dir_changeCode: Select all
ls $(/etc/init.d/squash_portage print_dir_change)Code: Select all
/etc/init.d/squash_portage need_squash
/etc/init.d/squash_portage will_squash
Code: Select all
app-backup/backup-manager/files/
app-backup/backupninja/
app-backup/backuppc/
app-backup/backuppc/files/
app-backup/backuppc/files/3.2.0/
app-backup/bacula/
app-backup/bacula/ChangeLog
40.52K 100% 59.51kB/s 0:00:00 (xfer#24, to-check=1056/4230)
app-backup/bacula/Manifest
8.54K 100% 12.22kB/s 0:00:00 (xfer#25, to-check=1055/4230)
app-backup/bacula/bacula-5.2.5.ebuild
10.09K 100% 14.42kB/s 0:00:00 (xfer#26, to-check=1048/4230)
app-backup/bacula/bacula-5.2.6.ebuild
10.09K 100% 14.09kB/s 0:00:00 (xfer#27, to-check=1047/4230)
rsync: rename "/usr/portage/app-backup/bacula/.bacula-5.2.6.ebuild.rJDBEZ" -> "app-backup/bacula/bacula-5.2.6.ebuild": Software caused connection abort (103)
app-backup/bacula/files/
app-backup/bacula/files/5.0.2/
app-backup/bacula/files/5.0.3/
app-backup/bacula/files/5.2.3/
app-backup/boxbackup/
app-backup/boxbackup/files/
app-backup/ccollect/
app-backup/cdbackup/
app-backup/cdbkup/
app-backup/cpdup/
app-backup/cpdup/files/
app-backup/dar/
app-backup/dar/files/
rsync: failed to set times on "/usr/portage/app-crypt": Software caused connection abort (103)
rsync: opendir "/usr/portage/app-crypt" failed: Transport endpoint is not connected (107)
rsync: recv_generator: failed to stat "/usr/portage/app-crypt/metadata.xml": Transport endpoint is not connected (107)
rsync: recv_generator: mkdir "/usr/portage/app-crypt/WiRouterKeyRec" failed: Transport endpoint is not connected (107)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/usr/portage/app-crypt/acr38u" failed: Transport endpoint is not connected (107)
...
And it worked before (i.e. with other kernels)? Then it looks to me like a race condition problem in unionfs-fuse or an incompatibility of fuse with the newest kernels.js08 wrote:Hi,
I'm no longer able to update my portage tree (squash_dir, unionfs_fuse [everything from mv-overlay])
sys-fs/fuse-2.8.7, kernel 3.2.11-gentoo or 3.3-gentoo, net-misc/rsync-3.0.9-r1
emerge --sync produces the following error:
yes, everything worked fine until 3-21-2012.mv wrote:And it worked before (i.e. with other kernels)? Then it looks to me like a race condition problem in unionfs-fuse or an incompatibility of fuse with the newest kernels.js08 wrote:Hi,
I'm no longer able to update my portage tree (squash_dir, unionfs_fuse [everything from mv-overlay])
sys-fs/fuse-2.8.7, kernel 3.2.11-gentoo or 3.3-gentoo, net-misc/rsync-3.0.9-r1
emerge --sync produces the following error:
If the start of the error message is not reproducible, I would guess on the former and suggest that you report the problem upstream at unionfs-fuse.


You might try the git sources (aufs-99999999.3, also available from the mv overlay). Let us hope that the kernel developers come to their mind and finally include aufs or at least overlayfs, although the latter has several drawbacks compared to aufs.Massimo B. wrote:The only issue for now is that aufs3 sources don't build on [topic=935052]PPC[/topic].
For compression, lzo is undoubtfully the fastest (and least effective) and xz the slowest (and most effective). However, except for the time on shutdown only decompression time plays a role. Concerning decompression, lzo is also the fastest, but surprisingly xz is not much slower. Since xz needs to access less data (because it compresses much better), it can be that on some systems (especially those with not much memory or huge cache) xz is even the winner for decompression, speedwise. Your really have to try.Is there any COMPRESSION ("gzip", "xz", "lzo") advice for maximal performance

Code: Select all
$ cat /etc/cron.daily/1squashfs_flush
#!/usr/bin/env bash
for rc in /etc/runlevels/boot/squash_*; do
if [[ 0 != "$($rc will_squash 2>&1 >/dev/null)" ]]; then
$rc restart
fi
doneCode: Select all
du -sh /usr/portage*
311M /usr/portage
52M /usr/portage.changes
280M /usr/portage.readonly
67M /usr/portage.sqfsCode: Select all
$ du -sh /usr/portage*
711M /usr/portage
711M /usr/portage.changes
280M /usr/portage.readonly
67M /usr/portage.sqfsAre you aware that there is a squash_dir wrapper for this?Massimo B. wrote:Because I can't afford long startup or stop time, I restart the squashing on daily base:
should do the same as your script (only that by default it will stop on errors). Moreover the latter has the advantage that you can easily pass options to e.g. ignore the threshold.squash_dir restart
Exactly.Btw, how do I understand the disk usage? Is it like this, /usr/portage and /usr/portage.readonly are only virtual sizes while the only real consumption on the host fs are these of the *.changes and *.sqfs files only?
This is because of the COW mechanism of aufs: If something changes in a file, even if it is only the filestamp or some attributes, the file must be copied into the .changes directory. I guess webrsync changes all filestamps, at least temporarily. With other union-type filesystem the necessary COW might be even more intensive, e.g. (IIRC this was the case in some versions of unionfs-fuse) if only the directory filestamp changes then the whole directory might need to be written to *.changes - it really depends which mechanisms are used to merge the directories.I've seen that after a new webrsync of the same snapshot it seems that all has been re-written.

No I wasn't, thanks. squash_dir restart really simplifies that task or cronjob.mv wrote:Are you aware that there is a squash_dir wrapper for this?cript (only that by default it will stop on errors). Moreover the latter has the advantage that you can easily pass options to e.g. ignore the threshold.squash_dir restart should do the same as your s


Code: Select all
$ squash_dir restart
/etc/init.d/squash_db is not running
/etc/init.d/squash_layman is not running
/etc/init.d/squash_local_portage is not running
/etc/init.d/squash_portage is not running
$ squash_dir start
Starting db...
squash_db | * Mounting /var/db.sqfs as /var/db ...
squash_db |mount: /var/db.sqfs is already mounted
squash_db | * Failed mounting /var/db.sqfs as /var/db.readonly [exit with 1]
squash_db |rmdir: failed to remove `/var/db.readonly': Device or resource busy [ !! ]_db |
squash_db | * ERROR: squash_db failed to start
Skipping /etc/init.d/squash_layman due to previous error
Skipping /etc/init.d/squash_local_portage due to previous error
Skipping /etc/init.d/squash_portage due to previous error
The problem is that it is not clear what to do:Massimo B. wrote:When a new kernel has no aufs module, then squash_dir scripts fail but has half mounted the read.only parts.
