Linux 7.1, Raid and System Calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If rename doesn't work on your box, this would not be the first issue you
had.  You would not be able to use the 'mv' command.

Jon

On Tue, 29 Jan 2002, Paul Harrington wrote:

> Hi,
> 
> If this is in the wrong place, could somebody please tell where I should
> go to ! We have a problem here which initially looked like a mysql
> problem. When trying to add an index to a table or rename a table the
> following error kept occuring:
> 
> mysql> alter table test rename as tst;
> ERROR 7: Error on rename of './testdb/test.MYI' to './testdb/tst.MYI'
> (Errcode: 2) mysql> quit
> 
> I tried this on two machines, both running Redhat 7.1 and MYSQL
> 3.23.46-log. It worked on one but not on the other. The one it failed on
> is a compaq DL 380 with hardware Raid 5. The one it worked on is my own
> intel PC. I started ploughing through the MYSQL source code and narrowed
> it down to a problem with either the rename, link or stat system calls.
> 
> I wrote my own small program to call the rename system call. When using
> it to rename a file on my intel linux system it works exactly as expected.
> On the compaq however the exact same program always fails with errno 2
> (ENOENT: A  directory component in oldpath  or  newpath does not exist or
> is a dangling symbolic link). This is not due to permissions or incorrect
> paths. The guts of my noddy program is:
> 
> #include <stdio.h>
> #include <errno.h>
> 
> main(int argc, char **argv)
> {
>   char *arg1, *arg2;
>   int err=0;
>   arg1 = argv[1];
>   arg2 = argv[2];
> 
>   printf("\nFile1: %s, File2 %s\n",arg1, arg2);
> 
>   err = rename(arg1, arg2);
>   printf("Rename rc %d, error code %d \n\n", err, errno);
>  
>   return;
>  
> }
>  
>  
> I can only conclude that the standard rename system call (and presumably
> others) does not work on my Compaq raid system. MYSQL uses similar calls
> and also does not work. 
> Now for the questions. Does anybody have any idea why other s/w such as
> Apache works on this system ? It surely must use these calls... Is thre a
> simple workaround ? Is there a way of telling linux to map system calls so
> that these will work on Raid ? Why does the 'mv' command work on the
> compaq system, what system call does it use ? Has this problem actually
> got something to do with the Raid system like I have assumed ?
>  
> Answers or pointers would be much appreciated.
>  
> Thanks Paul.
> 
> 
> 
> _______________________________________________
> Redhat-devel-list mailing list
> Redhat-devel-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> 





[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux