- 挂载U盘到solaris上
网上关于挂载硬盘/U盘到solaris10的方法很多,但自己实际动手做才发现还是有很多技巧在里面的。
首先,硬盘很少有FAT/FAT32的,做IT的自己的移动硬盘,装的不是苍老师,就是IT的杂乱资料收集。所以,如果要上传某个零时比较大的资料到solaris上,建议用U盘(如果非要挂载移动硬盘上solaris去,那你就自己格式化移动硬盘,然后按照挂载U盘的方法挂载也是一样)
其次,关于挂载方法我总结如下:
多了一个90c.100和一个mass-storage0
这个时候说明solaris已经识别出来了磁盘mass-storage0,但是也很奇怪为什么多了一个90c.1000这个文件
这可以看到我们的设备名称链接到的各个实体设备上的情况。
最后一节我们看到c2t0d0s0对应这我们在/dev/usb里面看到的情况。
1)挂载前查看/dev/usb情况如下
- root@DNS03 # ls
- hub0 hub1 hub2
2)挂载后查看/dev/usb情况如下
- root@DNS03 # ls
- 90c.1000 hub0 hub1 hub2 mass-storage0
- root@DNS03 # ls -lh
- 总数 10
- drwxr-xr-x 3 root root 512 2月 23日 20:08 90c.1000
- lrwxrwxrwx 1 root root 50 2010 1月 5 hub0 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5:hubd
- lrwxrwxrwx 1 root root 50 2010 1月 5 hub1 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@6:hubd
- lrwxrwxrwx 1 root root 56 2010 1月 5 hub2 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@6/hub@1:hubd
- lrwxrwxrwx 1 root root 64 2月 23日 20:08 mass-storage0 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1:scsa2usb
- root@DNS03 # cd 90c.1000
- root@DNS03 # ls
- 0
- root@DNS03 # ls -lh
- 总数 2
- drwxr-xr-x 2 root root 512 2月 23日 20:08 0
3)最重要的挂载情况
a)我们查看/dev/dsk情况如下
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s0 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:a
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s1 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:b
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s2 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:c
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s3 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:d
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s4 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:e
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s5 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:f
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s6 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:g
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t0d0s7 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@0,0:h
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s0 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:a
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s1 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:b
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s2 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:c
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s3 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:d
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s4 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:e
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s5 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:f
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s6 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:g
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t1d0s7 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@1,0:h
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s0 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:a
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s1 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:b
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s2 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:c
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s3 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:d
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s4 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:e
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s5 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:f
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s6 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:g
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t2d0s7 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@2,0:h
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s0 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:a
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s1 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:b
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s2 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:c
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s3 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:d
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s4 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:e
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s5 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:f
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s6 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:g
- lrwxrwxrwx 1 root root 49 2010 1月 5 c0t3d0s7 -> ../../devices/pci@780/pci@0/pci@9/scsi@0/sd@3,0:h
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s0 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:a
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s1 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:b
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s2 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:c
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s3 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:d
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s4 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:e
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s5 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:f
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s6 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:g
- lrwxrwxrwx 1 root root 54 2010 1月 5 c1t0d0s7 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/ide@8/sd@0,0:h
b)挂载设备上去。
我们查看man mount发现-F参数信息如下:
- -F FSType
- Used to specify the FSType on which to operate. The
- FSType must be specified or must be determinable from
- /etc/vfstab, or by consulting /etc/default/fs or
- /etc/dfs/fstypes.
但是去/etc/default/fs查看,结果只有
- root@DNS03 # more /etc/default/fs
- LOCAL=ufs
所以要用-F pcfs参数
root@DNS03 # mount -F pcfs /dev/dsk/c2t0d0s0 /mnt
mount: /dev/dsk/c2t0d0s2 is not a DOS filesystem.
如上,在不加":c"的情况下,会出现“mount: /dev/dsk/c2t0d0s0 is not a DOS filesystem.”的提示,所以“:c”应该就是指的挂载磁盘的那个顺序,如果挂碍的磁盘有多个分区,就依次用":d",":e"了。这一点从ls -l /dev/dsk可以看到
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s0 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:a
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s1 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:b
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s2 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:c
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s3 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:d
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s4 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:e
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s5 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:f
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s6 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:g
- lrwxrwxrwx 1 root root 66 2月 23日 20:08 c2t0d0s7 -> ../../devices/pci@7c0/pci@0/pci@1/pci@0/usb@5/storage@1/disk@0,0:h
c)所以,安装正确的方法输入mount -F pcfs /dev/dsk/c2t0d0s0:c /mnt提示挂载成功;
- root@DNS03 # mount -F pcfs /dev/dsk/c2t0d0s0:c /mnt
- 文件系统 大小 用了 可用 容量 挂接在
- /dev/md/dsk/d10 9.6G 534M 9.0G 6% /
- /devices 0K 0K 0K 0% /devices
- ctfs 0K 0K 0K 0% /system/contract
- proc 0K 0K 0K 0% /proc
- mnttab 0K 0K 0K 0% /etc/mnttab
- swap 28G 1.5M 28G 1% /etc/svc/volatile
- objfs 0K 0K 0K 0% /system/object
- sharefs 0K 0K 0K 0% /etc/dfs/sharetab
- /dev/dsk/c2t0d0s0:c 3.7G 2.3G 1.5G 61% /mnt
- 挂载ISO文件到solaris下
lofiadm -a /tmp/eis*iso
mount -F hsfs /dev/lofi/1 /mnt
转载于:https://blog.51cto.com/alexy/1035477