Re-organize mount/umount, so that you do not always forget to come to the new machine.

Source: Internet
Author: User
Attaching is to add the separated File System to the file system partition structure. The file system must be appended to a mount point, that is, a directory.
Mounting and detaching a file system occurs when the system starts and closes.
The/etc/vfstab file will be read when the system starts. The file system to be mounted. Therefore, the file system in the/etc/vfstab file will be automatically mounted. You can also manually mount the file system in the command line mode.

Mount without parameters displays the mounted file system.
# Mount
/On/dev/dsk/c0t3d0s0 read/write/setuid/largefiles/logging on Mon Nov 18
17:58:19 1998
/Usr on/dev/dsk/c0t3d0s6 read/write/setuid/largefiles/logging on Mon Nov 18
17:58:19 1998
/Proc on/proc read/write/setuid on Mon Nov 18 17:58:19 1998
/Dev/fd on fd read/write/setuid on Mon Nov 18 17:58:19 1998
/Var on/dev/dsk/c0t3d0s1 nolargefiles/read/write/setuid on Mon Nov 18 17:58:19
1998
/Opt on/dev/dsk/c0t3d0s5 setuid/read/write/largefiles on Mon Nov 18 17:58:20
1998
/Tmp on swap read/write on Mon Nov 18 17:58:20 1998
/Pns on dbserver:/export/pse soft/nosuid/remote on Mon Nov 18 19:04:36 1998

1. the mount option. You can use-o to calibrate the mount option.

The nolargefiles parameter will make all new files in the file system smaller than 2 GB bytes.
Remount indicates to mount that it should be reloaded to a file system that has been loaded. This is usually used to change the loading mark of a file system. It can be used to change a read-only file system to a readable file system.
Ro loads the file system as read-only
Rw loads the file system into a readable/writable file system.
Intr allows killing processes waiting in the file system.

# Mount-o nolargefiles/dev/dsk/c0t3d0s7/export/home

The file size in the file system cannot exceed 2 GB. This parameter may cause errors because the file system contains files larger than 2 GB. Note: yes under/dev/dsk/instead of/dev/rdsk,
Because the devices under/dev/rdsk are physical devices and files under/dev/dsk are connected to/dev/rdsk

To mount an existing file system in/etc/vfstab, you only need to use the command
# Mount/export/home

/Etc/vfstab File Format
# Device mount FS fsck mount
# To mount to fsck point type pass at boot ops
#/Dev/dsk/c1d0s2/dev/rdsk/c1d0s2/usr ufs 1 yes-
/Proc-no-
Fd-/dev/fd-no-
Swap-/tmp tmpfs-yes-
/Dev/dsk/c0t3d0s0/dev/rdsk/c0t3d0s0/ufs 1 no-
/Dev/dsk/c0t3d0s6/dev/rdsk/c0t3d0s6/usr ufs 1 no-
/Dev/dsk/c0t3d0s3/dev/rdsk/c0t3d0s3/export ufs 5 yes-
/Dev/dsk/c0t3d0s7/dev/rdsk/c0t3d0s7/export/home ufs 5 yes-
/Dev/dsk/c0t3d0s5/dev/rdsk/c0t3d0s5/opt ufs 8 yes-
/Dev/dsk/c0t3d0s1--swap-no-
Note: you do not need to use yes to use no-

# Mount-a notifies mount of all file systems to be loaded, equivalent to/usr/sbin/mountall
It is usually not used by administrators but automatically issued by/etc/init. d/MOUNTFSYS at system startup.

List Loaded File Systems
# Mount

View File Systems

Umount unmount the File System
# Umount/dev/dsk/c0t3d0s7
Or
# Umount/export/home
If a file in the file system is in use, the file system cannot be detached.

When a device is in the busy status
Available
# Umount-f/mount_point force Uninstall a directory (easy to lose data)
Or use the following: (recommended)

Using the fuser Command
To stop all processes from accessinga file system:
As root, list all the processes accessing the file system
# Fuser-cu mount_point
2. Kill all processes accessing the file system.
# Fuser-ck mount_point
3. Verify there are no processes accessing the file system.
# Fuser-c mount_point
4. Unmount the file system.
# Umount mount_point

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.