You mean concerning reducing of numbers of writes? It depends: It will reduce the numbers of writes if you put TMPDIR and DIR_CHANGE to something else than ssd. To put TMPDIR to a ramdisk is reasonable safe, but putting DIR_CHANGE to ramdisk means that after a power loss all changes are lost.ernov wrote:Is this howto a good way of treating ssd?
Code: Select all
Thinkpad pkg # pwd
/var/db.changes/pkg
Thinkpad pkg # ls -lh
total 8.0K
drwxr-xr-x 3 root root 4.0K Jan 11 16:35 app-emulation
crw-rwsr-- 1 32518 32808 1930, 1607 Feb 18 1970 dev-perlArchive-Zip-1.30
crw-rwsr-- 1 32518 32808 2063, 1567 Feb 18 1970 media-libsa52dec-0.7.4-r6
drwxr-xr-x 3 root root 4.0K Jan 11 13:59 media-video
b-ws-ws--- 1 32518 32808 2190, 1583 Feb 18 1970 x11-libscairo-1.8.10Did you add least add the linemattst88 wrote:Ignoring that I can't emerge --sync, every time I do an emerge --prune, it somehow then thinks tons of other software isn't installed anymore.
Code: Select all
PORTAGE_RSYNC_EXTRA_OPTS="${PORTAGE_RSYNC_EXTRA_OPTS} --exclude=/.unionfs --exclude=.fuse_hidden*"Indeed, something is very broken here - of course, this causes your problems with emerge --prune. I never had such problems (on the other hand, I normally use aufs2). Probably, this broken setting is now already stored in your archive, so I see no chance that we can reproduce how this happened. This is very serious, since /var/db/pkg contains valuable data - you have to reemerge the broken packages to fix it (and probably this re-emerging will cause file collisions and may leave orphaned files). I just can recommend to not use unionfs-fuse for a valuable directory like /var/db/pkg any more, if it does not work reliably on your machine...Also, I don't have any idea what's going on here, or what's causing it.
Code: Select all
/etc/init.d/squash_portage sync
squash_portage | * Use of the opts variable is deprecated and will be
squash_portage | * removed in the future.
squash_portage | * Please use extra_commands or extra_started_commands.
squash_portage | * Syncing portage tree ...I do not understand your question.p04ty wrote:What's that? How would it compare to in-kernel squashfs?
p04ty wrote:What about this message:Code: Select all
/etc/init.d/squash_portage sync squash_portage | * Use of the opts variable is deprecated and will be squash_portage | * removed in the future. squash_portage | * Please use extra_commands or extra_started_commands. squash_portage | * Syncing portage tree ...
This will display all files using the opts as statement. WARNING the opts that dont hove = on eg "$fsck_opts -R" are not to be changed only them that show up at the start of the scripts saying opts=# cd /etc/init.d
# grep -r "opts" *
The above command shows the real opts that need changing.grep -r "opts=" *
Now double check it change them correctly:# grep -lr -e "opts=" * | xargs sed -i "s/opts=/extra_commands=/g"
Pick yourself a init.d script and restart it see if it works i chose iptables and sysklogd:# grep -r "opts=" *
it should find nothing
# grep -r "extra_commands=" *
All the files should now be listed with the extra_commands and your good to go
They should all restart without the above named warnings and or any other warning or errors.# /etc/init.d/iptables restart
# /etc/init.d/sysklogd restart
Since baselayout-1 is now gone from the tree and meanwhile even the oldest openrc in the tree supports extra_commands, I would not worry about backward compatibility. However, with patching init-scripts from the tree, I would wait until they are officially bumped (which does not necessarily mean a revision bump of the corresponding package - you have to check manually).F1r31c3r wrote:but in doing this you make backward compatibility a problem.
Please have a special look at files containing ${opts} references, e.g. /etc/init.d/reboot.sh aso.F1r31c3r wrote:p04ty wrote:What about this message:
This will display all files using the opts as statement. WARNING the opts that dont hove = on eg "$fsck_opts -R" are not to be changed only them that show up at the start of the scripts saying opts=# cd /etc/init.d
# grep -r "opts" *
The above command shows the real opts that need changing.grep -r "opts=" *
Here is the quick dirty way to change them to extra_commands NOTE the = sign after the words dont leave it out or it will break your system.
Now double check it change them correctly:# grep -lr -e "opts=" * | xargs sed -i "s/opts=/extra_commands=/g"
# grep -r "opts=" *
it should find nothing
# grep -r "extra_commands=" *
All the files should now be listed with the extra_commands and your good to go

Code: Select all
sed -e 's:opts=:extra_commands=:g' -e 's:${opts}:${extra_commands}:g' -e 's:$opts:$extra_commands:g' /etc/init.d/* -iStill doesn't work for some scripts, for example, sshd script uses variable "myopts" and then refers to it as ${myopts}.SlashBeast wrote:Code: Select all
sed -e 's:opts=:extra_commands=:g' -e 's:${opts}:${extra_commands}:g' -e 's:$opts:$extra_commands:g' /etc/init.d/* -i

I was going to suggest /var/db/pkgStolz wrote:Are there any other directories that are good candidates to be squashed? may be /usr/share/doc?. With "good candidates" I mean they use have a lot of small text files and use to involve lot of writes to the disk but also they are not of vital importance.
Thanks Dont Panic, I'm aware of it, the squash_dir README mentions it, but since it's dangerous to play with it and my raid disks already have some S.M.A.R.T errors I prefer to leave it aloneDont Panic wrote:I was going to suggest /var/db/pkg
However, that directory doesn't meet your criteria for "not of vital importance". Bad things will happen if the information in /var/db/pkg gets out of sync or is clobbered.
Actually, I have good experience with squashing it with keeping a backup (setting FILE_SQFS_OLD). This backup even saved my installation once when a kernel panic caused damage in /var/db.Stolz wrote:However, that directory doesn't meet your criteria for "not of vital importance".
Code: Select all
options loop max_loop=16