Questions tagged [mount]

Attaches a file system to a specified point in an existing filesystem hierarchy

Filter by
Sorted by
Tagged with
577 votes
3 answers
497k views

What is a bind mount?

What is a “bind mount”? How do I make one? What is it good for? I've been told to use a bind mount for something, but I don't understand what it is or how to use it.
Gilles 'SO- stop being evil''s user avatar
64 votes
3 answers
33k views

Access to original contents of mount point

On my headless NAS I have sdf1 (a flash-card) mounted as / while /home is mounted from lv00 (an LVM volume backed by a software RAID). To be able to access the machine when the RAID fails, I have a ...
Janus's user avatar
  • 1,533
24 votes
1 answer
13k views

Group permissions for root not working in /tmp

I experienced a strange behaviour in my /tmp directory. Although a user belongs to a group that has permissions to read/write a file, he cannot do so. In this example, I create a new file /tmp/test....
mxmehl's user avatar
  • 793
113 votes
4 answers
144k views

What is meant by mounting a device in Linux?

I've heard the term "mounting" when referring to devices in Linux. What is its actual meaning? How it handling now unlike older versions? I haven't done that manually via the command-line. Can you ...
Renjith G's user avatar
  • 5,898
33 votes
2 answers
42k views

What mount points exist on a typical Linux system?

I have 2 questions. During Linux installation we specify memory space for 2 mount points - root and swap. Are there any other mount points created without the users notice? Is this statement correct:...
John Eipe's user avatar
  • 673
7 votes
1 answer
2k views

du results on filesystem inconsistent with df

What explains the discrepancy in usage (82 GB vs 13 GB) that I see below? Using df: $ df -h / Filesystem Size Used Avail Use% Mounted on /dev/sda2 96G 82G 9.9G 90% / ...
Amelio Vazquez-Reina's user avatar
243 votes
5 answers
1.0m views

How to get the complete and exact list of mounted filesystems in Linux?

I usually use mount to check which filesystems are mounted. I also know there is some connection between mount and /etc/mtab but I'm not sure about the details. After reading How to check if /proc/ is ...
xanpeng's user avatar
  • 5,725
67 votes
8 answers
51k views

Different linux distros sharing the same /home folder?

What is the best way to share the same /home directories between different linux distribution? I mean, I want to have both, say, Fedora and Arch, and I want to find my files at home no matter which ...
behzad.nouri's user avatar
36 votes
5 answers
53k views

List only bind mounts

Rather than using mount | grep, I'd like to use mount -l -t bind, but that doesn't work, and -t none shows all mounts.
l0b0's user avatar
  • 51.5k
36 votes
2 answers
23k views

Where do the files go if you mount a drive to a folder that already contains files? [duplicate]

I just accidentally mounted a new drive to a folder that already contained files. I don't care about them and have them somewhere else, but that folder appears empty now. I'm curious what happened ...
T. Brian Jones's user avatar
171 votes
3 answers
494k views

Mount cifs Network Drive: write permissions and chown

I have access to a cifs network drive. When I mount it under my OSX machine, I can read and write from and to it. When I mount the drive in ubuntu, using: sudo mount -t cifs -o username=${USER},...
Vincent's user avatar
  • 2,908
87 votes
4 answers
255k views

How to mount a disk image from the command line?

I know how to mount a drive that has a corresponding device file in /dev, but I don't know how to do this for a disk image that does not represent a physical device and does not have an analogue in /...
user628544's user avatar
  • 1,565
80 votes
3 answers
93k views

What is a "loop device" when mounting?

I am mounting an ISO file, and looking at this tutorial. They use the command: $ mount -o loop disk1.iso /mnt/disk I'm trying to understand the use of -o loop. I have two questions: When I look at ...
Vass's user avatar
  • 5,381
48 votes
6 answers
138k views

Is there a command to see where a disk is mounted?

Is there a simple command that takes a disk's device node as input, and tells me where (and whether) that disk is mounted? Is it possible to get the mount point by itself, so I can pass it to another ...
detly's user avatar
  • 5,170
24 votes
3 answers
19k views

per process private file system mount points

I was checking unshare command and according to it's man page, unshare - run program with some namespaces unshared from parent I also see there is a type of namespace listed as, mount namespace ...
Ramesh's user avatar
  • 39.3k
7 votes
3 answers
14k views

Automount USB drives with no GUI requirement (halevt replacement)

For minimal installations of Debian, I have been using halevt to enable automounting of USB drives. Halevt is reliable and requires no configuration aside from installing the package. Now, halevt has ...
user5184's user avatar
  • 685
240 votes
15 answers
717k views

umount: device is busy. Why?

When running umount /path I get: umount: /path: device is busy. The filesystem is huge, so lsof +D /path is not a realistic option. lsof /path, lsof +f -- /path, and fuser /path all return nothing. ...
Ole Tange's user avatar
  • 35.6k
