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

learn more… | top users | synonyms

38
votes
12answers
51k 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 ...
27
votes
3answers
82k 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 ...
26
votes
4answers
12k 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 ...
17
votes
9answers
22k 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
537 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
12k 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 ...
14
votes
4answers
7k 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. ...
14
votes
2answers
6k 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. ...
13
votes
8answers
52k 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 ...
12
votes
3answers
34k 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 ...
12
votes
3answers
8k 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 ...
11
votes
6answers
31k 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 ...
11
votes
5answers
4k views

Quick way to restore or reload /etc/fstab settings?

I'm working with a complex /etc/fstab on a RHEL 6.x-based server. The system has a variety of mount options in use across eight partitions, including several bind mounts. I'm testing options and their ...
11
votes
2answers
7k 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 ...
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 ...
10
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 ...
10
votes
4answers
1k 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
5answers
26k 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.
10
votes
2answers
5k 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 ?
10
votes
2answers
8k 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 ...
10
votes
1answer
6k 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
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 ...
9
votes
3answers
14k 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 ...
8
votes
3answers
587 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
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
6answers
16k 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
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 ...
7
votes
5answers
12k 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 ...
7
votes
1answer
632 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
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
872 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
10k views

Can we mount multiple disks as one directory?

Are there way to mount the different disks as one directory? Assuming I have some disks with ext4 partitions: /dev/sda1 1Tb mounted as /store1 /dev/sda2 2Tb mounted as /store2 /dev/sdb1 2Tb mounted ...
6
votes
2answers
5k 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 ...
6
votes
3answers
600 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
2answers
4k 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 ...
6
votes
3answers
6k 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
1answer
535 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 ...
6
votes
3answers
235 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
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
3answers
3k views

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

I'm trying to figure out how to add "mount --bind /proc/ /chroot/mysql/proc" to /etc/fstab, but how can I to do this?
5
votes
2answers
18k views

How do I mount sub-directory to a hard drive in Linux?

Let us assume that I have two hard drives (A,B) and have the following directories: /var/www /var/www/upload Currently if I upload a file to /var/www OR /var/www/upload ; it will be saved in drive ...
5
votes
1answer
242 views

remount /tmp for the current shell

I have a command which is hard-coded to use /tmp as its working directory. /tmp is rather small, and the command is certain to fill it up, which will cause problems for other system processes. I ...
5
votes
4answers
7k 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
2answers
2k views

/etc/exports & mount option

In my Linux server I have the following options in /etc/exports /home *(rw,sync,no_subtree_check,no_root_squash) And I mount from a Mac using mount -t nfs -o ...
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
3answers
3k 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

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
1answer
2k views

Mount XFS partition with < 4k block size

I have an XFS partition with a 64k blocksize. But I can only mount it in Ubuntu 10.10 when the blocksize is the default of 4k. How can I mount a partition with the larger blocksize? This works: ...