Package com.ceph.rados

Examples of com.ceph.rados.Rados.connect()


            if (primaryPool.getType() == StoragePoolType.RBD) {
                try {
                    Rados r = new Rados(primaryPool.getAuthUserName());
                    r.confSet("mon_host", primaryPool.getSourceHost() + ":" + primaryPool.getSourcePort());
                    r.confSet("key", primaryPool.getAuthSecret());
                    r.connect();
                    s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                    IoCTX io = r.ioCtxCreate(primaryPool.getSourceDir());
                    Rbd rbd = new Rbd(io);
                    RbdImage image = rbd.open(snapshotDisk.getName(), snapshotName);
View Full Code Here


                if (primaryPool.getType() == StoragePoolType.RBD) {
                    try {
                        Rados r = new Rados(primaryPool.getAuthUserName());
                        r.confSet("mon_host", primaryPool.getSourceHost() + ":" + primaryPool.getSourcePort());
                        r.confSet("key", primaryPool.getAuthSecret());
                        r.connect();
                        s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                        IoCTX io = r.ioCtxCreate(primaryPool.getSourceDir());
                        Rbd rbd = new Rbd(io);
                        RbdImage image = rbd.open(disk.getName());
View Full Code Here

                s_logger.info("Creating RBD image " + pool.getSourceDir() + "/" + name + " with size " + size);

                Rados r = new Rados(pool.getAuthUserName());
                r.confSet("mon_host", pool.getSourceHost() + ":" + pool.getSourcePort());
                r.confSet("key", pool.getAuthSecret());
                r.connect();
                s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                IoCTX io = r.ioCtxCreate(pool.getSourceDir());
                Rbd rbd = new Rbd(io);
                rbd.create(name, size, this.rbdFeatures, this.rbdOrder);
View Full Code Here

                               + pool.getSourcePort() + "/" + uuid + " prior to removing the image");

                Rados r = new Rados(pool.getAuthUserName());
                r.confSet("mon_host", pool.getSourceHost() + ":" + pool.getSourcePort());
                r.confSet("key", pool.getAuthSecret());
                r.connect();
                s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                IoCTX io = r.ioCtxCreate(pool.getSourceDir());
                Rbd rbd = new Rbd(io);
                RbdImage image = rbd.open(uuid);
View Full Code Here

                            s_logger.debug("Trying to perform a RBD clone (layering) since we are operating in the same storage pool");

                            Rados r = new Rados(srcPool.getAuthUserName());
                            r.confSet("mon_host", srcPool.getSourceHost() + ":" + srcPool.getSourcePort());
                            r.confSet("key", srcPool.getAuthSecret());
                            r.connect();
                            s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                            IoCTX io = r.ioCtxCreate(srcPool.getSourceDir());
                            Rbd rbd = new Rbd(io);
                            RbdImage srcImage = rbd.open(template.getName());
View Full Code Here

                            s_logger.debug("Both the source and destination are RBD, but not the same Ceph cluster. Performing a copy");

                            Rados rSrc = new Rados(srcPool.getAuthUserName());
                            rSrc.confSet("mon_host", srcPool.getSourceHost() + ":" + srcPool.getSourcePort());
                            rSrc.confSet("key", srcPool.getAuthSecret());
                            rSrc.connect();
                            s_logger.debug("Succesfully connected to source Ceph cluster at " + rSrc.confGet("mon_host"));

                            Rados rDest = new Rados(destPool.getAuthUserName());
                            rDest.confSet("mon_host", destPool.getSourceHost() + ":" + destPool.getSourcePort());
                            rDest.confSet("key", destPool.getAuthSecret());
View Full Code Here

                            s_logger.debug("Succesfully connected to source Ceph cluster at " + rSrc.confGet("mon_host"));

                            Rados rDest = new Rados(destPool.getAuthUserName());
                            rDest.confSet("mon_host", destPool.getSourceHost() + ":" + destPool.getSourcePort());
                            rDest.confSet("key", destPool.getAuthSecret());
                            rDest.connect();
                            s_logger.debug("Succesfully connected to source Ceph cluster at " + rDest.confGet("mon_host"));

                            IoCTX sIO = rSrc.ioCtxCreate(srcPool.getSourceDir());
                            Rbd sRbd = new Rbd(sIO);
View Full Code Here

                // We now convert the temporary file to a RBD image with format 2
                Rados r = new Rados(destPool.getAuthUserName());
                r.confSet("mon_host", destPool.getSourceHost() + ":" + destPool.getSourcePort());
                r.confSet("key", destPool.getAuthSecret());
                r.connect();
                s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                IoCTX io = r.ioCtxCreate(destPool.getSourceDir());
                Rbd rbd = new Rbd(io);
View Full Code Here

            if (pool.getType() == StoragePoolType.RBD) {
                try {
                    Rados r = new Rados(pool.getAuthUserName());
                    r.confSet("mon_host", pool.getSourceHost() + ":" + pool.getSourcePort());
                    r.confSet("key", pool.getAuthSecret());
                    r.connect();
                    s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                    IoCTX io = r.ioCtxCreate(pool.getSourceDir());
                    Rbd rbd = new Rbd(io);
                    RbdImage image = rbd.open(vol.getName());
View Full Code Here

                if (primaryPool.getType() == StoragePoolType.RBD) {
                    try {
                        Rados r = new Rados(primaryPool.getAuthUserName());
                        r.confSet("mon_host", primaryPool.getSourceHost() + ":" + primaryPool.getSourcePort());
                        r.confSet("key", primaryPool.getAuthSecret());
                        r.connect();
                        s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));

                        IoCTX io = r.ioCtxCreate(primaryPool.getSourceDir());
                        Rbd rbd = new Rbd(io);
                        RbdImage image = rbd.open(disk.getName());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.