Skip to content
Advertisement

Tag: mount

Remove ext2 file with rootfs while it’s already mounted

What happens after mounting filesystem from file? Example: I have rootfs.ext2 file which is located in data directory and mounted under /mnt directory mount rootfs.ext2 /mnt After removing rootfs.ext2 I still can use files under /mnt directory, cat file, run binaries, etc. rm -f rootfs.ext2 I was thinking that rootfs.ext2 file still exists in data directory however it was deleted.

Docker bind source path does not exist even though it does

I have two ubuntu server VMs running on the same proxmox server. Both are running docker. I want to migrate one container from one of the VMs to the other. For that I need to attach a USB drive to the target VM which will be mounted inside the docker container. I mounted the drive exactly the same way in

Unable to bind mount a Windows folder in a Linux SQL Server docker image

I’m trying to run the docker image mcr.microsoft.com/mssql/server:2019-latest on a windows host. When running this command line, everything works fine: When I try to bind mount the /var/opt/mssql/data folder to access it’s content from my windows host, I get the following error: It looks like this issue: https://support.microsoft.com/en-us/help/4212960/fix-sql-server-2017-won-t-start-with-linux-container-image-on-docker Which is supposed to be fixed. But I tried with several version

C Linux Check free space in mount

When I running df -h I can see that in /dev I use 6M and the size is 40M , and Available size is 34M . How can I get this information with c code? Answer From here: Use the statvfs API: and the prototype of the statvfs is The results will be filled to the buf statvfs struct: The

Is there any way to “try umount” before actually preform umount?

There can be several mount points under management in linux. I want to umount them all or don’t umount any. Since there are cases when linux cannot umount a device (like someone is on the mount point), I want to add a function to check all mount points and see if the devices can be umounted before I actually perform

Mount entry in fstab with go

Is there a way to mount a ssh device with Go using an entry in fstab where the mount options are defined. I have been trying syscall.Mount without success. 2018/01/20 11:31:07 operation not permitted exit status 1 A user mount using the fstab entry works fine. sshfs#jeanluc@<remote IP>:/home/jeanluc /home/jeanluc/my-mnt/ursule_jeanluc fuse user,noauto,uid=1000,gid=1000,follow_symlinks,defaults 0 0 Edit: Following Marc’s advise below here is

How does `ip netns exec` command create mount namespace?

How does ip netns exec command create a mount namespace and prevent the changes from being propagated to other mount namespaces? Following is the from the man page of ip-netns: For applications that are aware of network namespaces, the convention is to look for global network configuration files first in /etc/netns/NAME/ then in /etc/. For example, if you want a

Shell Mount and check directionairy existence

Just looking for some help with my mounting shell script, wondering if anyone could advice me on how to make it check for the directory at the mount point exists and is empty, or is created by the script if it does not exist Answer Your use of grep will return any mountpoint that contains the string /myfilesystem in… e.g:

Advertisement