Closed HenrikBengtsson closed 7 years ago
Whoa, weird! Are you running from master, or the 2.2 released version?
Thanks!
From the 2.2 release following instructions at http://singularity.lbl.gov/install-linux, i.e. not from git clone
.
Oh gosh.. I can't believe that got into the release and nobody else has made a bug report about it!..
Just to be sure, can you send me the output of this command (adding -x):
$ sudo singularity -x expand --size 2048 non-existing-file.img
Thanks!
No worries, I'm known to be a bug whisperer - it literally happens to anything I touch whenever I need to get real things done ;)
sudo singularity -x expand --size 2048 non-existing-file.img
[sudo] password for hb:
+ PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ IMAGE_SIZE=512
+ true
+ case ${1:-} in
+ shift
+ IMAGE_SIZE=2048
+ shift
+ true
+ case ${1:-} in
+ break
+ '[' -z non-existing-file.img ']'
+ '[' 0 '!=' 0 ']'
+ SINGULARITY_IMAGE=non-existing-file.img
+ SINGULARITY_WRITABLE=1
+ export SINGULARITY_IMAGE SINGULARITY_WRITABLE
+ '[' -z non-existing-file.img ']'
+ '[' '!' -f non-existing-file.img ']'
+ message ERROR 'Image file exists, not overwriting.\n'
+ LEVEL=ERROR
+ MESSAGE='Image file exists, not overwriting.\n'
+ '[' -z 'Image file exists, not overwriting.\n' ']'
+ shift
+ shift
+ case "$LEVEL" in
+ tput -Txterm setaf 1
+ printf 'ERROR: Image file exists, not overwriting.\n'
ERROR: Image file exists, not overwriting.
+ tput -Txterm sgr0
+ return 0
+ exit 1
Embarassingly enough, I don't have a GA 2.2 version installed anywhere. I can do a cleanup and reinstall soon, but the GitHub master branch does this:
$ sudo singularity expand --size 10 /tmp/Centos7-ompi.img
Expanding existing image with a size of 10MiB...
Executing image expand helper
Checking image (/sbin/mkfs.ext3)
e2fsck 1.42.9 (28-Dec-2013)
Growing file system
resize2fs 1.42.9 (28-Dec-2013)
Done.
[gmk@centos7-x64 ~]$
So, it works with an existing image file - so no problem there. It's when you specify a non-existing file. I only discovered it due to a cut'n'paste typo. So no big deal.
OHHHHHHH! That makes sense now... Fixed, thanks!
Thanks (from Caffe Strada)
Hahaha, nice!
Is the following error message the intended one:
PS. I've only been a Singularity user since a few hours but already extremely impressed. Thxs.