gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] posix: symlink broken?


From: Amar Tumballi
Subject: Re: [Gluster-devel] posix: symlink broken?
Date: Thu, 11 Oct 2012 12:09:46 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 10/11/2012 11:35 AM, M. Mohan Kumar wrote:

As part of BD xlator symlink interface testing, I figured out that the
parameter 'linkname' contains even the mount point for example
'/media/link'. I wonder we should never get the mount directory in the
server part of code.

I tested creating symlink with posix xlator with top git commit
751da4675cf3add21e567aebb92de2c10457afee.

Here is the steps I followed:

address@hidden mohan]# mount -t glusterfs host:/posix /media

address@hidden mohan]# ls -la /media/
total 8
drwx------.  3 root root 4096 Oct 11 11:15 .
dr-xr-xr-x. 20 root root 4096 Sep 28 16:40 ..

address@hidden mohan]# touch /media/file

address@hidden mohan]# ln -s /media/file /media/link

address@hidden mohan]# ls -la /media/
total 9
drwx------.  3 root root 4096 Oct 11 11:18 .
dr-xr-xr-x. 20 root root 4096 Sep 28 16:40 ..
-rw-r--r--.  1 root root    0 Oct 11 11:18 file
lrwxrwxrwx.  1 root root   11 Oct 11 11:18 link -> /media/file

address@hidden mohan]# umount /media

address@hidden mohan]# mount -t glusterfs host:/posix /media/posix

address@hidden mohan]# ls -la /media/posix/
total 9
drwx------. 3 root root 4096 Oct 11 11:18 .
drwxr-xr-x. 4 root root 4096 Oct 11 07:55 ..
-rw-r--r--. 1 root root    0 Oct 11 11:18 file
lrwxrwxrwx. 1 root root   11 Oct 11 11:18 link -> /media/file


Directory listing of brick from server side
address@hidden mohan]# ls -la ~/gl/posix/
total 24
drwx------.  3 root root 4096 Oct 11 11:18 .
drwx------.  4 root root 4096 Sep 28 20:20 ..
-rw-r--r--.  2 root root    0 Oct 11 11:18 file
drw-------. 12 root root 4096 Oct 11 11:18 .glusterfs
lrwxrwxrwx.  2 root root   11 Oct 11 11:18 link -> /media/file


Ideally it should be link -> file instead of /media/file

It the same behavior on backend fs also... I don't see it as a problem in GlusterFS.

----snip----
address@hidden data]# mount fs1 /mnt/a/
address@hidden data]# df -h /mnt/a
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      9.9G  151M  9.2G   2% /mnt/a
address@hidden data]# cd /mnt/a
address@hidden a]# echo hello > file
address@hidden a]# ln -s  /mnt/a/file abcd
address@hidden a]# ls -l
total 20
lrwxrwxrwx. 1 root root    11 Oct 11 12:05 abcd -> /mnt/a/file
-rw-r--r--. 1 root root     6 Oct 11 12:04 file
address@hidden a]# cd
address@hidden ~]# umount /mnt/a
address@hidden ~]# cd /data
address@hidden data]# mount fs1 /mnt/b
address@hidden data]# ls -l /mnt/b
total 20
lrwxrwxrwx. 1 root root    11 Oct 11 12:05 abcd -> /mnt/a/file
-rw-r--r--. 1 root root     6 Oct 11 12:04 file
address@hidden data]#

---- snip ----



When I remounted with a different directory symlink is broken. Ideally
it should not create symlink with client mount directory details or am I
missing some thing here?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]