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

learn more… | top users | synonyms

37
votes
12answers
42k views

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 <something is mounted at /mnt/foo> then <Do some ...
26
votes
3answers
71k views

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 ...
25
votes
4answers
11k views

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 ...
16
votes
9answers
19k views

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 loop device.
15
votes
5answers
492 views

With virtualization, does it still make sense to use multiple mount points?

In 2013, does it make sense to still have multiple mount points on a new Linux image, or does allocating all space to / make more sense? I'd prefer to avoid the reboot required to increase the size ...
15
votes
6answers
10k views

Re-mount USB device after removal on Windows

From time to time I eject a USB device, generally a memory stick or external HDD, when I think I have finished transferring data only to realise there's something else I need to do with it. Normally ...
12
votes
4answers
6k views

ln -s vs mount --bind

Is there any practical difference between using ln -s or mount --bind? I want to move some folders to another partition, without changing their daemon setting, and wonder what approach I should take. ...
12
votes
8answers
47k views

How do you re-mount an ext3 fs readwrite after it gets mounted readonly from a disk error?

Its a relatively common problem when something goes wrong in a SAN for ext3 to detect the disk write errors and remount the filesystem read-only. Thats all well and good, only when the SAN is fixed ...
11
votes
5answers
2k views

Mounting a partition from a raw DD image file of a physical disk

I have a DD image taken from the raw HDD image (/dev/sdb). This image file contains an XFS filesystem that I need to mount. It is much too large to restore to disks (2.6TB img file) so I would like to ...
11
votes
1answer
2k views

CentOS thinks Disk is busy, can't mount or fsck

I'm a longtime user, and first time question submitter. I've spent a full day searching this and many other sites for a solution, but I must resort to requesting assistance to resolve my situation. ...
10
votes
4answers
840 views

Best way to prevent the root system filling up when a mount fails?

We have an internal web server (virtualized, hosting ReviewBoard, but not super relevant) and we have a relatively consistent failure mode with failed NFS mounts causing / to fill up. Distro is Ubuntu ...
10
votes
6answers
25k views

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 ...
10
votes
3answers
28k views

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 ...
10
votes
3answers
7k views

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 ...
10
votes
1answer
5k views

How do I forcibly unmount when I'm getting stale nfs file handles?

Got myself into a tricky situation. Have aufs mounted at /mnt/1 aufs on /mnt/1 type aufs (rw,relatime,si=daab1cec23213eea) I can't unmount the thing: sudo umount -f /mnt/1 umount2: Stale NFS file ...
9
votes
8answers
12k views

How can I mount a hard drive as read-only on Windows XP?

I recently had reason to move a hard drive from a computer that blew up to another computer for the purpose of recovering data. Under the (unfortunate) circumstances, both the donor and the recipient ...
8
votes
2answers
2k views

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 ?
8
votes
3answers
457 views

How To Prevent Access To Unmounted Mount Point

Ok, I have this in fstab //windows_mashine/Backup /backups cifs credentials=/root/.credentials,rw,_netdev,iocharset=utf8,uid=1000 0 0 I have rsnapshot in my cron which backups /etc/ and ...
8
votes
2answers
5k views

Should we mount with data=writeback and barrier=0 on ext3?

We've been running a server on a VM at a hosting company, and have just signed up for a dedicated host (AMD Opteron 3250, 4 cores, 8GB RAM, 2 x 1TB in software RAID, ext3). While running performance ...
8
votes
5answers
2k views

Why do you have to create a directory before you can mount a share?

Why do you have to create a directory before you can mount a share to it? Eg: I've never understood why mkdir is needed here: mkdir /Volumes/foo mount -t afp afp://username:pass@pretendco.com/foo ...
8
votes
1answer
1k views

NFS (with Kerberos) mount failing due to “Server not found in Kerberos database” error

When running: sudo mount -t nfs4 -o sec=krb5 sol.domain.com:/ /mnt I get this error on the client: mount.nfs4: access denied by server while mounting sol.domain.com:/ And on the server syslogs I ...
7
votes
5answers
21k views

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.
7
votes
6answers
14k views

How do you mount a .vdi image on Linux? [closed]

Is there any tool to mount a .vdi file (and/or examine its partitions) in Unix/Linux?
7
votes
3answers
12k views

How can I map iostat device names to LVM /dev/mapper/XXX names?

mount shows mount devices like: /dev/mapper/VolGroup01-LogVol00 on /var type ext3 (rw) or /dev/mapper/VolGrp_backups-backups on /mnt/backups type ext3 (rw) but iostat uses dm- notation. like ...
7
votes
5answers
10k views

Mount an VHD on Mac OS X

Is it possible (how) to mount an VHD file created by Windows 7 in OS X? I found some information about how to do this on linux. There is a fuse fs "vdfuse" which uses virtualbox libs to mount ...
6
votes
11answers
3k views

Why have multiple partitions on a windows server?

With my IT outfit, we have templates to deploy servers with a dinky C drive/partition (10GB) and a larger D drive/partition. Why do this? Windows (at least until recently and at that minimally) has no ...
6
votes
3answers
722 views

Can rm command complete in a bash script before all files have been removed?

I wrote a simple bash script to backup certain files daily to a backup mount and keep the last 3 days of backups. It's obviously too simple, as I'm occasionally getting odd behaviour that could be ...
6
votes
3answers
225 views

Root filesystem filling up, no big files

So im a very new sysadmin, just got out of school and doing my internship. Only problem is that im the only sysadmin in the place and no one to show me the job. Anyway, it's a very small company, ...
6
votes
3answers
5k views

