On 08/02/15 16:24, sf...@users.sourceforge.net wrote: > OmegaPhil: >> omega@omega1:/mnt$ sudo umount /mnt/bulk_storage >> omega@omega1:/mnt$ sudo lsof /mnt/bulk_storage/ >> omega@omega1:/mnt$ sudo mv /mnt/bulk_storage/ /mnt/bulk-storage/ >> mv: cannot move =91/mnt/bulk_storage/=92 to =91/mnt/bulk-storage/=92: Dev= >> ice or >> resource busy > > OK, then probably you already confirmed these. > - the error was returned by rename(2) in mv(1). > - the destination /mnt/bulk-storage is not busy either. (again there are > several reasons to make it busy) > - any security modules don't bother you. > - if there are several namespaces on your system, none of them are using > these dirs.
I have attached the output of: ======================================================================= sudo strace mv /mnt/bulk_storage/ /mnt/bulk-storage ======================================================================= but basically its down to the rename failure: ======================================================================= rename("/mnt/bulk_storage/", "/mnt/bulk-storage") = -1 EBUSY (Device or resource busy) ======================================================================= The destination directory doesn't exist, so presumably can't be busy? I don't use selinux, apparmor, etc - this is a standard Debian Testing install in that respect. I'm the sole user of the machine, and naturally its sysadmin. I don't use namespaces directly, and the only virtualisation I use is VirtualBox, and no VMs are running atm - incase, I stopped the VirtualBox kernel modules from being loaded automatically (via '/etc/default/virtualbox' and 'lsmod | grep vbox') and confirmed the problem still happens. >> The suspicious refcnt is all I have to go on and currently the only >> difference I can see between being able to move the directory and not. I >> am a programmer but not a kernel programmer, so all I have to fall on is >> common sense here - if no aufs filesystems are mounted, surely there >> should be no references to the aufs module, and I should be able to >> rmmod without complaint? > > It should. > I'd suggest you to try this. > > 0. aufs is not loaded, confirm it by "lsmod" or something. > 1. "modprobe aufs", confirm its refcount is zero. > 2. unload aufs, confirm again. > 3. repeat the step 1. > 4. mount aufs, confirm its refcount is one. > 5. umount aufs, confirm its refcount is zero. > 6. unload aufs, confirm again. I've gone through this procedure - everything is fine. This is as expected as originally I said this problem only arose when the aufs volume was mounted at boot via fstab - when you do it later on everything is fine. Would you agree that me continuing the original kernel tracing at an earlier stage would be the best way to proceed? Thanks
execve("/bin/mv", ["mv", "/mnt/bulk_storage/", "/mnt/bulk-storage"], [/* 17 vars */]) = 0 brk(0) = 0x155c000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c2c000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=262349, ...}) = 0 mmap(NULL, 262349, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f79e2be0000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20c\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=142728, ...}) = 0 mmap(NULL, 2246896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e27e0000 mprotect(0x7f79e2801000, 2097152, PROT_NONE) = 0 mmap(0x7f79e2a01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f79e2a01000 mmap(0x7f79e2a03000, 6384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f79e2a03000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\37\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=35288, ...}) = 0 mmap(NULL, 2130592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e25d0000 mprotect(0x7f79e25d8000, 2093056, PROT_NONE) = 0 mmap(0x7f79e27d7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f79e27d7000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\23\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=18640, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c2b000 mmap(NULL, 2113912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e23c8000 mprotect(0x7f79e23cc000, 2093056, PROT_NONE) = 0 mmap(0x7f79e25cb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f79e25cb000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1729984, ...}) = 0 mmap(NULL, 3836448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e2018000 mprotect(0x7f79e21b7000, 2097152, PROT_NONE) = 0 mmap(0x7f79e23b7000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19f000) = 0x7f79e23b7000 mmap(0x7f79e23bd000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f79e23bd000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\27\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=448440, ...}) = 0 mmap(NULL, 2543976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e1da8000 mprotect(0x7f79e1e14000, 2097152, PROT_NONE) = 0 mmap(0x7f79e2014000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6c000) = 0x7f79e2014000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c27000 mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e1ba0000 mprotect(0x7f79e1ba3000, 2093056, PROT_NONE) = 0 mmap(0x7f79e1da2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f79e1da2000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20o\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=137440, ...}) = 0 mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f79e1980000 mprotect(0x7f79e1998000, 2093056, PROT_NONE) = 0 mmap(0x7f79e1b97000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f79e1b97000 mmap(0x7f79e1b99000, 13456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f79e1b99000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c26000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c24000 arch_prctl(ARCH_SET_FS, 0x7f79e2c24800) = 0 mprotect(0x7f79e23b7000, 16384, PROT_READ) = 0 mprotect(0x7f79e1b97000, 4096, PROT_READ) = 0 mprotect(0x7f79e1da2000, 4096, PROT_READ) = 0 mprotect(0x7f79e2014000, 4096, PROT_READ) = 0 mprotect(0x7f79e25cb000, 4096, PROT_READ) = 0 mprotect(0x7f79e27d7000, 4096, PROT_READ) = 0 mprotect(0x7f79e2a01000, 4096, PROT_READ) = 0 mprotect(0x61e000, 4096, PROT_READ) = 0 mprotect(0x7f79e2c28000, 4096, PROT_READ) = 0 munmap(0x7f79e2be0000, 262349) = 0 set_tid_address(0x7f79e2c24ad0) = 28511 set_robust_list(0x7f79e2c24ae0, 24) = 0 rt_sigaction(SIGRTMIN, {0x7f79e19869f0, [], SA_RESTORER|SA_SIGINFO, 0x7f79e198f8d0}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x7f79e1986a80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f79e198f8d0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 statfs("/sys/fs/selinux", 0x7fff5729a370) = -1 ENOENT (No such file or directory) statfs("/selinux", 0x7fff5729a370) = -1 ENOENT (No such file or directory) brk(0) = 0x155c000 brk(0x157d000) = 0x157d000 open("/proc/filesystems", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c23000 read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tr"..., 1024) = 370 read(3, "", 1024) = 0 close(3) = 0 munmap(0x7f79e2c23000, 4096) = 0 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2581904, ...}) = 0 mmap(NULL, 2581904, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f79e1708000 close(3) = 0 geteuid() = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 stat("/mnt/bulk-storage", 0x7fff5729a340) = -1 ENOENT (No such file or directory) lstat("/mnt/bulk_storage/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/mnt/bulk-storage", 0x7fff5729a010) = -1 ENOENT (No such file or directory) rename("/mnt/bulk_storage/", "/mnt/bulk-storage") = -1 EBUSY (Device or resource busy) open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2492, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f79e2c23000 read(3, "# Locale name alias data base.\n#"..., 4096) = 2492 read(3, "", 4096) = 0 close(3) = 0 munmap(0x7f79e2c23000, 4096) = 0 open("/usr/share/locale/en_GB/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/charset.alias", O_RDONLY|O_NOFOLLOW) = -1 ENOENT (No such file or directory) write(2, "mv: ", 4mv: ) = 4 write(2, "cannot move \342\200\230/mnt/bulk_storage"..., 63cannot move ‘/mnt/bulk_storage/’ to ‘/mnt/bulk-storage’) = 63 open("/usr/share/locale/en_GB/LC_MESSAGES/libc.mo", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=1474, ...}) = 0 mmap(NULL, 1474, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f79e2c20000 close(3) = 0 open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, ": Device or resource busy", 25: Device or resource busy) = 25 write(2, "\n", 1 ) = 1 lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) close(0) = 0 close(1) = 0 close(2) = 0 exit_group(1) = ? +++ exited with 1 +++
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/