Questions tagged [mount]

Mounting is the concept of attaching a file system to a computer for access.

A mount is the process of attaching a file system to a computer so that it can be accessed. Depending on the operating system, a mount could be local or remote, via a network, read-only or read-write, or many other options.

1196 questions
214
votes
2 answers

How do I do 'mount --bind' in /etc/fstab?

I'm trying to add mount --bind /proc/ /chroot/mysql/proc to /etc/fstab. How can I do this?
Some Linux Nerd
  • 3,157
  • 3
  • 18
  • 20
172
votes
8 answers

How do you validate fstab without rebooting?

I modified /etc/fstab. I verified the new devices and I can mount them with the mount command. How may I validate the modifications made to /etc/fstab ?
Luc M
  • 2,890
  • 4
  • 25
  • 27
153
votes
18 answers

What's the best way to check if a volume is mounted in a Bash script?

What's the best way to check if a volume is mounted in a Bash script? What I'd really like is a method that I can use like this: if then else fi
Mark Biek
  • 1,857
  • 2
  • 14
  • 12
125
votes
15 answers

Mount CIFS Host is down

I have an issue with a mount point that was previously configured. It shows the folder, but the mount is missing and holds "?" values for size, permissions, etc. So I tried to remount using cifs and the same command from before: mount -t cifs…
Kevin
  • 1,383
  • 2
  • 10
  • 9
60
votes
7 answers

How to change owner of mount point

We have moved mysql data directory to another disk, so now /var/lib/mysql is just a mount point to another partition. We set the owner of the /var/lib/mysql directory to mysql.mysql. But everytime we mount the partition, the ownership changes to…
Arie K
  • 1,583
  • 5
  • 18
  • 27
60
votes
3 answers

Mount Remote CIFS/SMB Share as a Folder not a Drive Letter

Is there any way to mount a remote CIFS/SMB/SAMBA share as a folder/directory and not as a drive letter. For example, I want this map: \\Server\ShareName -> C:\Folder\ShareName Instead of the usual map like this: \\Server\ShareName -> Z:\ The…
Anagoge
  • 703
  • 1
  • 6
  • 7
58
votes
8 answers

How to mount a VirtualBox shared folder?

What is the procedure for mounting a VirtualBox shared folder in Linux? I tried variations of the following mount command but I keep getting protocol error or other mount errors. sudo mount -t vboxsf share /home/toto
BSalita
50
votes
6 answers

How useful is mounting /tmp noexec?

Many people (including the Securing Debian Manual) recommend mounting /tmp with the noexec,nodev,nosuid set of options. This is generally presented as one element of a 'defense-in-depth' strategy, by preventing the escalation of an attack that lets…
Phil Miller
  • 1,725
  • 1
  • 11
  • 17
46
votes
8 answers

Determine if filesystem or partition is mounted RO or RW via Bash Script?

Is there an easy way to determine if a mounted filesystem is mounted as Read-Only or Read-Write? I was thinking just to pipe mount but I thought there might be an easier way.
Jake Wilson
  • 8,494
  • 29
  • 94
  • 121
45
votes
2 answers

Prevent the possiblity of writing data to an unmounted mount point directory

I have an Ubuntu server where I'm automounting an external hard drive each boot. To do this, I've created an empty folder on the root partition, and the drive gets mounted "inside" this folder. However, what if I perform a backup to this path when…
LonnieBest
  • 1,450
  • 4
  • 21
  • 36
44
votes
4 answers

What's the best way to get info about currently unmounted drives?

First, the situation: I've got a Linux computer with two eSATA drive bays that accept removable SSD drives. I'm trying to write a little GUI application that makes it easier for the user to mount/unmount/format/backup/etc the drives that he puts…
Jeremy Friesner
  • 1,311
  • 1
  • 14
  • 25
40
votes
2 answers

Mount block file on OSX

How can block files be mounted on osx? I tried hdiutil attach filename however this is terminating with hdiutil: attach failed - not recognized hdiutil only seems to work for iso/dmg images. On ubuntu the block file can easily be mounted…
jan bernlöhr
  • 1,473
  • 3
  • 12
  • 16
38
votes
3 answers

When is fsck dangerous?

Recently I've seen the root filesystem of a machine in a remote datacenter get remounted read-only, as a result of consistency issues. On reboot, this error was shown: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY (i.e., without -a or -p…
0x5C91
  • 483
  • 1
  • 5
  • 10
34
votes
4 answers

What are the advantages/disadvantages of hard versus soft mounts in UNIX?

This question may vary between distros but, in general, what are the advantages/disadvantages of using a hard or soft mount in the UNIX world? Are there certain situations where one is more beneficial or are the uses fairly universal?
Aaron K
  • 1,505
  • 5
  • 18
  • 16
33
votes
9 answers

In windows, how to mount folder as a drive

I have some folder, say C:\foo I want to mount as drive M:\ In linux I would do this with a bind mount.
Ian Kelling
  • 2,661
  • 6
  • 23
  • 21
1
2 3
79 80