2

I've been playing with Cobbler lately (on a CentOS 7 distrib), and I've gone through an error while importing a CentOS 7 iso. I've been able to find a work around to the problem, and I thought it'd be cool to share what I learnt.

Here's the issue in question:

$ sudo mount -t iso9660 -o loop,ro CentOS-7-x86_64-DVD-1503-01.iso /mnt
$ sudo cobbler import --name=centos7 --arch=x86_64 --path=/mnt
task started: 2015-05-29_144409_import
task started (id=Media import, time=Fri May 29 14:44:09 2015)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'Command failed'
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 87, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 231, in runner
    self.logger
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 892, in import_tree
    utils.run_this(rsync_cmd, (spacer, mirror_url, path), self.logger)
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 917, in run_this
    die(logger,"Command failed")
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, in die
    raise CX(msg)

!!! TASK FAILED !!!

and here is the corresponding /var/log/cobbler/cobbler.log excerpt

Fri May 29 14:44:09 2015 - DEBUG | REMOTE expiring token; user(<DIRECT>)
Fri May 29 14:44:09 2015 - DEBUG | REMOTE expiring token; user(<DIRECT>)
Fri May 29 14:44:09 2015 - DEBUG | REMOTE expiring token; user(<DIRECT>)
Fri May 29 14:44:09 2015 - DEBUG | REMOTE CLI Authorized; user(?)
Fri May 29 14:44:09 2015 - INFO | REMOTE start_task(Media import); event_id(2015-05-29_144409_import); user(?)
Fri May 29 14:44:10 2015 - INFO | import_tree; ['/mnt', 'centos7', None, None, None]
Fri May 29 14:44:10 2015 - INFO | importing from a network location, running rsync to fetch the files first
Fri May 29 14:44:10 2015 - INFO | running: rsync -a  '/mnt/' /var/www/cobbler/ks_mirror/centos7-x86_64 --progress
Fri May 29 14:44:10 2015 - INFO | received on stdout: sending incremental file list
images/pxeboot/
images/pxeboot/initrd.img
       32768   0%    0.00kB/s    0:00:00
Fri May 29 14:44:10 2015 - DEBUG | received on stderr:
rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: write failed on "/var/www/cobbler/ks_mirror/centos7-x86_64/images/pxeboot/initrd.img": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(322) [receiver=3.0.9]
rsync: connection unexpectedly closed (40 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]

Fri May 29 14:44:10 2015 - INFO | Exception occured: <class 'cobbler.cexceptions.CX'>
Fri May 29 14:44:10 2015 - INFO | Exception value: 'Command failed'
Fri May 29 14:44:10 2015 - INFO | Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
    raise CX(msg)

Line rsync: write failed on "/var/www/cobbler/ks_mirror/centos7-x86_64/images/pxeboot/initrd.img": No space left on device (28) says there's no more space on /var. I think the initrd.img file created by Cobbler is too big for my /var partition which is only 4GB.

2 Answers 2

3

Answering my own question

My filesystem is XFS, on top of LVM partitions. The best solution was to resize /var partition so that it has enough space to support the rsync operations. The thing is when I installed CentOS 7 on this machine I've allocated all the available disk space, so there was no free space to enlarge /var.

So I decided to move /var/www/cobbler on the root partition, by moving it to /usr

$ sudo mkdir -p /usr/var/www
$ sudo mv /var/www/cobbler /usr/var/www/

Then, I created a symbolic link:

$ cd /var/www
$ sudo ln -sd /usr/var/www/cobbler

Now, when performing cobbler import, rsync writes on the root partition, which has enough space to support it, and everything works fine.

0

Incomplete iso image downloads is also issue for such errors. Please ensure to do checksum check on the iso image

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .