Errno 28 No space availble on '/var/tmp/...' - linux

I would like to install algobox for my studies but it is impossible for me to install it or even to update my computer. I looked for it and I saw that it was probably a problem of space in my partition.
I made the command "df -h" to see what was in my score and it displayed this:
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
devtmpfs 7,8G 0 7,8G 0% /dev
tmpfs 7,8G 15M 7,8G 1% /dev/shm
tmpfs 7,8G 2,1M 7,8G 1% /run
/dev/nvme0n1p7 69G 66G 0 100% /
tmpfs 7,8G 40K 7,8G 1% /tmp
/dev/loop2 224M 224M 0 100% /var/lib/snapd/snap/code/108
/dev/loop0 999M 999M 0 100% /var/lib/snapd/snap/android-studio/123
/dev/loop1 143M 143M 0 100% /var/lib/snapd/snap/chromium/2105
/dev/loop4 115M 115M 0 100% /var/lib/snapd/snap/core/13741
/dev/nvme0n1p4 976M 247M 663M 28% /boot
/dev/loop5 63M 63M 0 100% /var/lib/snapd/snap/deezer-unofficial-player/11
/dev/nvme0n1p2 96M 46M 51M 48% /boot/efi
/dev/nvme0n1p8 114G 40G 69G 37% /home
/dev/loop7 56M 56M 0 100% /var/lib/snapd/snap/core18/2566
/dev/loop8 64M 64M 0 100% /var/lib/snapd/snap/core20/1623
/dev/loop10 347M 347M 0 100% /var/lib/snapd/snap/gnome-3-38-2004/115
/dev/loop11 176M 176M 0 100% /var/lib/snapd/snap/postman/133
/dev/loop17 151M 151M 0 100% /var/lib/snapd/snap/remmina/5379
/dev/loop18 82M 82M 0 100% /var/lib/snapd/snap/discord/143
/dev/loop19 165M 165M 0 100% /var/lib/snapd/snap/gnome-3-28-1804/161
/dev/loop21 48M 48M 0 100% /var/lib/snapd/snap/snapd/16778
/dev/loop22 92M 92M 0 100% /var/lib/snapd/snap/gtk-common-themes/1535
/dev/loop23 71M 71M 0 100% /var/lib/snapd/snap/core22/275
/dev/loop24 128K 128K 0 100% /var/lib/snapd/snap/bare/5
/dev/loop27 219M 219M 0 100% /var/lib/snapd/snap/gnome-3-34-1804/77
/dev/loop28 415M 415M 0 100% /var/lib/snapd/snap/gnome-42-2204/29
tmpfs 1,6G 88K 1,6G 1% /run/user/1000

The /var/tmp does not seem to be mounted separate from / and it looks you still have 3G free
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/nvme0n1p7 69G 66G 0 100% /
I would suggest running a "df -i" to see the inode utilization at the IUse% column(it must be under 100%) as if you have a lot of small files, each one will utilize one inode and if you are using 100% of inodes you will get the "No space left error".

Related

bash sh script with user permissions 755, cannot be run

