简体   繁体   中英

Increasing Amazon Linux 2 AMI /tmp size

I'm trying to install tensorflow on a Amazon linux AMI EC2 micro instance, but I keep getting EnvironmentError: [Errno 28] No space left on device even while the disk is empty.
On ubuntu server, I fix this increasing the /tmp size with the command sudo mount -o remount,size=4G,noatime /tmp , however this command fails on Amazon Linux telling me that /tmp is not mounted at all.
How can I increase /tmp size on Amazon Linux 2?

Thx!

Following can help in achieving the tmp space.

cd                              # change to your home directory    
fallocate -l 20G mydrive.img    # create the virtual drive file
mkfs -t ext3 mydrive.img        # format the virtual drive
sudo umount /tmp                # unmount the /tmp
sudo mount -t auto -o loop mydrive.img /tmp   # mount the virtual drive

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM