Hi,
I'm trying to use unionctl to add a branch to a union but it fails with 'inappropriate ioctl for device':
# cd /
# mkdir union branch1 branch2
# mount -t unionfs -o dirs=/branch1=rw unionfs /union
# unionctl /union --list
/branch1 (rw-)
# unionctl /union --add --after 0 /branch2
Failed to add /branch2 into /union: Inappropriate ioctl for device#
When I use the mount command to create a union with the two branches it works.
I'm using unionfs 1.1.5 on a centos 4.3 (~=RH enterprise 4.3) machine with kernel 2.6.9-34. I had to remove 1 line from unionfs.h to get it compiled (redeclaration of gfp_t which is already defined in include/linux/gfp.h) but I don't think that's related (is it?).
I found 1 reference for this error message on the list but that involved the problem after using pivot_root and not the basic usage shown above. Anyone knows what wrong?
Below is some strace output.
Thanks,
Wilfred.
# strace unionctl /union --add --after 0 /branch2
execve("/sbin/unionctl", ["unionctl", "/union", "--add", "--after", "0", "/branch2"], [/* 21 vars */]) = 0
uname({sys="Linux", node="testmachine", ...}) = 0
brk(0) = 0x943f000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=15162, ...}) = 0
old_mmap(NULL, 15162, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0a000
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20oJ\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1454546, ...}) = 0
old_mmap(0x492000, 1219772, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x492000
old_mmap(0x5b6000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x124000) = 0x5b6000
old_mmap(0x5ba000, 7356, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x5ba000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f09000
mprotect(0x5b6000, 4096, PROT_READ) = 0
mprotect(0x48e000, 4096, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f098e0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7f0a000, 15162) = 0
lstat64("/union", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/union", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
brk(0) = 0x943f000
brk(0x9460000) = 0x9460000
open("/proc/mounts", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f0d000
read(3, "rootfs / rootfs rw 0 0\n/proc /pr"..., 1024) = 446
read(3, "", 1024) = 0
close(3) = 0
munmap(0xb7f0d000, 4096) = 0
open("/union", O_RDONLY) = 3
lstat64("/branch2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
ioctl(3, 0x4004150c, 0xbffb7750) = -1 ENOTTY (Inappropriate ioctl for device)
write(2, "Failed to add /branch2 into /uni"..., 66Failed to add /branch2 into /union: Inappropriate ioctl for device) = 66
exit_group(1) = ?
Disclaimer ************************************************************************ Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te informeren. Wij adviseren u om bij twijfel over de juistheid of de volledigheid van de mail contact met afzender op te nemen. This message shall not constitute any rights or obligations. This message is intended solely for the addressee. If you have received this message in error, please delete it and notify the sender immediately. When in doubt whether this message is correct or complete, please contact the sender. ************************************************************************
_______________________________________________ unionfs mailing list [email protected] http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
