Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

MOUNT

Section: Linux Programmer's Manual (2)
Updated: 1994-11-28
Index Return to Main Contents
 

̾Á°

mount, umount - ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥Þ¥¦¥ó¥È/¥¢¥ó¥Þ¥¦¥ó¥È¤¹¤ë  

½ñ¼°

#include <sys/mount.h>

int mount(const char *specialfile, const char * dir , const char * filesystemtype, unsigned long mountflags , const void * data);

int umount(const char *dir);  

ÀâÌÀ

mount ¤Ï specialfile ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à(¥Ç¥Ð¥¤¥¹Ì¾¤Ç¤¢¤ë¤³¤È¤¬Â¿¤¤)¤ò dir ¤Ç»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Ë·ë¤Ó¤Ä¤±¤ë¡£

umount ¤Ï dir ¤Ç»ØÄꤵ¤ì¤¿¡¢´û¤Ë·ë¤Ó¤Ä¤±¤é¤ì¤Æ¤¤¤ë(ºÇ¾å°Ì¤Î)¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò³°¤¹¡£

¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥Þ¥¦¥ó¥È/¥¢¥ó¥Þ¥¦¥ó¥È¤¬¤Ç¤­¤ë¤Î¤Ï¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¡¼ ¤À¤±¤Ç¤¢¤ë¡£

°ú¿ô filesystemtype ¤Ï /proc/filesystems Ãæ¤Ë¤¢¤²¤é¤ì¤Æ¤¤¤ëÃͤΰì¤Ä(Î㤨¤Ð "minix", "ext2", "msdos", "proc", "nfs", "iso9660" Åù)¤ò»ØÄꤹ¤ë¡£

°ú¿ô mountflags ¤ÏÀèÆ¬ 16 ¥Ó¥Ã¥È¤¬¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼ 0xC0ED ¤Ç¤¢¤ê¡¢»Ä¤ê¤Î 16 ¥Ó¥Ã¥È¤Ï ¥Þ¥¦¥ó¥È¥Õ¥é¥° (libc4 ¤ª¤è¤Ó libc5 ¤Ç¤Ï <linux/fs.h> ¤Ç¡¢glibc2 ¤Ç¤Ï <sys/mount.h> ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë) ¤Ç¤¢¤ë¡£

#define MS_RDONLY        1 /* mount read-only */
#define MS_NOSUID        2 /* ignore suid and sgid bits */
#define MS_NODEV         4 /* no access to device special files */
#define MS_NOEXEC        8 /* no program execution */
#define MS_SYNCHRONOUS  16 /* writes are synced at once */
#define MS_REMOUNT      32 /* alter flags of a mounted fs */
#define MS_MANDLOCK     64 /* allow mandatory locks */
#define MS_NOATIME    1024 /* do not update access times */
#define MS_NODIRATIME 2048 /* do not update dir access times */
#define MS_BIND       4096 /* bind subtree elsewhere */

°ú¿ô data ¤ÏÊ̤Υե¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤Æ²ò¼á¤µ¤ì¤ë¡£

 

ÊÖ¤êÃÍ

À®¸ù¤·¤¿¾ì¹ç 0 ¤¬Ê֤롣¼ºÇÔ¤·¤¿¾ì¹ç -1 ¤¬Ê֤ꡢ errno ¤¬¥¨¥é¡¼¤ÎÆâÍÆ¤Ë½¾¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£  

¥¨¥é¡¼

