macOS Big Sur使用Singularity build trinityrna.sif出現(xiàn)no space left on device不能寫入問題

接續(xù)上篇,安裝好虛擬機(jī)之后

Singularity is installed in your Vagrant Ubuntu VM! Now you can use Singularity as you would normally by logging into the VM directly

Remember that the VM is running in the background because we started it via the command vagrant up. You can shut the VM down using the command vagrant halt when you no longer need it.

vagrant ssh
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-55-generic x86_64)

安裝現(xiàn)有鏡像資源

  • docker hub安裝已有的鏡像
    singularity build trinityrna.sif docker://trinityrnaseq/trinityrnaseq
  • Cloud Library安裝已有的鏡像
    singularity build ubuntu.sif library://ubuntu
    image.png

修改臨時(shí)文件存儲(chǔ)位置到非home目錄后依舊報(bào)錯(cuò)

export SINGULARITY_LOCALCACHEDIR=/fan_large/
export SINGULARITY_CACHEDIR=/fan_large/
export SINGULARITY_TMPDIR=/fan_large/
INFO:    Creating SIF file...
FATAL:   While performing build: while creating SIF: while creating container: writing data object for SIF file: copying data object file to SIF file: write /home/vagrant/fan_bin/trinityrna.sif: no space left on device
  • 此問題是由虛擬機(jī)創(chuàng)建時(shí)默認(rèn)磁盤大小是20GB,Trinity比較大,超過20GB,故而不能繼續(xù)寫入


    image.png
  • 嘗試解決方案一,增加磁盤容量,編輯Vagrantfile文件

VAGRANT_EXPERIMENTAL="disks"
config.vm.disk :disk, size: "30GB", primary: true

(該方案還是未能解決,添加環(huán)境變量方式錯(cuò)誤)

@LaBelleVie:16:12:16 ~/VirtualBox VMs/vm-singularity_default_1617687821497_7397
$ VBoxManage clonehd "packer-virtualbox-iso-1606771518-disk001.vmdk" "packer-virtualbox-iso-1606771518-disk001.vdi" --format vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vdi'. UUID: 9ad0ca94-f812-4165-8e88-95350a929855

$ ll
total 10907296
drwx------  4 lifan  staff   128B  6 Apr 16:23 Logs/
-rw-------  1 lifan  staff   2.7G  6 Apr 16:31 packer-virtualbox-iso-1606771518-disk001.vdi
-rw-------  1 lifan  staff   2.4G  6 Apr 16:23 packer-virtualbox-iso-1606771518-disk001.vmdk
-rw-------  1 lifan  staff   4.6K  6 Apr 16:31 vm-singularity_default_1617687821497_7397.vbox
-rw-------  1 lifan  staff   4.6K  6 Apr 16:28 vm-singularity_default_1617687821497_7397.vbox-prev

#擴(kuò)容到50GB
$ VBoxManage modifyhd "packer-virtualbox-iso-1606771518-disk001.vdi" --resize 51200
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
vagrant@vagrant:~/large-bin$ df
'Filesystem                   1K-blocks      Used Available Use% Mounted on
udev                            474132         0    474132   0% /dev
tmpfs                           100912       536    100376   1% /run
/dev/mapper/vagrant--vg-root  19519312   6080388  12424348  33% /
tmpfs                           504544         0    504544   0% /dev/shm
tmpfs                             5120         0      5120   0% /run/lock
tmpfs                           504544         0    504544   0% /sys/fs/cgroup
vagrant                      244810132 167773692  77036440  69% /vagrant
tmpfs                           100908         0    100908   0% /run/user/900

用方案二、三修改為50GB后,再下載trinity.sif還是未能成功,說明修改未徹底。于是換方法

反復(fù)嘗試官方正解環(huán)境變量> 官方正解修改磁盤配置文件成功解決

分為2步

  1. Vagrantfile配置文件中添加
config.vm.disk :disk, size: "50GB", primary: true
  1. 激活環(huán)境變量export VAGRANT_EXPERIMENTAL="disks"vagrant up
#激活環(huán)境變量成功
export VAGRANT_EXPERIMENTAL="disks" && \
> vagrant up
==> vagrant: You have requested to enabled the experimental flag with the following features:
==> vagrant:
==> vagrant: Features:  disks
==> vagrant:
==> vagrant: Please use with caution, as some of the features may not be fully
==> vagrant: functional yet.

成功配置磁盤為50GB后的樣子,注意還是原版的.vmdk文件,過程非常簡(jiǎn)潔


image.png
vagrant@vagrant:/fan_large$ df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                          464M     0  464M   0% /dev
tmpfs                          99M  532K   99M   1% /run
/dev/mapper/vagrant--vg-root   19G  5.8G   12G  33% /
tmpfs                         493M     0  493M   0% /dev/shm
tmpfs                         5.0M     0  5.0M   0% /run/lock
tmpfs                         493M     0  493M   0% /sys/fs/cgroup
vagrant                       234G  160G   75G  69% /vagrant
tmpfs                          99M     0   99M   0% /run/user/900

#未成功
INFO:    Creating SIF file...
FATAL:   While performing build: while creating SIF: while creating container: writing data object for SIF file: copying data object file to SIF file: write /fan_large/trinityrna.sif: no space left on device

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容