You are not logged in.

#1 2009-07-02 14:11:23

amca01
Member
Registered: 2008-12-28
Posts: 57

Why can't I add a new directory under /media?

My /media directory started with /media/dvd and /media/cdrom, and when I first set up my system I added /media/usbstick for removable storage.  But for some reason, I can't add any further directories here.  For example, if (as root) I enter

mkdir /media/iPod

I get the error message

mkdir: cannot create directory `/media/iPod': No such file or directory

Does anybody know what's going on, and how I can circumvent this behaviour?

Thanks,
-A.

Offline

#2 2009-07-02 14:20:00

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Why can't I add a new directory under /media?

Are you sure you don't mean /mnt?

Offline

#3 2009-07-02 20:09:58

Joel-san
Member
From: Helsinki, Finland
Registered: 2009-06-14
Posts: 8
Website

Re: Why can't I add a new directory under /media?

Do you have autofs or similar automounter running? Autofs can be configured to mount to /media and for this it shadows the /media directory by creating a new virtual directory on top of it (I believe it works that way). You cannot create directories to the virtual directory yourself.

Last edited by Joel-san (2009-07-02 20:11:13)

Offline

#4 2009-07-02 23:57:13

amca01
Member
Registered: 2008-12-28
Posts: 57

Re: Why can't I add a new directory under /media?

Thanks, Joel-san - that explains it.  I was getting all confused.

cheers,
-A.

Offline

#5 2009-07-03 19:18:49

Joel-san
Member
From: Helsinki, Finland
Registered: 2009-06-14
Posts: 8
Website

Re: Why can't I add a new directory under /media?

:) No problem. I recently struggled with the same problem.

Last edited by Joel-san (2009-07-03 19:18:57)

Offline

#6 2009-07-03 20:04:35

anonymous
Member
Registered: 2009-07-03
Posts: 9

Re: Why can't I add a new directory under /media?

There is /mnt to mount by hand. /media was always for auto-mounters. So you should not even create your /media/usbstick.

Offline

#7 2009-07-04 14:26:20

Joel-san
Member
From: Helsinki, Finland
Registered: 2009-06-14
Posts: 8
Website

Re: Why can't I add a new directory under /media?

In what rulebook of Unix is that written in? I like to mount removable medias to /media and internal and network thingies to /mnt.

Offline

#8 2009-07-13 15:20:26

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Why can't I add a new directory under /media?

Joel-san, it is the custom now followed.  for eg http://www.debianadmin.com/linux-direct … rview.html

Offline

#9 2009-07-14 06:40:03

Joel-san
Member
From: Helsinki, Finland
Registered: 2009-06-14
Posts: 8
Website

Re: Why can't I add a new directory under /media?

Are you saying that automounter only is the new custom? Quoted from that site you linked.

/media

A generic mount point for removable media like CD-ROM, USB, Floppies etc

I don't see automounters mentioned in that statement. Why do you even care? I can mount my USB sticks even to /opt if I want to. :D

Last edited by Joel-san (2009-07-14 06:41:20)

Offline

Board footer

Powered by FluxBB