Discussion:
[ceph-users] move directories in cephfs
Jack
2018-12-10 14:14:17 UTC
Permalink
Having the / mounted somewhere, you can simply "mv" directories around
Hi,
Is there a way I can move sub-directories outside the directory.
For instance, a directory /parent contains 3 sub-directories
/parent/a, /parent/b, /parent/c. All these directories have huge
data in it. I'm gonna move /parent/b to /b. I don't want to copy
the whole directory outside cause it will be so slow.
Besides, I heard about cephfs-shell early today. I'm wondering
which version will ceph have this command tool. My cluster is
luminous 12.2.5.
Thanks
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Marc Roos
2018-12-10 15:55:54 UTC
Permalink
Except if you have different pools on these directories. Then the data
is not moved(copied), which I think should be done. This should be
changed, because no one will expect a symlink to the old pool.




-----Original Message-----
From: Jack [mailto:***@jack.fr.eu.org]
Sent: 10 December 2018 15:14
To: ceph-***@lists.ceph.com
Subject: Re: [ceph-users] move directories in cephfs

Having the / mounted somewhere, you can simply "mv" directories around
Hi,
Is there a way I can move sub-directories outside the directory.
For instance, a directory /parent contains 3 sub-directories
/parent/a, /parent/b, /parent/c. All these directories have huge data
in it. I'm gonna move /parent/b to /b. I don't want to copy the whole
directory outside cause it will be so slow.
Besides, I heard about cephfs-shell early today. I'm wondering which
version will ceph have this command tool. My cluster is luminous
12.2.5.
Thanks
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Andras Pataki
2018-12-10 23:34:24 UTC
Permalink
Moving data between pools when a file is moved to a different directory
is most likely problematic - for example an inode can be hard linked to
two different directories that are in two different pools - then what
happens to the file?  Unix/posix semantics don't really specify a parent
directory to a regular file.

That being said - it would be really nice if there were a way to move an
inode from one pool to another transparently (with some explicit
command).  Perhaps locking the inode up for the duration of the move,
and releasing it when the move is complete (so that clients that have
the file open don't notice any disruptions).  Are there any plans in
this direction?

Andras
Post by Marc Roos
Except if you have different pools on these directories. Then the data
is not moved(copied), which I think should be done. This should be
changed, because no one will expect a symlink to the old pool.
-----Original Message-----
Sent: 10 December 2018 15:14
Subject: Re: [ceph-users] move directories in cephfs
Having the / mounted somewhere, you can simply "mv" directories around
Hi,
Is there a way I can move sub-directories outside the directory.
For instance, a directory /parent contains 3 sub-directories
/parent/a, /parent/b, /parent/c. All these directories have huge data
in it. I'm gonna move /parent/b to /b. I don't want to copy the whole
directory outside cause it will be so slow.
Besides, I heard about cephfs-shell early today. I'm wondering which
version will ceph have this command tool. My cluster is luminous
12.2.5.
Thanks
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Zhenshi Zhou
2018-12-10 18:33:34 UTC
Permalink
Hi Marc,

Actually, all the directories are in the same pool, cephfs_data. Does
the "mv" operation take effect

Thanks
Post by Marc Roos
Except if you have different pools on these directories. Then the data
is not moved(copied), which I think should be done. This should be
changed, because no one will expect a symlink to the old pool.
-----Original Message-----
Sent: 10 December 2018 15:14
Subject: Re: [ceph-users] move directories in cephfs
Having the / mounted somewhere, you can simply "mv" directories around
Hi,
Is there a way I can move sub-directories outside the directory.
For instance, a directory /parent contains 3 sub-directories
/parent/a, /parent/b, /parent/c. All these directories have huge data
in it. I'm gonna move /parent/b to /b. I don't want to copy the whole
directory outside cause it will be so slow.
Besides, I heard about cephfs-shell early today. I'm wondering which
version will ceph have this command tool. My cluster is luminous
12.2.5.
Thanks
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Zhenshi Zhou
2018-12-10 15:12:57 UTC
Permalink
Hi Jack,

That means I simply execute "mv" operation on the client side
and modify the auth permission on the server side. Just like a
"mv" on normal filesystem, only the metadata(inode) changed?

I will give it a try, thanks! :)
Post by Jack
Having the / mounted somewhere, you can simply "mv" directories around
Hi,
Is there a way I can move sub-directories outside the directory.
For instance, a directory /parent contains 3 sub-directories
/parent/a, /parent/b, /parent/c. All these directories have huge
data in it. I'm gonna move /parent/b to /b. I don't want to copy
the whole directory outside cause it will be so slow.
Besides, I heard about cephfs-shell early today. I'm wondering
which version will ceph have this command tool. My cluster is
luminous 12.2.5.
Thanks
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Loading...