¥¨¥é¡¼¤ÎÃͤϥե¡¥¤¥ë¥·¥¹¥Æ¥à¥¿¥¤¥×¤Ë°Í¸¤·¤Æ°Ê²¼¤Ë¼¨¤¹¤è¤¦¤Ë¤Ê¤ë¡£ ¤½¤ì¤¾¤ì¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥¿¥¤¥×¤Ë¤Ï¸ÇÍ­¤Î¥¨¥é¡¼¤¬Â¸ºß¤¹¤ë¾ì¹ç¤¬¤¢¤ê¡¢ ¤Þ¤¿¤½¤ìÆÈ¼«¤Îưºî¤ò¤¹¤ë¤³¤È¤â¤¢¤ë¡£¾Ü¤·¤¯¤Ï¥«¡¼¥Í¥ë¤Î¥½¡¼¥¹¤ò¸«¤ÆÍߤ·¤¤¡£
EPERM
¼Â¹Ô¼Ô¤¬¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¡¼¤Ç¤Ï¤Ê¤¤¡£
ENODEV
filesystemtype ¤¬¥«¡¼¥Í¥ëÃæ¤ÇÄêµÁ (config) ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
ENOTBLK
specialfile ¤¬¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤Ç¤Ï¤Ê¤¤(¥Ç¥Ð¥¤¥¹¤¬Í׵ᤵ¤ì¤Æ¤¤¤ë¾ì¹ç)¡£
EBUSY
specialfile ¤Ï´û¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤ë¡£¤Þ¤¿¤Ï´û¤Ë¥Õ¥¡¥¤¥ë¤¬½ñ¤­¹þ¤ßÍѤ˳«¤«¤ì¤Æ¤ª¤ê¡¢ ÆÉ¤ß¹þ¤ßÀìÍѤ˺ƥޥ¦¥ó¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£¤Þ¤¿¤Ï dir ¤¬´û¤Ë»È¤ï¤ì¤Æ¤ª¤ê(¤¢¤ë¥¿¥¹¥¯¤¬»ÈÍÑÃæ¤Ç¤¢¤Ã¤¿¤ê¡¢Ê̤ΥǥХ¤¥¹¤Î ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ç¤¢¤Ã¤¿¤ê¡¢¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ç¤¢¤Ã¤¿¤ê....) dir ¤Ë¤Ï¥Þ¥¦¥ó¥È¤Ç¤­¤Ê¤¤¡£
EINVAL
specialfile ¤Î¥¹¡¼¥Ñ¡¼¥Ö¥í¥Ã¥¯¤¬Ìµ¸ú¤Ç¤¢¤ë¡£¤Þ¤¿¤Ï specialfile ¤¬ dir ¤ËÂФ·¤Æ¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤Î¤ËºÆ¥Þ¥¦¥ó¥È¤¬Í׵ᤵ¤ì¤¿¡£¤Þ¤¿¤Ï dir ¤¬¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤Ç¤Ï¤Ê¤¤¤Î¤Ë¥¢¥ó¥Þ¥¦¥ó¥È¤ÎÍ׵᤬¤¢¤Ã¤¿¡£
EFAULT
¾ì½ê¤ò¼¨¤¹°ú¿ô¤Î¤Ò¤È¤Ä¤¬¥æ¡¼¥¶¡¼¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
ENOMEM
¥«¡¼¥Í¥ë¤¬¥Õ¥¡¥¤¥ë̾¤ä¥Ç¡¼¥¿¤ò¥³¥Ô¡¼¤¹¤ë¤¿¤á¤Î¶õ¤­¥Ú¡¼¥¸¤ò³ÎÊݤǤ­¤Ê¤¤¡£
ENAMETOOLONG
¥Ñ¥¹Ì¾¤ÎŤµ¤¬ MAXPATHLEN ¤ò±Û¤¨¤¿¡£
ENOENT
¥Ñ¥¹Ì¾¤¬¶õ¤Ç¤¢¤ë¡£¤â¤·¤¯¤Ï»ØÄꤵ¤ì¤¿¥Ñ¥¹¤¬Â¸ºß¤·¤Ê¤¤¡£
ENOTDIR
2ÈÖÌܤΰú¿ô¡¢¤â¤·¤¯¤Ï1ÈÖÌܤΰú¿ô¤ÎÀÜÆ¬¼­¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤Ê¤¤¡£
EACCES
¥Ñ¥¹¤Ë´Þ¤Þ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Ë¸¡º÷(¼Â¹Ô)µö²Ä¤¬¤Ê¤¤¡£
¤Þ¤¿¤Ï MS_RONLY ¥Õ¥é¥°Ìµ¤·¤Ç¥ê¡¼¥É¥ª¥ó¥ê¡¼(ÆÉ¤ß½Ð¤·¤Î¤ß)¤Î¥Õ¥¡¥¤¥ë¥·¥¹ ¥Æ¥à¤ò¥Þ¥¦¥ó¥È¤·¤è¤¦¤È¤·¤¿¡£
¤Þ¤¿¤Ï¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹ specialfile ¤¬ MS_NODEV ¥ª¥×¥·¥ç¥ó¤Ç¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë°ÌÃÖ¤·¤Æ¤¤¤ë¡£
ENXIO
¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹ specialfile ¤Î¥á¥¸¥ã¡¼¥Ê¥ó¥Ð¤¬ÈϰϤò±Û¤¨¤¿¡£
EMFILE
(¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤¬Í׵ᤵ¤ì¤¿»þ)¥À¥ß¡¼¥Ç¥Ð¥¤¥¹¤Î¥Æ¡¼¥Ö¥ë¤¬°ìÇդˤʤä¿¡£
 

