Package: mhddfs

See the following example:
1. Create to source filesystems:
   mkfs.ext2 /dev/ram1
   mkfs.ext2 /dev/ram2
   mkdir -p /mnt/1
   mkdir -p /mnt/2
   mount /dev/ram1 /mnt/1
   mount /dev/ram2 /mnt/2

2. Create a file on each disks:
   echo "FIRST DISK" >/mnt/1/first.txt
   echo "SECOND DISK" >/mnt/2/second.txt

3. Mount mhddfs:
   mkdir -p /mnt/mhddfs
   mhddfs /mnt/1,/mnt/2 /mnt/mhddfs

4. Check the previously created files:
   # cat /mnt/mhddfs/first.txt
FIRST DISK
   # cat /mnt/mhddfs/second.txt
SECOND DISK

Everything is ok so far.

5. Rename second.txt to first.txt:
   mv /mnt/mhddfs/second.txt /mnt/mhddfs/first.txt

6. Now /mnt/mhddfs/first.txt should contain:
SECOND DISK
   BUT: it contains: # cat /mnt/mhddfs/first.txt
FIRST DISK

The problem is clear if we look at the source directories:
# ls -l /mnt/1/first.txt
-rw-r--r-- 1 root root 11 2009-09-17 11:50 /mnt/1/first.txt
# ls -l /mnt/2/first.txt
-rw-r--r-- 1 root root 12 2009-09-17 11:50 /mnt/2/first.txt

The file "second.txt" was renamed to "first.txt" under /mnt/2, but
/mnt/1/first.txt was left there, and when requesting 
/mnt/mhddfs/first.txt, mhddfs finds /mnt/1/first.txt first, so we get 
the old file.


I think that when renaming, mhddfs should delete files named as the 
targetfrom all disks. That whould prevent the above bug.


-- 
pozsy



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to