Why can't run it?
If I run it in the following way, it works:
[usuario#MyPC ~]$ sh ./x11vnc.sh
PORT=5900
First, the permissions, so that you can see that it is in 755.
ls -l
-rw-rw-rw- 1 usuario users 4485 dic 2 11:35 x11vnc.log
-rwxr-xr-x 1 usuario users 117 nov 7 14:06 x11vnc.sh
Second,the script file
cat x11vnc.sh
#!/bin/bash
x11vnc -nap -wait 30 -noxdamage -passwd somepass -display :0 -forever -o ~/x11vnc.log -bg -rfbport 5900
Third, I must clarify the structure of the disks
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 3,6T 0 disk
├─md126 9:126 0 3,6T 0 raid1
│ ├─md126p1 259:3 0 3,6T 0 part /home/usuario
│ └─md126p2 259:4 0 8G 0 part [SWAP]
└─md127 9:127 0 0B 0 md
sdb 8:16 0 3,6T 0 disk
├─md126 9:126 0 3,6T 0 raid1
│ ├─md126p1 259:3 0 3,6T 0 part /home/usuario
│ └─md126p2 259:4 0 8G 0 part [SWAP]
└─md127 9:127 0 0B 0 md
nvme0n1 259:0 0 232,9G 0 disk
├─nvme0n1p1 259:1 0 232,6G 0 part /
└─nvme0n1p2 259:2 0 256M 0 part /boot
I am the user usuario.
I can edit and modify the x11vnc.sh file as I wish, but I can't run it, and I need to run it to include in the auto-start session of the plasma.
[usuario#MyPC ~]$ ~/x11vnc.sh
-bash: /home/usuario/x11vnc.sh: permission denied
Why can't run it?
If I run it in the following way, it works:
[usuario#MyPC ~]$ sh ./x11vnc.sh
PORT=5900
Thank you all, specially to #CharlesDuffy
I change the fstab line from
UUID=16b711b6-789f-4c27-9d6c-d0f744407f00 /home/usuario ext4 auto,exec,rw,user,relatime 0 2
to
UUID=16b711b6-789f-4c27-9d6c-d0f744407f00 /home/usuario ext4 auto,rw,user,exec,relatime 0 2
The position of exec is important, since user also applies noexec. By putting exec after user, you ensure that exec is set. The most important options should be listed last

Filter df -h to only show 'Mounted on' part

this is the normal output of df -h:
df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s2s1 932Gi 14Gi 823Gi 2% 500637 4293577168 0% /
devfs 193Ki 193Ki 0Bi 100% 673 0 100% /dev
/dev/disk1s5 932Gi 3.0Gi 823Gi 1% 3 8628536760 0% /System/Volumes/VM
/dev/disk1s3 932Gi 367Mi 823Gi 1% 1816 8628536760 0% /System/Volumes/Preboot
/dev/disk1s6 932Gi 4.0Mi 823Gi 1% 20 8628536760 0% /System/Volumes/Update
/dev/disk1s1 932Gi 90Gi 823Gi 10% 789694 8628536760 0% /System/Volumes/Data
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home
I need to filter it to have:
/
/dev
/System/Volumes/VM
/System/Volumes/Preboot
/System/Volumes/Update
/System/Volumes/Data
/System/Volumes/Data/home
So basically I need only the "mounted on" column of the command df -h.
Any idea?
df --output=target
If you need mount targets, you can also look at findmnt. It has tons of formatting options, the list you want can be done with
$ findmnt --real -O TARGET

Remove Volume Group from a re-pourpsed disk

I have this SSD that was in another Ovirt cluster that I destroyed, and now I'm trying to re-purpose this disk but can't seem to clear it. I have tried wipefs and dd but it still shows up in fdisk -l. How can I clear all lvms from this disk?
sudo fdisk -l
Disk /dev/sda: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: SAMSUNG MZ7LH3T8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mmcblk0: 58.25 GiB, 62537072640 bytes, 122142720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 61C206C7-69A3-4C51-9215-1C0B45E32661
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 788479 786432 384M Linux filesystem
/dev/mmcblk0p2 788480 1048575 260096 127M EFI System
/dev/mmcblk0p3 1048576 1050623 2048 1M BIOS boot
/dev/mmcblk0p4 1050624 122142686 121092063 57.8G Linux filesystem
[core#h2-master-01 ~]$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3.5T 0 disk
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc_tmeta 253:0 0 15.8G 0 lvm
â ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc-tpool 253:2 0 3.5T 0 lvm
â ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc 253:3 0 3.5T 1 lvm
â ââgluster_vg_sdc-gluster_lv_data 253:4 0 3.4T 0 lvm
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc_tdata 253:1 0 3.5T 0 lvm
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc-tpool 253:2 0 3.5T 0 lvm
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc 253:3 0 3.5T 1 lvm
ââgluster_vg_sdc-gluster_lv_data 253:4 0 3.4T 0 lvm
mmcblk0 179:0 0 58.2G 0 disk
ââmmcblk0p1 179:1 0 384M 0 part /boot
ââmmcblk0p2 179:2 0 127M 0 part /boot/efi
ââmmcblk0p3 179:3 0 1M 0 part
ââmmcblk0p4 179:4 0 57.8G 0 part /sysroot
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk
[core#h2-master-01 ~]$ sudo lvdisplay
[core#h2-master-01 ~]$ sudo vgdisplay
[core#h2-master-01 ~]$ sudo pvdisplay
wipefs -a /dev/sda with a reboot seemed looks to have cleared the disk. Thanks all!

CPU and HDD information

I searched but I found nothing for my problem.
I would like to have in Linux command line the information about the CPU usage and the local HDDs with formatting text like exactly as the examples below for my program.
These examples are command line outputs on MS-Windows.
I hope it is possible on Linux, too.
Thank you
wmic logicaldisk where drivetype=3 get caption,freespace,size
Caption FreeSpace Size
C: 135314194432 255953203200
D: 126288519168 128033222656
E: 336546639872 1000194015232
F: 162184503296 1000194015232
wmic cpu get loadpercentage
LoadPercentage
4
You won't find anything exactly like the output you provided.
The only option is to use for disk space df:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 73216256 27988724 41485276 41% /
devtmpfs 8170164 0 8170164 0% /dev
tmpfs 8203680 544 8203136 1% /dev/shm
tmpfs 8203680 12004 8191676 1% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 8203680 0 8203680 0% /sys/fs/cgroup
/dev/sdb1 482922 83939 374049 19% /boot
and for cpu you have many more options, e.g.
vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 11865304 149956 1474172 0 0 53 46 126 707 3 0 96 0 0
or top -b | head:
top - 21:48:43 up 54 min, 1 user, load average: 0.13, 0.17, 0.22
Tasks: 188 total, 1 running, 187 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.0 us, 0.4 sy, 0.1 ni, 96.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 16407364 total, 11848936 free, 2888844 used, 1669584 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 13230972 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 40544 6440 3780 S 0.0 0.0 0:01.15 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
There is no command that gives you a load percentage of the cpu. It's actually impossible to get that with a system call (nor in linux neither in Windows). What you can get is the number of ticks currently executed (for each field, user, system, io,irq idle)..., then call it again a certain amount of time later and calculate it. That way is how work all the commands for reading the cpu percentage.
Here a script bash that gives you that: (just create a file named for example cpu.sh paste this code and execute to see the results)
_estado()
{
cat /proc/stat | grep "cpu " | sed -e 's/ */:/g' -e 's/^cpux//'
}
_ticksconcretos()
{
echo $1 | cut -d ':' -f $2
}
while true ; do
INICIAL=$(_estado)
sleep 1
FINAL=$(_estado)
UsuarioI=$(_ticksconcretos $INICIAL 1)
UsuarioF=$(_ticksconcretos $FINAL 1)
NiceI=$(_ticksconcretos $INICIAL 2)
NiceF=$(_ticksconcretos $FINAL 2)
SistemaI=$(_ticksconcretos $INICIAL 3)
SistemaF=$(_ticksconcretos $FINAL 3)
idleI=$(_ticksconcretos $INICIAL 4)
idleF=$(_ticksconcretos $FINAL 4)
IOI=$(_ticksconcretos $INICIAL 5)
IOF=$(_ticksconcretos $FINAL 5)
IRQI=$(_ticksconcretos $INICIAL 6)
IRQF=$(_ticksconcretos $FINAL 6)
SOFTIRQI=$(_ticksconcretos $INICIAL 7)
SOFTIRQF=$(_ticksconcretos $FINAL 7)
STEALI=$(_ticksconcretos $INICIAL 8)
STEALF=$(_ticksconcretos $FINAL 8)
InactivoF=$(( $idleF + $IOF ))
InactivoI=$(( $idleI + $IOI ))
ActivoI=$(( $UsuarioI + $NiceI + $SistemaI + $IRQI + $SOFTIRQI + $STEALI ))
ActivoF=$(( $UsuarioF + $NiceF + $SistemaF + $IRQF + $SOFTIRQF + $STEALF ))
TOTALI=$(( $ActivoI + $InactivoI ))
TOTALF=$(( $ActivoF + $InactivoF ))
PORC=$(( ( ( ( $TOTALF - $TOTALI ) - ( $InactivoF - $InactivoI ) ) * 100 / ( $TOTALF - $TOTALI ) ) ))
clear
echo "CPU: $PORC %"
done
For the free space You could use something like this:
df -h -x tmpfs -x devtmpfs | awk -F " " '{print $1 " " $4 " " $2}'
wich will give you this output:
Filesystem Free Size
/dev/sda1 16G 25G
/dev/sda5 46G 79G
/dev/sdb8 130G 423G
sda represents the first disk, sda1 the first partition, sda2, the second one etc. you can add (or change) $6 inside the print to get the mount points instead of the partitions, change the order or even more things.

Buildroot does not create /dev entries for emmc on am335x custom board

I have a custom board based on am335x. I am building a buildroot for a minimal root filesystem (minimal by size) : boots off as initramfs. I am able to boot the image but unfortunately there are no /dev/mmcblk0 entry.
I would like to know how to make it create that entry.
The following is some log and data to help.
======================================================================
# ls /dev
console ram14 tty26 tty55
cpu_dma_latency ram15 tty27 tty56
full ram2 tty28 tty57
hwrng ram3 tty29 tty58
i2c-0 ram4 tty3 tty59
i2c-1 ram5 tty30 tty6
input ram6 tty31 tty60
kmem ram7 tty32 tty61
kmsg ram8 tty33 tty62
loop-control ram9 tty34 tty63
loop0 random tty35 tty7
loop1 shm tty36 tty8
loop2 tty tty37 tty9
loop3 tty0 tty38 ttyO0
loop4 tty1 tty39 ttyO1
loop5 tty10 tty4 ttyS0
loop6 tty11 tty40 ttyS1
loop7 tty12 tty41 ttyS2
mem tty13 tty42 ttyS3
network_latency tty14 tty43 ubi_ctrl
network_throughput tty15 tty44 urandom
null tty16 tty45 usbmon0
port tty17 tty46 vcs
psaux tty18 tty47 vcs1
ptmx tty19 tty48 vcsa
pts tty2 tty49 vcsa1
ram0 tty20 tty5 watchdog
ram1 tty21 tty50 watchdog0
ram10 tty22 tty51 zero
ram11 tty23 tty52
ram12 tty24 tty53
ram13 tty25 tty54
# cat /proc/partitions
major minor #blocks name# cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
89 i2c
90 mtd
128 ptm
136 pts
153 spi
166 ttyACM
180 usb
188 ttyUSB
189 usb_device
226 drm
248 ttySDIO
249 usbmon
250 ttyO
251 watchdog
252 ptp
253 pps
254 rtc
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
==================================================================
It is booting busybox and using devtmpfs which are defaults for buildroot.
If I use TI's minimalfs, it does show /dev/mmcblk0 so the kernel and device tree are ok. How to solve this.
Regards,
Preetam
You can create this node manually by mknod
mknod [OPTION]... NAME TYPE [MAJOR MINOR]
In your case type would be b (block). Major number you may find in sources or use
cat /proc/devices the minor number is a partition number.
If this is not the case, try to enable udev in buildroot config.

Resources