½àµò

¤³¤Î´Ø¿ô¤Ï Linux ÆÃÍ­¤Î´Ø¿ô¤Ç¤¢¤ê¡¢°Ü¿¢À­¤ò»ý¤¿¤»¤¿¤¤¥×¥í¥°¥é¥à¤Ë¤Ï »ÈÍѤ¹¤Ù¤­¤Ç¤Ê¤¤¡£  

Îò»Ë

ºÇ½é¤Î umount ´Ø¿ô¤Ï umount(device) ¤Î·Á¤Ç¸Æ¤Ó½Ð¤µ¤ì¡¢ ¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹°Ê³°¤ò»ØÄꤷ¤Æ¸Æ¤Ó½Ð¤¹¤È ENOTBLK ¤òÊÖ¤·¤¿¡£ Linux 0.98p4 ¤Ç¡¢ÍÍ¡¹¤Ê¥Ç¥Ð¥¤¥¹¤ËÂбþ¤¹¤ë¤¿¤á¤Ë umount(dir) ¸Æ¤Ó½Ð¤·¤¬²Ã¤¨¤é¤ì¤¿¡£ Linux 2.3.99-pre7 ¤Ç¡¢umount(device) ¤Ïºï½ü¤µ¤ì¡¢ umount(dir) ¤À¤±¤¬»Ä¤µ¤ì¤¿¡£ (°ì¤Ä¤Î¥Ç¥Ð¥¤¥¹¤òÊ£¿ô¤Î°ÌÃ֤˥ޥ¦¥ó¥È½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤¿¤á¡¢ ¥Ç¥Ð¥¤¥¹¤ò»ØÄꤷ¤¿¤À¤±¤Ç¤ÏÉÔ½½Ê¬¤À¤«¤é¤Ç¤¢¤ë)

¸µ¤Î MS_SYNC ¥Õ¥é¥°¤Ï¡¢Ê̤ΠMS_SYNC ¤¬ <mman.h> ¤ËÄɲ䵤줿¤Î¤Ç 1.1.69 ¤«¤é MS_SYNCHRONOUS ¤Ë̾Á°¤¬ÊѤï¤Ã¤¿¡£  

´ØÏ¢¹àÌÜ

mount(8), umount(8)


 

Index

̾Á°
½ñ¼°
ÀâÌÀ
ÊÖ¤êÃÍ
¥¨¥é¡¼
½àµò
Îò»Ë
´ØÏ¢¹àÌÜ

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Linuxinfor Man Pages in HTML Format: man2". See Index Page for more info about Authorship and Copyright.

1999-2008 Linuxinfor.com. No rights reserved.