nfs-server won't start on readonly mounted root - nfs

Systemctl doesn`t tell specific details and lsof will not give any clue ...
/etc/fstab:
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=300m 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=50m 0 0
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0
tmpfs /var/run tmpfs defaults,noatime,nosuid,mode=0755,size=5m 0 0
tmpfs /root tmpfs defaults,noatime,nosuid,size=10m 0 0
/dev/mmcblk2p1 /boot ext2 defaults,ro 0 0
/dev/mmcblk2p2 / f2fs defaults,ro 0 0
/dev/mmcblk2p3 /mnt/data f2fs defaults,noatime,discard 0 0
any idea?
Greets ... Peedy

Check errors:
sudo systemctl status nfs-server.service
I have had these error messages:
exportfs[432]: exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 30 (Read-only file system)
exportfs[433]: exportfs: can't open /var/lib/nfs/etab.tmp for writing
These console commands helped me:
touch /tmp/.etab.lock
sudo ln -s /tmp/.etab.lock /var/lib/nfs/.etab.lock
touch /tmp/etab.tmp
sudo ln -s /tmp/etab.tmp /var/lib/nfs/etab.tmp
And restart service or system.

Related

WSL throws (6) Could not resolve host: raw.githubusercontent.com when trying to install NVM and cant ping google.com

When trying to install nvm with wsl 2 on windows 11, it throws:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com
when I try to ping google.com it errors, while ping 8.8.8.8 works!?!
you can try running this
sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf
it deletes your resolve.config file thats automatically generated when u run WSL then creates a new file and puts "nameserver 8.8.8.8", then creates a wsl.conf file and adds [network] and generateResolveConf = false to prevent auto generation of that file
you can also run
cat /etc/resolv.conf
to check the contents of the file
than
ping google.com

Which tmpsf partition is used in singularity and how can I increase it

I'm wondering how can I increase tmpfs size in singularity sif image and how it relates to tmpfs on host system. According to a post by Pawsey Centre:
Singularity has a flag for rendering containers from SIF image files ephemerally writable. --writable-tmpfs will allocate a small amount of RAM for this purpose (configured by the sys admins, by default just a bunch of MB)
On my host system I have the following tmpfs:
$ df -h | grep tmpfs
tmpfs 13G 2,9M 13G 1% /run
tmpfs 63G 84M 63G 1% /dev/shm
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 63G 0 63G 0% /sys/fs/cgroup
While inside container I have:
overlay 16M 12K 16M 1% /
...
tmpfs 63G 84M 63G 1% /dev/shm
tmpfs 16M 12K 16M 1% /.singularity.d/libs
tmpfs 13G 2.9M 13G 1% /run/nvidia-persistenced/socket
I can only write small files in my container (couple of KB, otherwise "no space error" is thrown) Which tmpfs does singularity use and why? How can I increase it?
The size of the tmpfs partition is set by the admin using the sessiondir max size config entry. It defaults to 16MB, but you can check it via sudo singularity config global --get "sessiondir max size" or check the config file directly if you don't have sufficient permissions: grep sessiondir /usr/local/etc/singularity/singularity.conf.
You can change the config value (or ask your admins to do it) to increase it to the desired size. If that's not an option, you'll need to make sure the host filesystem is mounted at locations where the data is being written. This is likely a good idea anyway if you'll be writing a lot of data. Docker also does this behind the scenes when using volumes.

Compute Engine in Google Cloud

I am trying to install tensorflow after installing anaconda in the home directory. It is giving disk storage space issue. I increased the disc storage to 30 GB and problem remains same. I am not able to change storage space allocation to different drive. With df command it is showing below:
Filesystem Size Used Avail Use% Mounted on
none 30G 23G 5.5G 81% /
tmpfs 853M 0 853M 0% /dev
tmpfs 853M 0 853M 0% /sys/fs/cgroup
/dev/sdb1 4.8G 4.4G 164M 97% /home
/dev/sda1 30G 23G 5.5G 81% /etc/ssh/keys
tmpfs 171M 636K 170M 1% /google/host/var/run
shm 64M 0 64M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /google/host/var/run/lock
tmpfs 341M 1.2M 340M 1% /google/host/var/run/shm
tmpfs 853M 0 853M 0% /run/google/devshell
I am not sure why below space is occupied.
"/dev/sda1 30G 23G 5.5G 81% /etc/ssh/keys"
is using 23 GB.
It is giving storage space during installation. Request you to suggest how make the space free and available as I have not installed any other application.
Ideally it should not happen, see if restart works. BTW how much was the size before?

change a lib file to to another location centos 7

I'm using centos7 , and I'm a newbie
I' have installed arangodb rpm creating the repo at /yum.repos.d/ in root .
and arangodb3 is installed in /var/lib/arangodb3 location
this directory is used and I have another directory /home where there is space left .
how can I switch it to the free directory .
running df - h I get :
[root#cloudera-manager log]# df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/mapper/centos-root 50G 50G 20K 100% /
devtmpfs 7,8G 0 7,8G 0% /dev
tmpfs 7,8G 0 7,8G 0% /dev/shm
tmpfs 7,8G 33M 7,8G 1% /run
tmpfs 7,8G 0 7,8G 0% /sys/fs/cgroup
/dev/sda1 497M 218M 280M 44% /boot
/dev/mapper/centos-home 442G 14G 429G 3% /home
tmpfs 1,6G 0 1,6G 0% /run/user/0
tmpfs 1,6G 0 1,6G 0% /run/user/994
cm_processes 7,8G 0 7,8G 0% /run/cloudera-scm-agent/process
[root#cloudera-manager log]#
I want to move it to another location / home
The arangodb rpm installs under /etc, /usr/bin, /usr/bin, /usr/share, /var/lib, /var/log, /var/run. Based on your df output, all of these would map to your root partition. So it would be difficult to relocate this package elsewhere. (see https://unix.stackexchange.com/questions/323532/yum-install-package-name-to-different-directory)
A better idea might be to measure your disk usage and relocate your biggest users of disk space to /home. For example, /var/log which has logfiles usually takes up a lot of space.
Two commands that will help are du and find.
The du -s will show the largest directories.
# du -s /*/* | sort -n
The find command will show files larger than 10MB.
# find / -size +10M

mount lacie 2T on debian server

I have a server (OS debian), and to increase the disk capacities I wanted to plugin a LaCie disk (2T). Obviously debian didn't mount it automatically (like ubuntu does) which is not funny :). When I run df -h I got:
Sys. fich. Taille Util. Dispo Uti% Monté sur
rootfs 455G 7,6G 424G 2% /
udev 10M 0 10M 0% /dev
tmpfs 200M 776K 200M 1% /run
/dev/disk/by-uuid/2ae485ac-17db-4e86-8a47-2aca5aa6de28 455G 7,6G 424G 2% /
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 1,2G 72K 1,2G 1% /run/shm
As you can see, there isn't any 2T or 1,xT -> so the disk isn't mounted.
I looked at almost same problems on goole to see what others did to fix this, I figured out that I had to run cat /etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=2ae485ac-17db-4e86-8a47-2aca5aa6de28 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=c1759574-4b7c-428b-8427-22d3a420c9e4 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
And the my LaCie does not show up in this file either.
How can I mount my USB disk in this case?
df -h only shows mounted devices
Which type filesystem are you using ? If ntfs you fisrt need to install ntfs-3g (which is provided by ubuntu in basic install but not in debian)
You can try to mount your device with the command mount -t <fs-type> /dev/<sdxx> </mount/point>