I was doing a mke2fs on an external 40gig hardware RAID device, and during this mke2fs I tried to run the passwd command to change a user's password. After entering the information (password twice), the passwd process would just hang indefinitely. Looking into this further, I started passwd again (removing any lock files created in /etc) and started a strace on the passwd PID. Interestingly, I see something like this: ... write(6, "root:x:0:0:root:/root:/bin/bash\n"..., 748) = 748 close(6) = 0 munmap(0x401cb000, 4096) = 0 rename("/etc/passwd+", "/etc/passwd") = 0 sync( At the sync( there is a hang and as I'm watching it now it has been like this for over an hour. During this whole time, I have a mke2fs going in another shell. It seems to me very odd that the kernel will not return from this function for so long. Any help appreciated. Viraj.
sync returns when there are no blocks unwritten. If something is generating blocks at speed then this may well happen. There is a second issue (fixed in the 2.2.16 kernel) that might be what you see where the kernel doesnt always fairly share the disk and the mke2fs can hold off the sync for a long long time. It causes no problems but the delay. The errata kernel should thus have fixed this.