Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand file system mount

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to understand the file system mount, I believe that many inexperienced people are helpless about this, this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.

Name: Mount

Use permissions: System administrator or allowed users in/etc/fstab

How to use:

mount [-hV]

mount -a [-fFnrsvw] [-t vfstype]

mount [-fnrsvw] [-o options [,...]] device | dir

mount [-fnrsvw] [-t vfstype] [-o options] device dir

Description:

Interpret the contents of a file into a file system and hang it somewhere in the directory. When this command succeeds, all files under this command will not be available until we remove the file system using umnount.

This command can be used to mount any file system. You can even mount a regular file as a drive partition using the-o loop option. This feature is useful for interpreting ramdisk,romdisk or ISO 9660 image files.

parameters

-V

Show program version

-h

Display auxiliary messages

-v

Display more information, usually and-f used for debugging.

-a

Mount all file systems defined in/etc/fstab.

-F

This command is usually used with-a, which generates a trip for each mount action to execute. You can speed up the mounting action when the system needs to mount a large number of NFS file systems.

-f

Usually used for debugging purposes. It causes mount not to perform the actual action of mounting, but to simulate the entire process of mounting. It is usually used with-v.

-n

In general, mount writes data to/etc/mtab after mounting. This option can be used to cancel this action if no writable file system exists in the system.

-s-r

equals-o ro.

-w

equals-o rw

-L

Split and hang hard disks with specific labels.

-U

Hang the file system into which the file is divided. - L and-U are meaningful only if the file/proc/partition exists.

-t

Specifies the type of file system, usually without specifying it. Mount automatically selects the correct type.

-o async

Turn on asynchronous mode, all file read and write operations will be performed in asynchronous mode.

-o sync

Executed in synchronous mode.

-o atime

-o noatime

When atime is open, the system updates the last call time of the file each time the file is read. When we use flash file systems we may choose to turn this option off to reduce the number of writes.

-o auto

-o noauto

Turn on/off automatic hang mode.

-o defaults

Use the default options rw, suid, dev, exec, auto, nouser, and async.

-o dev

-o nodev-o exec

-o noexec

Allow execution files to be executed.

-o suid

-o nosuid

Allow executables to execute with root privileges.

-o user

-o nouser

Users can perform mount/mount actions.

-o remount

Re-suspend a file system that has been suspended in a different way. For example, a system that was read-only is now reattached in read-write mode.

-o ro

Hang in read-only mode.

-o rw

Hang in read-write mode.

-o loop=

Loop mode is used to attach a file to the system as a hard drive partition.

example

Hang/dev/hda1 under/mnt.

#mount /dev/hda1 /mnt

Hang/dev/hda1 under/mnt in read-only mode.

#mount -o ro /dev/hda1 /mnt

Hang the image file of/tmp/image.iso under/mnt/cdrom using loop mode. This method allows you to view Linux CD ISO files that are generally available on the network without burning them to CD.

#mount -o loop /tmp/image.iso /mnt/cdrom

After reading the above, do you know how to understand the file system mount? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report