sky.zha 发表于 2013-2-7 13:07:22

solaris mount

How to MountFAT32 / FAT16 / NTFS /EXT2 / EXT3 on the Solaris



We often need to mount some File Systems on solaris to use the data that we stored with Windows system. Mounting the FAT32 / FAT16 File System is some easer than others, we mount them directly with their Hard Disk Information.

Above all, I want to introduce some knowledge about Hard Disk Information. You can type the command as below on one terminal:

#cd/dev/dsk

#ls

You can see some file with the name like c0d0p0、c0d0p1、c0d0p2、c0d0p3、c0d0p4, They indicate that the Hard Disk of yours.

c0d0p0for your entire Hard Disk

c0d0p1 – c0d0p4for the four primary partitions of your Hard Disk, of course, it may be less than four primary partitions.

As all of us know, we often store the data on the extended disk with partitioning it to D、E、F and so on, and how could we denote them?

We can indicate them with the sign as “c0d0p0:x”, there, “x” is for the sequence number of the FAT partition in your entire hard disk. So we can mount the FAT partition with the command as follow,

#mount –F pcfs/dev/dsk/c0d0p0:x   /mnt/x   

(x for a number or a character like “d”、“e”、“f” and so on)



If we want to mount other file systems, there are two software that wo should download first.

   1. download and install
          * FSWpart – print the partition information
            Download:wget http://www.belenix.org/binfiles/FSWpart.tar.gz
            Unzip:gunzip -c FSWpart.tar.gz | tar xf -
            Install:pkgadd -d . FSWpart
          * FSWfsmisc – support the NTFS and EXT2FS on OpenSolaris
            Download:wget http://www.belenix.org/binfiles/FSWfsmisc.tar.gz
            Unzip:gunzip -c FSWfsmisc.tar.gz | tar xf -
            Install:pkgadd -d . FSWfsmisc
   2. print the partition information
      type the command “prtpart” without any parameter to get the hard disk device name, like “c0d0p0”.

# prtpart

Fdisk information for device /dev/rdsk/c0d0p0

Block Size : 512 bytes
Controller : ide
Disk       : cmdk
Capacity   : 93 GB

#start block# nblocks    startCylSecHd endCylSecHd   OSType
1: 0000000063   0102398247   0/ 1/ 1    ff/ff/fe      IFS: NTFS
2: 0102398310   0092952090    ff/ff/fe    ff/ff/fe      Solaris x86

这里磁盘的ID是c0d0p0,再运行如下命令以打印所有的逻辑设备和分区类型

We can see that the hard disk name is 0d0p0, and than we type the below command to get all the logical devices and partition types.

# prtpart /dev/rdsk/c0d0p0 -ldevs

Fdisk information for device /dev/rdsk/c0d0p0

** NOTE **
/dev/dsk/c0d0p0      - Physical device referring to entire physical disk
/dev/dsk/c0d0p1 - p4 - Physical devices referring to the 4 primary partitions
/dev/dsk/c0d0p5 ...- Virtual devices referring to logical partitions

Virtual device names can be used to access EXT2 and NTFS on logical partitions

/dev/dsk/c0d0p1 IFS: NTFS
/dev/dsk/c0d0p2 Solaris x86



   3. Mount NTFS partiton

# mount -F ntfs /dev/dsk/c0d0p1 /Windows

Mount Ext2 / Ext3

# mount -F ext2fs /dev/dsk/c0d0p<number> /Linux

(Pay attention to that,the NTFS / EXT2 / EXT3 file system that be mounted only can be read.)

Mount FAT32 / FAT16

# mount -F pcfs /dev/dsk/c0d0p<number> /Windows



   4. Umount partitions
      print the mount information

# xlsmounts
PHYSICAL DEVICE               LOGICAL DEVICE      FS    PID         ADDR Mounted on
/dev/dsk/c0d0p1                /dev/dsk/c0d0p1    ntfs   1118127.0.0.1:/ /Windows

Umount

# xumount /Windows
页: [1]
查看完整版本: solaris mount