3

I have Physical Volume that is on an open-iscsi device. This device is mounted after Linux has already started writing to the log files. Can I mount a Logical Volume on that Physical Volume to /var to have Linux write to there without losing anything?

The reason for this is that I want to 'spare' my SSD from too much writing and not eating up all my memory (8GB). The mounting is not my problem since I already have some other Logical Volumes mounted after booting (I want to use one of them for storing my postgresql databases).

Does anybody have some experience on this subject? It is hard to find information since /var is almost always present.

2

You have to modify your boot order to have syslog et al start after var is mounted, which means your critical path is probably mount usr if needed to start iscsi, start iscsi, mount var, start syslog, optionally restart iscsi to log to var, resume normal boot. This is reasonably strait forward if you use sysv init. for using with upstart/systemd you would need help from someone other than me.

2
  • Thanks for the information. I will look on the Debian site how to do this. – Marco Nov 26 '13 at 7:42
  • I looked at it and I also spoke with some colleagues. In the end I decided not to go this way. I will keep the log files on the SSD. This way I always have the log directory available and will not miss any error due to the unavailability of the ISCSI drive. Another reason it that now I will stay 'standard' which makes it easier to migrate in future. – Marco Dec 11 '13 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.