Questions tagged [bind-mount]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
104 views

Why are these mounts needed before updating initramfs?

After reading this answer on bind mount, I got the idea that a bind-mount in Linux is to reproduce part or an entire filesystem under another point in the directory tree. So when we write the ...
1
vote
1answer
1k views

Bind USB drive to home directory on demand

I was trying to attach specific USB drive to home folder of the user. I have installed vsftpd, but Kodi can't move on upper hierarchy. So he can't access /media folder, but FileZilla can. My USB is ...
1
vote
1answer
293 views

find: fts_read: Permission denied through mount_nullfs

I have the following set-up: FreeBSD 10.3 with ZFS on root. A ZFS volume hierarchy (multiple volumes nested in each other, for lack of a better name) is duplicated using mount_nullfs in order to ...
1
vote
1answer
99 views

migrating to systemd a startup-shutdown script that works with tmpfs and bindmounts

BACKGROUND INFORMATION : I have an init script that allows me to mount a folder to tmpfs, while bind-mounting the folder on drive to another location, so I can sync the contents (on startup, shutdown,...
1
vote
1answer
1k views

How to hide original mount points with bind mount?

I use OpenMediaVault, a NAS software on top of Debian Wheezy. This system usually mounts the file systems at /media/, but that is cumbersome to type and to identify. As such, I've modified my fstab ...
1
vote
2answers
5k views

How to use bindfs to create a shared folder between a chroot environment and its host

I want to use bindfs (or any viable alternative) to solve the following problem: I have a local folder that contains a maven project I am working on. However I can only build in a chroot environment (...
1
vote
0answers
47 views

Bind mounts within bind mounts

I am trying to bind mount one file over another file, then remove the file that is now hidden from access. I'm trying to go about this as follows: folder1# echo a > a folder1# echo b > b ...
1
vote
0answers
66 views

What exactly happens behind a bind mount? (Linux 4.x)

From the answer to What is a bind mount?, It is possible to unmount /some/where, in which case /else/where remains mounted. I checked the output of mount after performing a bind mount. The ...
1
vote
1answer
35 views

How to See Bound Folders and Release Them

This morning I noticed someone had stuck a USB Drive in the back of the server. (I'll have to end that practice later). For some reason CentOS 7 mounted that disk /dev/sdc1 under /run/media//. I also ...
1
vote
1answer
325 views

How to tell systemd to create a bind mount when plugging in an automounted drive?

I have the following mount and automount units enabled for my external USB drive. Mount Unit: [Unit] Description=Time Machine Drive Mount Service [Mount] What=/dev/disk/by-uuid/some-uuid Where=/...
1
vote
0answers
46 views

Multiple network shares to single mount point?

How would I mount multiple network shares to single mount point? Example //10.50.154.6/data 42T 22T 21T 51% /mnt/data6 //10.50.154.7/data 8.1T 6.2T 1.9T 77% /mnt/data7 //10.50.154.8/...
1
vote
0answers
74 views

Making root being bind mounted

I have XUbuntu and Arch on a laptop, I'm sharing /boot partition between these distros mounting it on /mnt/boot and bind-mounting /mnt/boot/xubuntu or /mnt/boot/arch onto /boot; it works fine even ...
1
vote
0answers
316 views

Debian install, mounting /var /tmp /home in the same partition

I'm making a new Debian install. I have a SSD and an HDD. My idea was to put /home, /var and /tmp on the same partition in the HDD, and the rest (/) in a tiny partition in the SSD. I followed this ...
1
vote
0answers
206 views

Is NFS file locking destroyed by the nfs server bind-mounting the directory being nfs shared?

I have a directory /persistent/pacmanPkgCache which is both: nfs-shared to other machines bind-mounted to /var/cache/pacman/pkg Does having this directory nfs-shared and bind-mounted at the same ...
1
vote
0answers
329 views

Linux shared mount point inconsistent between child and parent processes

Let me try to explain the background: In main bash: We use mount --bind /tmp/source /tmp/target mount --make-shared /tmp/target to create this shared mount point target And then we use unshare -...
1
vote
1answer
284 views

Recursively unmount Bind mount in both User and Mount namespace

I am trying to use recursive bind mount in a new user namespace and mount namespace. This is what I do. Assume /foo/bar/ and /foo are both mount points. Firstly I do mount --rbind /foo/bar/ /baz, and ...
0
votes
1answer
15k views

Editing /etc/fstab to permanently bind mount directory

I wish to make the following mount permanent: [michael@devserver ~]$ findmnt | grep public └─/home/jail/home/public/repo /dev/mapper/centos-root[/home/michael/testing/gateway/repo] xfs ...
0
votes
2answers
119 views

Making a bind-mount take effect only in the context of the current process and its descendants

I have 2 files: /MyDir/a and /MyDir/MySubDir/b and am running a bash script, to which I want to add code to make file /a point to file /b, but only in the current process and its descendants. In ...
0
votes
1answer
560 views

How to create a mount --bind when root does not have permission to access the source directory?

While trying to create a test environment using mount --bind I was surprised to find that it sometimes fails with permissions errors because root cannot access the source directory. This only appears ...
0
votes
1answer
635 views

How to mount multiple folders which share the same path pattern?

I have multiple folders that share the same path pattern which I would like to mount them all with a single command if possible. The command I tried is: sudo mount --bind /var/my/vendor /var/www/...
0
votes
1answer
521 views

How to unmount a recursive bind mount - safely [duplicate]

Please take care that you have no unsaved work if you test this. I ran this command as an experiment, but how can I undo it without rebooting? # mount --rbind / /mnt What I have tried # umount /...
0
votes
1answer
171 views

`umount -R` on bind mounts takes a non-neglible amount of time, why?

Why does umount -R take 0.2s to unmount this subtree of bind mounts? It only took 0.02s to mount the subtree, and 0.00s to change its propagation flags. (I was looking at cloning the current set of ...
0
votes
0answers
22 views

Creating bind mounts at Linux installation time

Generally, when we install a Linux distro (I'll use Ubuntu-like distro as an example, but can be any distro), we define partitions and mount points that will be applied to a disk, after we click on "...
0
votes
0answers
24 views

Data partition and IntelliJ IDEA external file sync speed

I recently reconfigured the filesystem on my laptop so I can share my data with a second Linux. The Linux used in this matter is Fedora 28, 64-bit. My disks are now laid out like so: /dev/sda: /dev/...
0
votes
1answer
228 views

Mounting using alternate fstab file

I need to use an alternative fstab file for mounting a folder in another folder, like the command mount --bind /folder1 /folder2 I tried the command mount --fstab /pathToFile.fstab as stated in ...
0
votes
2answers
61 views

Calculating directory size without subdirectories bind-mounted from the same device

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using mount -B/--bind) when I use du -hks the returned size ...
0
votes
1answer
105 views

Lazy unmount root jail drives

I have created a root jail containing rpm and yum (centos 7.5) to install some software on the original system. Workflow Mount sys, proc, dev to the root jail Mount root of the original system "/" ...
0
votes
0answers
166 views

How do I mount a file on top of a broken symbolic link?

In preparation of a chroot I'm doing an mount --bind /etc/resolv.conf ${MOUNTPOINT}/etc/resolv.conf. I need this because the ${MOUNTPOINT} contains a broken etc/resolv.conf. However, mount is ...
0
votes
0answers
276 views

how could the df command show the right mounts?

Under redhat 7, given this fstab where a "bind mount" across file systems is defined: /dev/mapper/datab_vg-lv_db /appli/postgres xfs defaults 0 0 /appli/postgres/var /var/...
0
votes
2answers
41 views

Bind mounted /var to /raid5/var and CentOS fails to boot

System Background: I am running CentOS 7 in a VM (in VirtualBox) on a host computer running Windows 10. My /dev/sda is on an SSD and then I have three 1TB HDDs /dev/sdb, /dev/sdc, and /dev/sdd ...
-1
votes
1answer
68 views

Copy dir and its contents in RAM and backup on the original dir

I'd like to copy a dir and its contents in RAM, do my routines and periodically make some backups/sync on my original dir. So if I have a dir mydir/ with 2 files: $ ls mydir/ file1.tex file2.tex I ...