3 Replies Latest reply on Dec 5, 2009 9:01 PM by 621842

    Oracle AMIs too big to bundle?


      I have started an instance based on the public Oracle 11g EE 32-bit image, and created a database following the prompts. Without storing any data, I shut down the DBConsole, Listener and Oracle Instance, then try to bundle it, but get the following error:

      Copying / into the image file /mnt/image...
      1+0 records in
      1+0 records out
      1048576 bytes (1.0 MB) copied, 0.003636 seconds, 288 MB/s
      mke2fs 1.39 (29-May-2006)

      Message from syslogd@ at Sun Nov 9 05:37:01 2008 ...
      ip-10-250-6-132 kernel: journal commit I/O errorexecution failed: "rsync -rlpgoD -t -r -S -l --exclude /sys --exclude /proc --exclude /dev/pts --exclude /proc/sys/fs/binfmt_misc --exclude /dev --exclude /media --exclude /mnt --exclude /proc --exclude /sys --exclude /mnt/image --exclude /mnt/img-mnt -X /* /mnt/img-mnt 2>&1 > /dev/null"
      ec2-bundle-vol failed.

      I assume this is due to the size of the AMI, since the root drive appears to be full after this error has occurred. Has anyone else successfully bundled this image to create their own version of it?

        • 1. Re: Oracle AMIs too big to bundle?
          bill hodak - oracle
          Hello -

          The image that we supply can be rebundled, however I believe that you are running out of disk space on the root partition. In order to get around this, you will want to make sure that you have mounted one of the disk devices that Amazon supplies and then do your image bundling on that disk device since it should have plenty of free space. The name of the Amazon supplied disk device varies, but it is usually something like /dev/sdb or /dev/sda2. It is possible that you already have one of these disk devices mounted. To figure that out just issue the mount command from the operating system command line. For example, on my EC2 instance it shows:

          $ mount
          /dev/sda1 on / type ext3 (rw)
          none on /proc type proc (rw)
          none on /sys type sysfs (rw)
          none on /dev/pts type devpts (rw,gid=5,mode=620)
          none on /dev/shm type tmpfs (rw)
          */dev/sda2 on /u02 type ext3 (rw)*

          If you don't have it mounted, then you just need to mount that disk device:

          mount /dev/sda2 /u02

          If you get an error saying that the disk device needs a filesystem, then you will need to install a filesystem onto that device. Look at the man pages for mkfs

          Now you can see that this disk device has plenty of free space using df -k:

          $ df -k /u02
          Filesystem 1K-blocks Used Available Use% Mounted on
          /dev/sda2 350891748 199380 332868088 1% /u02

          Now, you can use this disk device to bundle your image using the -d option of the ec2-bundle-vol command. For example:

          ec2-bundle-vol -d /u02

          Hope this helps!

          • 2. Re: Oracle AMIs too big to bundle?
            Bill, thanks for the information. I have tried the destination flag of -d that points at /u02 without success. I continue to receive the following error:

            ERROR: execution failed: "rsync -rlpgoD -t -r -S -l --exclude /sys --exclude /proc --exclude /dev/pts --exclude /proc/sys/fs/binfmt_misc --exclude /dev/oracleasm --exclude /dev --exclude /media --exclude /mnt --exclude /proc --exclude /sys --exclude /u02/image --exclude /mnt/img-mnt -X /* /mnt/img-mnt 2>&1 > /dev/null"

            The command I'm running is:
            ec2-bundle-vol -d /u02 -k /root/.ec2/pk*.pem -c /root/.ec2/cert-*.pem -u NNNN-NNNN-NNNN -r x86_64

            It appears rsync is writing to /mnt/img-mnt and then running out of disk space on my root drive. For this I specify the -d flag to leverage /u02 which has sufficient space. For some reason I continue to receive the aforementioned error. Do you have any pointers?

            • 3. Re: Oracle AMIs too big to bundle?

              Not sure what your df -h looks like, but here's a working example.

              My disks are:
              $ df -h
              Filesystem Size Used Avail Use% Mounted on
              /dev/sda1 9.5G 2.3G 6.8G 25% /
              none 3.8G 2.3G 1.5G 61% /dev/shm
              /dev/sdf 30G 7.4G 21G 27% /u02
              /dev/sdb 414G 10G 383G 3% /u03
              /dev/sdg 20G 6.4G 13G 35% /u01

              /u01 and /u02 are EBS drives. /u03 is temporary (comes with the "large" AMI image). So, when I create my image, I want to write everything to /u03 (so root doesn't fill up), and I want to exclude u01, u02 and u03. The command that works for me is:

              ec2-bundle-vol -d /u03/bundle -k /u03/bundle/pk-*.pem -c /u03/bundle/cert-*.pem -e /u01,/u02,/u03 -u * -r x86_64

              Good luck,