|
|||
1. Managing Removable Media (Overview) 2. Managing Removable Media (Tasks) 3. Accessing Removable Media (Tasks) 4. Writing CDs and DVDs (Tasks) 5. Managing Devices (Overview/Tasks) 6. Dynamically Configuring Devices (Tasks) 7. Using USB Devices (Overview) 9. Using InfiniBand Devices (Overview/Tasks) 11. Administering Disks (Tasks) 12. SPARC: Adding a Disk (Tasks) 13. x86: Adding a Disk (Tasks) 14. Configuring Solaris iSCSI Targets and Initiators (Tasks) 15. Configuring and Managing the Solaris Internet Storage Name Service (iSNS) 16. The format Utility (Reference) 17. Managing File Systems (Overview) 18. Creating UFS, TMPFS, and LOFS File Systems (Tasks) 19. Mounting and Unmounting File Systems (Tasks) Overview of Mounting File Systems How to Add an Entry to the /etc/vfstab File How to Mount a File System (/etc/vfstab File) How to Mount a UFS File System (mount Command) How to Mount a UFS File System Without Large Files (mount Command) How to Mount an NFS File System (mount Command) x86: How to Mount a PCFS (DOS) File System From a Hard Disk (mount Command) How to Stop All Processes Accessing a File System 20. Using The CacheFS File System (Tasks) 21. Configuring Additional Swap Space (Tasks) 22. Checking UFS File System Consistency (Tasks) 23. UFS File System (Reference) 24. Backing Up and Restoring File Systems (Overview) 25. Backing Up Files and File Systems (Tasks) 26. Using UFS Snapshots (Tasks) 27. Restoring Files and File Systems (Tasks) 28. UFS Backup and Restore Commands (Reference) 29. Copying UFS Files and File Systems (Tasks) |
Mounting File SystemsThe following sections describe how to mount a file system by adding an entry in the /etc/vfstab file or by using the mount command from the command line. How to Determine Which File Systems Are MountedYou can determine which file systems are already mounted by using the mount command. $ mount [ -v ] The -v displays the list of mounted file systems in verbose mode. Example 19-1 Determining Which File Systems Are MountedThis example shows how to use the mount command to display information about the file systems that are currently mounted. $ mount / on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/xattr/onerror=... /devices on /devices read/write/setuid/dev=46c0000 on Thu Sep ... /system/contract on ctfs read/write/setuid/devices/dev=43c0001 ... /usr on /dev/dsk/c0t0d0s6 read/write/setuid/intr/largefiles/xattr/... /proc on /proc read/write/setuid/dev=4700000 on Thu Sep 2 ... /etc/mnttab on mnttab read/write/setuid/dev=47c0000 on Thu Sep 2 ... /etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4480001 ... /system/object on objfs read/write/setuid/devices/dev=44c0001 ... /dev/fd on fd read/write/setuid/dev=4800000 on Thu Sep 2 ... /var/run on swap read/write/setuid/xattr/dev=1 on Thu Sep 2 ... /tmp on swap read/write/setuid/xattr/dev=2 on Thu Sep 2 ... /stuff on /dev/dsk/c0t0d0s5 read/write/setuid/intr/largefiles/xattr... /export/home on /dev/dsk/c0t0d0s7 read/write/setuid/intr/largefiles/... /home/rimmer on pluto:/export/home/rimmer remote/read/write/setuid/xattr/... $ How to Add an Entry to the /etc/vfstab File
The following example shows how to mount the disk slice /dev/dsk/c0t3d0s7 as a UFS file system to the mount point /files1. The raw character device /dev/rdsk/c0t3d0s7 is specified as the device to fsck. The fsck pass value of 2 means that the file system will be checked, but not sequentially. #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /dev/dsk/c0t3d0s7 /dev/rdsk/c0t3d0s7 /files1 ufs 2 yes - The following example shows how to mount the /export/man directory from the system pluto as an NFS file system on mount point /usr/man. Neither a device to fsck nor a fsck pass is specified because it's an NFS file system. In this example, mount options are ro (read-only) and soft. #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options pluto:/export/man - /usr/man nfs - yes ro,soft The following example shows how to mount the root (/) file system on a loopback mount point, /tmp/newroot. LOFS file systems must always be mounted after the file systems that are in the LOFS file system. #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # / - /tmp/newroot lofs - yes - How to Mount a File System (/etc/vfstab File)
The following example shows how to mount the /usr/dist file system that is listed in the /etc/vfstab file. # mount /usr/distExample 19-4 Mounting All File Systems (/etc/vfstab File) The following example shows the messages that are displayed when you use the mountall command and the file systems are already mounted. # mountall /dev/rdsk/c0t0d0s7 already mounted mount: /tmp already mounted mount: /dev/dsk/c0t0d0s7 is already mounted, /export/home is busy, or the allowable number of mount points has been exceeded When using the mountall command, all the file systems with a device to fsck entry are checked and fixed, if necessary, before they are mounted. The following example shows how to mount all the local systems that are listed in the /etc/vfstab file. # mountall -l # mount / on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/xattr/onerror=... /devices on /devices read/write/setuid/dev=46c0000 on Thu Sep ... /system/contract on ctfs read/write/setuid/devices/dev=43c0001 ... /usr on /dev/dsk/c0t0d0s6 read/write/setuid/intr/largefiles/xattr/... /proc on /proc read/write/setuid/dev=4700000 on Thu Sep 2 ... /etc/mnttab on mnttab read/write/setuid/dev=47c0000 on Thu Sep 2 ... /etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4480001 ... /system/object on objfs read/write/setuid/devices/dev=44c0001 ... /dev/fd on fd read/write/setuid/dev=4800000 on Thu Sep 2 ... /var/run on swap read/write/setuid/xattr/dev=1 on Thu Sep 2 ... /tmp on swap read/write/setuid/xattr/dev=2 on Thu Sep 2 ... /stuff on /dev/dsk/c0t0d0s5 read/write/setuid/intr/largefiles/xattr... /export/home on /dev/dsk/c0t0d0s7 read/write/setuid/intr/largefiles/... The following example shows how to mount all the remote file systems that are listed in the /etc/vfstab file. # mountall -r # mount / on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/xattr/onerror=... /devices on /devices read/write/setuid/dev=46c0000 on Thu Sep ... /system/contract on ctfs read/write/setuid/devices/dev=43c0001 ... /usr on /dev/dsk/c0t0d0s6 read/write/setuid/intr/largefiles/xattr/... /proc on /proc read/write/setuid/dev=4700000 on Thu Sep 2 ... /etc/mnttab on mnttab read/write/setuid/dev=47c0000 on Thu Sep 2 ... /etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4480001 ... /system/object on objfs read/write/setuid/devices/dev=44c0001 ... /dev/fd on fd read/write/setuid/dev=4800000 on Thu Sep 2 ... /var/run on swap read/write/setuid/xattr/dev=1 on Thu Sep 2 ... /tmp on swap read/write/setuid/xattr/dev=2 on Thu Sep 2 ... /stuff on /dev/dsk/c0t0d0s5 read/write/setuid/intr/largefiles/xattr... /stuff on /dev/dsk/c0t0d0s5 read/write/setuid/intr/largefiles/xattr... /export/home on /dev/dsk/c0t0d0s7 read/write/setuid/intr/largefiles/... /home/rimmer on pluto:/export/home/rimmer remote/read/write/setuid/xattr/... How to Mount a UFS File System (mount Command)
The following example shows how to mount /dev/dsk/c0t3d0s7 on the /files1 directory. # mount /dev/dsk/c0t3d0s7 /files1 How to Mount a UFS File System Without Large Files (mount Command)When you mount a file system, the largefiles option is selected by default. This option enables you to create files larger than 2 Gbytes. Once a file system contains large files, you cannot remount the file system with the nolargefiles option or mount it on a system that is running Solaris 2.6 or compatible versions, until you remove any large files and run the fsck command to reset the state to nolargefiles. This procedure assumes that the file system is in the /etc/vfstab file.
The following example shows how to check the /datab file system and remount it with the nolargefiles option. # cd /datab # find . -xdev -size +20000000 -exec ls -l {} \; # umount /datab # fsck /datab # mount -o nolargefiles /datab How to Mount an NFS File System (mount Command)
The following example shows how to mount the /export/packages directory on /mnt from the server pluto. # mount -F nfs pluto:/export/packages /mnt x86: How to Mount a PCFS (DOS) File System From a Hard Disk (mount Command)Use the following procedure to mount a PCFS (DOS) file system from a hard disk.
The following example shows how to mount the logical drive in the primary DOS slice on the /pcfs/c directory. # mount -F pcfs /dev/dsk/c0t0d0p0:c /pcfs/c The following example shows how to mount read-only the first logical drive in the extended DOS slice on the /mnt directory. # mount -F pcfs -o ro /dev/dsk/c0t0d0p0:2 /mnt |
||
|