On Sat, 11 Mar 2017, Udo Lembke wrote:

> On 11.03.2017 12:21, cephmailingl...@mosibi.nl wrote:
> > ...
> >
> >
> >     e) find /var/lib/ceph/ ! -uid 64045 -print0|xargs -0  chown ceph:ceph
> > ... the 'find' in step e found so much files that xargs (the shell)
> > could not handle it (too many arguments). At that time we decided to
> > keep the permissions on root in the upgrade phase.
> >
> >
> Perhaps would an "find /var/lib/ceph/ ! -uid 64045 -exec chown
> ceph:ceph" do an better job?!
Spawning a new chown process for every single file would be extremely
inefficient, and xargs was designed to handle this scenario (see the -n
option).
What I did when I faced the same problem was something like this:
cd /var/lib/ceph/osd
for i in *; do chown -R ceph:ceph $i & done

This will utilize most of the IO bw available while not wasting too much
CPU. I assumed every file should be owned by ceph. (Of course care needs
to be taken if there're other types of ceph files on the node to chown them
as well.)


Matyas


_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to