Josh Berkus
2005-May-19 04:38 UTC
Mysterious (bogus?) rsync(d) errors -- (code 23) at main.c(1045)
Folks, (1) Please pardon me if this is something stupid, but I've googled like mad and not figured it out (the other reports of this error don't seem to apply to me) (2) I would be thrilled to hire an rsync expert to troubleshoot this for me, so offer if you are one. The setup: I have 2 identical RHAS3u4 servers, running linux 2.6.10. On a nightly basis, we are rsyncing all of the database files on both servers which are in identical file locations. The same users, with the same UIDs, exist on both servers rsyncd.conf is further down this message On trying sync'ing by both the "push" and "pull" methods (i.e. either by copying from the local directories to the other server's rscynd, or the other way), we are getting mysterious failures to rsync. The command line used is: /usr/bin/rsync --perms --owner --group --times --recursive --safe-links --delete-after server2::postgres-data /pgdata Which transfers a whole bunch of data, and then gives these failures: chown . : Operation not permitted skipping non-regular file "pgdata/base/17521/pgsql_tmp" skipping non-regular file "pgdata/pg_xlog" chown . : Operation not permitted rsync error: some files could not be transferred (code 23) at main.c(1045) I really can't figure out what could be causing this; all of the files being copied are owned by the "postgres" user. What is it trying to chown? I've turned off all database processes to prevent the files from being modified during transfer. And nothing is being logged to /var/log/messages for the error. And it appears that all files actually transferred. To make it even more mysterious, rsync works sometimes. Any help is appreciated; we're already past deadline! Rsyncd.conf -------------------- uid = nobody gid = nobody use chroot = no max connections = 4 syslog facility = local5 pid file = /var/run/rsyncd.pid [postgres-data] uid = postgres gid = dba path = /pgdata comment = whole pgdata area read only = false write only = false [postgres-log] uid = postgres gid = dba path = /wal comment = Postgresql WAL read only = false write only = false -- --Josh Josh Berkus Aglio Database Solutions San Francisco
John Van Essen
2005-May-19 05:40 UTC
Mysterious (bogus?) rsync(d) errors -- (code 23) at main.c(1045)
On Wed, 18 May 2005, Josh Berkus <josh@agliodbs.com> wrote:> > The command line used is: > /usr/bin/rsync --perms --owner --group --times --recursive --safe-links > --delete-after server2::postgres-data /pgdata > > Which transfers a whole bunch of data, and then gives these failures: > chown . : Operation not permitted > skipping non-regular file "pgdata/base/17521/pgsql_tmp" > skipping non-regular file "pgdata/pg_xlog" > chown . : Operation not permitted > rsync error: some files could not be transferred (code 23) at main.c(1045)A little more info would help. Which version of rsync are you using (on source and target)? What is the output of "ls -ld /pgdata" on both machines? I suspect that on the target it was created with non-postgres userid. What is the output of "ls -l" for the two "non-regular" files? -- John Van Essen Univ of Minn. Alumnus <vanes002@umn.edu>
Wayne Davison
2005-May-19 06:45 UTC
Mysterious (bogus?) rsync(d) errors -- (code 23) at main.c(1045)
On Wed, May 18, 2005 at 09:39:35PM -0700, Josh Berkus wrote:> skipping non-regular file "pgdata/base/17521/pgsql_tmp" > skipping non-regular file "pgdata/pg_xlog"This is because you didn't specify --links. It would be easier if you just specifed "-a" instead of --perms --owner --group --times --recursive and --links, though.> chown . : Operation not permittedThis is an attempt to set the group (when not running as root) of the base directory (you get two of them because of the post-processng directory-permissions pass). So, if the destination is "/pgdata", that is the directory with the chown problem. Perhaps your OS doesn't allow a mount point to be changed to a different group? ..wayne..