On 11/07/14 at 06:08am, Prarit Bhargava wrote:
On 11/06/2014 10:19 PM, Minfei Huang wrote:
On 11/07/14 at 10:48am, WANG Chao wrote:
On 11/06/14 at 08:21pm, Prarit Bhargava wrote:
Add a latest soft link for local dumps, and a user configurable option for other cases. This makes things easier when going through $path to find the latest kdump.
How about making it as default feature. I mean remove the user configurable option and provide a "latest" softlink always.
I know this sounds too much, but I'd like to hear from others.
Thanks WANG Chao
Like the function of time-machine on OS X.
If you want to backup machine, the lastest soft link always links the lastest backup file. It is so convenience to find the lastest one.
I mentioned this feature to vgoyal the other day. He brought up the valid case that someone may have a large number of systems and is dumping all of them to a single location via nfs or ssh. "latest" then becomes confusing. So he thinks this should only be done on local dumps.
I agree that it simplifies the code to remove the user config, and that user config options tend to be buried and unused.
Perhaps a happy medium is to do (sorry for the cut-and-paste):
- if [ "$HOST_IP" == "127.0.0.1" ] ; then
echo "kdump: creating link to latest"
rm -f $_mp/$KDUMP_PATH/latest
ln -sf $KDUMP_PATH/$HOST_IP-$DATEDIR $_mp/$KDUMP_PATH/latest
- else
echo "kdump: creating link to $HOST_IP-latest"
rm -f $_mp/$KDUMP_PATH/$HOST_IP-latest
ln -sf $KDUMP_PATH/$HOST_IP-$DATEDIR $_mp/$KDUMP_PATH/$HOST_IP-latest
- fi
If the dump target is dedicated ssh/nfs server and it's configured to be the dump target for many (say hundreds of) systems, there will be a lot of "latest" directories with different host-ip prefix there. I think that's kind of annoying. So I'll go with Vivek.
I'd like to keep this feature simple and clear. And that is just creating "latest" for local dumps. How about naming the latest - "latest-localhost" or something like that? Thoughts?
Thanks WANG Chao
and remove the config option?
That'll work for me.
Thanks WANG Chao