95 votes
5 answers
191k views

Determine what device a directory is located on

If I do # cd / # ln -s /home test # cd test # mount --bind $PWD /mnt the entry in /proc/mounts is /dev/sda2 /mnt ext4 rw,noatime,data=ordered 0 0 which is the device that is mounted to /home and ...
StrongBad's user avatar
  • 5,271
76 votes
10 answers
232k views

How to allow non-superusers to mount any filesystem?

Is it possible to allow some particular users (e.g. members of a group) to mount any filesystem without superuser privileges on Linux? Another question might have been "in what ways a user can harm a ...
user avatar
66 votes
8 answers
119k views

How to mount an image file without root permission?

Can I mount a file system image without root permission? Normally I would do: mount -o loop DISK_IMAGE FOLDER Without using sudo or setting the suid on mount, is there any suitable way to do this? ...
daisy's user avatar
  • 54.6k
61 votes
3 answers
33k views

understanding "mount" as a concept in the OS [duplicate]

I want to understand what mounting is. It is used in different contexts and situations (directories, flash drives, network cards, etc) and I can't find resources which: Describe the mount concept; ...
Vass's user avatar
  • 5,381
59 votes
4 answers
252k views

Best way to mount remote folder

I have two RasberryPi running debian wheezy and I would like to mount a folder from computer A on computer B. What is the best (as in most efficient) way to do this? I can do it via SMB, but that is ...
cjburkha's user avatar
  • 725
17 votes
4 answers
13k views

mount is not executed when called by udev

I tried to create some udev rules to mount and unmount my USB flash drives; the rules for the moment are very simple: ACTION=="add",KERNEL=="sd[b-z]",RUN+="/root/scripts/plug_flash_drive.sh %k" ...
magva's user avatar
  • 171
105 votes
10 answers
963k views

How to mount a device in Linux?

