Package com.ceph.rbd

Examples of com.ceph.rbd.Rbd.create()


                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);

                r.ioCtxDestroy(io);
            } catch (RadosException e) {
                throw new CloudRuntimeException(e.toString());
            } catch (RbdException e) {
View Full Code Here


                            if (srcImage.isOldFormat()) {
                                /* The source image is RBD format 1, we have to do a regular copy */
                                s_logger.debug("The source image " + srcPool.getSourceDir() + "/" + template.getName()
                                               + " is RBD format 1. We have to perform a regular copy (" + template.getVirtualSize() + " bytes)");

                                rbd.create(disk.getName(), template.getVirtualSize(), this.rbdFeatures, this.rbdOrder);
                                RbdImage destImage = rbd.open(disk.getName());

                                s_logger.debug("Starting to copy " + srcImage.getName() " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                                rbd.copy(srcImage, destImage);

View Full Code Here

                            IoCTX dIO = rDest.ioCtxCreate(destPool.getSourceDir());
                            Rbd dRbd = new Rbd(dIO);

                            s_logger.debug("Creating " + disk.getName() + " on the destination cluster " + rDest.confGet("mon_host")
                                           + " in pool " + destPool.getSourceDir());
                            dRbd.create(disk.getName(), template.getVirtualSize(), this.rbdFeatures, this.rbdOrder);

                            RbdImage srcImage = sRbd.open(template.getName());
                            RbdImage destImage = dRbd.open(disk.getName());

                            s_logger.debug("Copying " + template.getName() + " from Ceph cluster " + rSrc.confGet("mon_host") + " to " + disk.getName()
View Full Code Here

                IoCTX io = r.ioCtxCreate(destPool.getSourceDir());
                Rbd rbd = new Rbd(io);

                s_logger.debug("Creating RBD image " + name + " in Ceph pool " + destPool.getSourceDir() + " with RBD format 2");
                rbd.create(name, disk.getVirtualSize(), this.rbdFeatures, this.rbdOrder);

                RbdImage image = rbd.open(name);

                File fh = new File(sourceFile);
                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fh));
View Full Code Here

                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);

                r.ioCtxDestroy(io);
            } catch (RadosException e) {
                throw new CloudRuntimeException(e.toString());
            } catch (RbdException e) {
View Full Code Here

                            if (srcImage.isOldFormat()) {
                                /* The source image is RBD format 1, we have to do a regular copy */
                                s_logger.debug("The source image " + srcPool.getSourceDir() + "/" + template.getName()
                                               + " is RBD format 1. We have to perform a regular copy (" + template.getVirtualSize() + " bytes)");

                                rbd.create(disk.getName(), template.getVirtualSize(), this.rbdFeatures, this.rbdOrder);
                                RbdImage destImage = rbd.open(disk.getName());

                                s_logger.debug("Starting to copy " + srcImage.getName() " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                                rbd.copy(srcImage, destImage);

View Full Code Here

                            IoCTX dIO = rDest.ioCtxCreate(destPool.getSourceDir());
                            Rbd dRbd = new Rbd(dIO);

                            s_logger.debug("Creating " + disk.getName() + " on the destination cluster " + rDest.confGet("mon_host")
                                           + " in pool " + destPool.getSourceDir());
                            dRbd.create(disk.getName(), template.getVirtualSize(), this.rbdFeatures, this.rbdOrder);

                            RbdImage srcImage = sRbd.open(template.getName());
                            RbdImage destImage = dRbd.open(disk.getName());

                            s_logger.debug("Copying " + template.getName() + " from Ceph cluster " + rSrc.confGet("mon_host") + " to " + disk.getName()
View Full Code Here

                IoCTX io = r.ioCtxCreate(destPool.getSourceDir());
                Rbd rbd = new Rbd(io);

                s_logger.debug("Creating RBD image " + name + " in Ceph pool " + destPool.getSourceDir() + " with RBD format 2");
                rbd.create(name, disk.getVirtualSize(), this.rbdFeatures, this.rbdOrder);

                RbdImage image = rbd.open(name);

                File fh = new File(sourceFile);
                BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fh));
View Full Code Here

                            if (srcImage.isOldFormat()) {
                                /* The source image is RBD format 1, we have to do a regular copy */
                                s_logger.debug("The source image " + srcPool.getSourceDir() + "/" + template.getName() +
                                        " is RBD format 1. We have to perform a regular copy (" + disk.getVirtualSize() + " bytes)");

                                rbd.create(disk.getName(), disk.getVirtualSize(), rbdFeatures, rbdOrder);
                                RbdImage destImage = rbd.open(disk.getName());

                                s_logger.debug("Starting to copy " + srcImage.getName() + " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                                rbd.copy(srcImage, destImage);

View Full Code Here

                            IoCTX dIO = rDest.ioCtxCreate(destPool.getSourceDir());
                            Rbd dRbd = new Rbd(dIO);

                            s_logger.debug("Creating " + disk.getName() + " on the destination cluster " + rDest.confGet("mon_host") + " in pool " +
                                    destPool.getSourceDir());
                            dRbd.create(disk.getName(), disk.getVirtualSize(), rbdFeatures, rbdOrder);

                            RbdImage srcImage = sRbd.open(template.getName());
                            RbdImage destImage = dRbd.open(disk.getName());

                            s_logger.debug("Copying " + template.getName() + " from Ceph cluster " + rSrc.confGet("mon_host") + " to " + disk.getName() + " on cluster " +
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.