Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

We use autofs at work and I'm having trouble remembering some mount points. With autofs, you can only see currently or recently mounted volumes on a particular machine. How can I see the rest?

share|improve this question

2 Answers 2

You seem to mix up devices and mount points here. If a device is not mounted then it has no mount point associated. A mount point is nothing but a directory when not associated to a storage device.

If you want to list all mount points (that is, all mounted devices), use :

df

However, if you need a list of storage devices available, use :

fdisk -l

fdisk requires root privileges in most cases. If you don't have root privileges, you can list storage devices files beginning with sd in the /dev directory : this should give you enough information :

ls -l /dev/sd*

You can also read the /proc/partitions file :

cat /proc/partitions
share|improve this answer
    
any way to do it without root? I don't have it –  balor123 Jun 26 at 19:21
    
I edited my answer with a solution which does not require root privileges. Note that fdisk (and other non-root tips) do not mention mount points, but only devices. mount and df will give you a list of device/mount point associations. –  John WH Smith Jun 26 at 19:24
    
Not everything that can be mounted is a local device. –  guntbert Jun 26 at 20:13
    
@guntbert The OP mentioned "mounted volumes on a particular machine", therefore I excluded NFS possibilities. Plus, these go a little beyond the simple use of mount and fdisk. Finally, I mentioned "storage devices" only, and not "devices" in general. –  John WH Smith Jun 26 at 20:59
    
"autofs" to me generally implies remote media (NFS, SMB, ftp, ssh, ...) and removable local media - hence my point that the question cannot be answered with "the simple use of mount and fdisk" :-)) –  guntbert Jun 27 at 6:44

Just run 'mount' with no arguments. It will show you all mounted file systems. To my knowledge there is no way to see "historic" mount points other then somethings like cat /var/log/messages | grep mount. You will need to edit that last command quite a bit to get exactly what you want.

share|improve this answer
    
You could create a syslog entry for every mount attempt for autofs and review that. Config would be highly dependent on your syslogger. –  coteyr Jun 26 at 19:12
    
I don't have root but I'd like to see a list of all devices that could be mounted and at which mount points if I knew what they were –  balor123 Jun 26 at 19:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.