How to mount a .bin image file in linux

I used the AWS import service to import a large (2TB) drive, and they dropped two .bin files in my S3 account. Their instructions say to stripe together to EBS volumes to make a drive large enough to ...
6
votes
2answers
4k views

Mount a tar file - not possible?

It seems one cannot mount a tar file (read only), similarly as one mounts an ISO image file. At least, I have not found any implementation. It would be useful, for example to run a find command ...
6
votes
2answers
3k views

Mount dd image with multiple partitions

I have created an image of a disk using dd using the command dd if=/dev/sdb of=/jobs/image.dd. The SATA drive /dev/sdb has 3 partitions on it (one NTFS, two FAT32). How do I mount the complete image ...
6
votes
3answers
214 views

Mounting location of non-standard file systems

I've always found it confusing on where to mount permanent non-standard filesystems in Linux. Such as a filesystem that contains company files which is shared out via Samba or NFS. It's not ...
6
votes
1answer
275 views

How to reference an NFS share by UUID in the client's /etc/fstab

I have the following NFS export on my server, with fsid set to a newly generated UUID. /etc/exports: /mnt/data client(ro,fsid=b07f5af6-6b10-11e3-b4c1-00248115724d) I would then run exportfs -rav ...
6
votes
1answer
3k views

Is remounting same file system with different options disruptive for current operations?

I want to remount a file system with optimized options (noatime,nobarrier,etc.) on SLES11. I was going to do it by updating /etc/fstab first and then do something like mount -o remount /srv/share. The ...
6
votes
3answers
3k views

Mounting Linux user home directories on CIFS server

I was wondering about peoples experiences with mounting users home directories from an Active Directory authenticated CIFS server under Linux. Preferably the mount would be accomplished upon login ...
5
votes
4answers
5k views

Differences between /dev/sda and /dev/sda1

I know that /dev/sda is the raw device, and that /dev/sda1 is the partition or virtual device. But I'm a little confused as to why the sda# only comes up some of the time, or only on certain systems. ...
5
votes
3answers
2k views

Getting NFS clients to retry mount if NFS server down when client boots

I have an NFS server that several clients mount. I am using the following in my /etc/exports on the server: /content *(rw,no_root_squash) and on the clients in my /etc/fstab I have: ...
5
votes
4answers
2k views

Read only bind-mount?

I use mount -o bind to mount directories inside chroots, which works really well. The problem is that I'd like some of these bind-mounted directories to be read only in chroot. Is it possible? If not ...
5
votes
2answers
3k views

Mount --bind persistence over reboot

I'm having trouble finding an answer for this question Does mount --bind persist over reboot? On my CentOS it looks like it doesn't, so I've placed apropriate mount --bind calls in rc.local. How ...
5
votes
2answers
5k views

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 ...
5
votes
2answers
3k views

How to use “Instance Store Volumes” storage in Amazon EC2?

According to AWS I got 850 GB storage with the Medium EC2 server. But when i create an Amazon Linux AMI, I am unable to use the 850 GB provided. While creating it does show in Storage Device ...
5
votes
4answers
2k views

DRDB and NFS: is there any efficient way to make failover transparent for NFS

We are implementing DRDB + heartbeat with two servers to have a file system with failover. These servers exposes a NFS service for other servers Currently DRDB is working just fine, but when testing ...
5
votes
2answers
1k views

Auto mount network share

Hello i am trying to get my slave media center to mount a network drive at startup automatic. I have written this to my /etc/fstab/ \\192.168.1.2\root /media/data cifs ...
5
votes
2answers
266 views

Heterogeneous environment “roaming” profiles

By "roaming profiles" I really mean "shared home directories". So, I set up an AD pair, and shared a folder on \\ad-1\homes. Then set the AD user object to mount H:\ = \\ad-1\homes\%username%. This ...
5
votes
1answer
454 views

Cannot create a EC2 server root volume greater than 8 GB

I am trying to create an EC2 large instance. AWS claims to say I shall get 850 GB instance storage if I go for Large Instance. I configure the VM to have the Root Volume size of 100 GB. But, when I ...
5
votes
4answers
3k views

How do you specify static mount points for removable usb drives?

I have a bunch of usb ports and hubs. When you attach usb thumb drives, Linux assigns them to virtual block devices on a first-come first-serve basis. It creates sdd, sde, sdf, and so on, regardless ...
5
votes
1answer
515 views

mount using insecure ports for nfs

Title says it. mount is occasionally making NFS mount/unmount requests from insecure ports. I believe the issue is being caused by all of the secure ports being stuck in TIME_WAIT after periods of ...
5
votes
1answer
50 views

Is umount -f on non-nfs volume always evil?

Edit: Executive summary (--verbose version below): I need a machine to shut down quickly in a power outage due to short battery life. Is there any reason I should not use 'umount -f' (embedded in a ...
5
votes
1answer
317 views

Why is mount is forcing me to specify -t ext4 for one partition, but not the other?

I have two very similar partitions, /dev/sdb1 (labeled 'bigb') and /dev/sdc1 (labeled 'bigc'). I used to be able to mount both of them using mount -n -L bigX /mnt/donottouch/localX (with X being b or ...
5
votes
3answers
4k views

Permission denied to remount tmp for exec

I'm running Fedora Linux on MediaTemple using their (ve) virtual Linux box. Pretty much a clean install (Linux **** 2.6.18-028stab089.1 #1 SMP Thu Apr 14 13:46:04 MSD 2011 x86_64 x86_64 x86_64 ...