I read some resources about the mount command for mounting devices on Linux, but none of them is clear enough (at least for me). On the whole this what most guides state: $ mount (lists all ...
its_me's user avatar
  • 14k
92 votes
12 answers
14k views

Why is Linux's filesystem designed as a single directory tree?

Can anyone explain why Linux is designed as a single directory tree? Whereas in Windows we can have multiple drives like C:\, and D:\, there is a single root in Unix. Any specific reason there?
user2720323's user avatar
  • 3,589
65 votes
6 answers
204k views

Mounting a squashfs filesystem in read-write

I have a Clonezilla installation on a USB stick and I'd like to make some modifications to the operating system. Specifically, I'd like to insert a runnable script into /usr/sbin to make it easy to ...
Naftuli Kay's user avatar
  • 39.7k
59 votes
7 answers
24k views

Why does mount require root privileges?

Why does Linux require that a user be root/using sudo/specifically authorized per mount in order to mount something? It seems like the decision as to whether to allow a user to mount something should ...
CrazyCasta's user avatar
50 votes
13 answers
155k views

Check if folder is a mounted remote filesystem

What is the best way (reliable, portable, etc.) to check if a given folder is on a mounted remote (nfs) filesystem within a shell script? I am looking for a command that would look like: chk-remote-...
Totor's user avatar
  • 20.1k
49 votes
3 answers
163k views

How does _netdev mount option in /etc/fstab work?

I'd like to know what is the exact mechanism (implementation) used to defer mounting until after network interface is up when one uses _netdev option in /etc/fstab? Does systemd alter this behavior? ...
Piotr Dobrogost's user avatar
42 votes
3 answers
30k views

Why doesn't mount respect the read only option for bind mounts?

On my Arch Linux system (Linux Kernel 3.14.2) bind mounts do not respect the read only option # mkdir test # mount --bind -o ro test/ /mnt # touch /mnt/foo creates the file /mnt/foo. The relevant ...
StrongBad's user avatar
  • 5,271
40 votes
5 answers
48k views

mount info for current directory

I can do df . to get some of the info on the mount that the current directory is in, and I can get all the info I want from mount. However, I get too much info (info about other mounts). I can grep it ...
ctrl-alt-delor's user avatar
40 votes
6 answers
67k views

How does a kernel mount the root partition?

My question is with regards to booting a Linux system from a separate /boot partition. If most configuration files are located on a separate / partition, how does the kernel correctly mount it at boot ...
Mr. Shickadance's user avatar
32 votes
3 answers
17k views

How can I mount a filesystem, mapping userids?

I can successfully mount an ext4 partition, the problem is that all the files on the partition are owned by the user with userid 1000. On one machine, my userid is 1000, but on another it's 1010. My ...
Flimm's user avatar
  • 4,228
15 votes
1 answer
6k views

Unmount a rbind mount without affecting the original mount

Asked on serverfault but didn't get enough attention, so reposted here, with the hope some people here know the answer. There is another question discussing about umounting rbind mounts, but the ...
icando's user avatar
  • 439
14 votes
1 answer
16k views

Mounting an ext3 filesystem with user privileges

I'm trying to mount an ext3 file system from another Linux installation so that the user, not root, will have full access to all the files. (I really do need user to have access to those files, ...
Ilari Kajaste's user avatar
13 votes
3 answers
21k views

Udev rule to mount disk does not work

I have the following content in in /etc/udev/rules.d/81-external-disk.rules: ENV{ID_FS_UUID}=="6826692e-79f4-4423-8467-cef4d5e840c5", RUN{program}+="/bin/mount -o nofail,x-systemd.device-timeout=1 -t ...
sebelk's user avatar
  • 4,399
12 votes
2 answers
5k views

When was `relatime` made the default?

What is the first Linux kernel release to set relatime as the default mount option?
user avatar
7 votes
2 answers
3k views

mount options shown in /proc/mounts

IIRC then the mount options shown in /proc/mounts have changed. Some time ago acl and user_xattr were shown, now it seems that only noacl and nouser_xattr are shown if these features are turned off. ...
Hauke Laging's user avatar
  • 90.3k
6 votes
1 answer
8k views

Why is there no rootfs file system present on my system?

The linux kernel documentation claims: Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which is always present in 2.6 systems. You can't unmount rootfs … On all linux ...
Georg Schölly's user avatar
1 vote
2 answers
4k views

Permanent network drive mount in fstab not working (due to network not being online whilst attempting to mount)

I have a network drive hosted on a Windows10 Machine, it mounts fine to my CentOS7 machine through the command: sudo mount -t cifs //ipaddress/sharedfoldername /mountpoint --verbose -o credentials:/...
ekv_56's user avatar
  • 57
120 votes
1 answer
92k views

What happens when you 'mount over' an existing folder with contents?

Right now /tmp has some temporary files in it. When I mount my hard drive (/dev/sdc1) on top of /tmp, I can see the files on the hard drive. What happens to the actual content of /tmp when my hard ...
user's user avatar
  • 1,589
82 votes
15 answers
495k views

mount.nfs: access denied by server while mounting on Ubuntu machines?

I have three machines in production - machineA 10.66.136.129 machineB 10.66.138.181 machineC 10.66.138.183 and all those machines have Ubuntu 12.04 installed in it and I have root access ...
arsenal's user avatar
  • 3,093
79 votes
12 answers
92k views

Mount Google Drive in Linux?

Now that Google Drive is available, how do we mount it to a Linux filesystem? Similar solutions exist for Amazon S3 and Rackspace Cloud Files.
blee's user avatar
  • 1,342
56 votes
7 answers
170k views

How to find the type of an img file and mount it?

I have to mount a .img file but I don't know what type of .img it is. How can I figure out what type of .img file it is? # mount -t auto -o ro,loop gmapsupp.img /mnt/iso/ mount: you must specify the ...
Luigi's user avatar
  • 705
44 votes
3 answers
20k views

systemd keeps unmounting a removable drive

I have following line in /etc/fstab: UUID=E0FD-F7F5 /mnt/zeno vfat noauto,utf8,user,rw,uid=1000,gid=1000,fmask=0113,dmask=0002 0 0 The partition is freshly created by gnome-disks under the ...
Alois Mahdal's user avatar
  • 4,440
41 votes
6 answers
222k views

How to check whether a particular directory is a mount point? [duplicate]

How to check whether or not a particular directory is a mount point? For instance there is a folder named /test that exists, and I want to check if it is a mount point or not.
unixx's user avatar
  • 421
39 votes
14 answers
261k views

can not use mount.cifs: mount error(2): No such file or directory

The command mount.cifs is found not being able to run in a gentoo system with systemd ae429-1105 etc # mount -t cifs //file.abc.edu.au/user /home/directory/path -o credentials=/etc/user,rw,iocharset=...
Chenming Zhang's user avatar
38 votes
4 answers
40k views

Systemd mount fails. Where= setting doesn't match unit name

If I use this command : mount -t xfs -o noatime,nodiratime,logbufs=8 -L d1 /srv/node/d1 all works correctly. But if I try to mount through the systemd mount it fails. I've created a file /etc/...
Oleksandr's user avatar
  • 1,049
35 votes
3 answers
36k views

How to re-mount a USB stick after unmounting from Nautilus without disconnecting it?

I find that in order to re-mount a USB stick, I have to physically disconnect it, and then re-connect it. How can I do this without such tiring physical action?
tshepang's user avatar
  • 65.7k
29 votes
2 answers
15k views

How is /etc/fstab accessed before root is mounted?

I was making some changes to /etc/fstab, when this chicken and egg question occurred to me - if /etc/fstab contains the instructions for mounting the file systems, including the root partition, then ...
sashoalm's user avatar
  • 5,820

1
2 3 4 5
9