分类:
2008-03-12 21:49:13
1.挂载一个iso文件:
#lofiadm -a /export/home/sol_10_807_x86.iso
/dev/lofi/1
使用lofiadm查看:
# lofiadm
Block Device File
/dev/lofi/1 /export/home/sol_10_807_x86.iso
# lofiadm /dev/lofi/1
/export/home/sol_10_807_x86.iso
挂载:
# mount -F hsfs -o ro /dev/lofi/1 /mnt
# df -h
Filesystem size used avail capacity Mounted on
/dev/lofi/1 2.5G 2.5G 0K 100% /mnt
# ls /mnt
Copyright License boot
JDS-THIRDPARTYLICENSEREADME Solaris_10 installer
卸载:
# umount /mnt
# lofiadm -d /dev/lofi/1
# lofiadm
Block Device File
...
2.在一个文件上创建一个UFS文件系统:
创建一个指定大小的文件:
# mkfile 50m /export/home/test
# lofiadm -a /export/home/test
Block Device File
/dev/lofi/1 /export/home/test
使用newfs创建文件系统:
#newfs /dev/lofi/1
newfs: construct a new file system /dev/rlofi/1: (y/n)? y
/dev/rlofi/1: 102340 sectors in 170 cylinders of 1 tracks, 602 sectors
50.0MB in 11 cyl groups (16 c/g, 4.70MB/g, 2240 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 9664, 19296, 28928, 38560, 48192, 57824, 67456, 77088, 86720,
96352
挂载:
# mount /dev/lofi/1 /tools/
# df
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 7.7G 4.2G 3.4G 56% /
/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 996M 876K 995M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
7.7G 4.2G 3.4G 56% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 995M 44K 995M 1% /tmp
swap 995M 28K 995M 1% /var/run
/dev/dsk/c0d0s3 945M 51M 837M 6% /export/home
/vol/dev/dsk/c1t0d0/sol_10_807_x86
2.5G 2.5G 0K 100% /cdrom/sol_10_807_x86
/dev/lofi/1 47M 1.0M 41M 3% /tools
#cd /tools/
#ls
lost+found
卸载:
# umount /mnt
# lofiadm -d /dev/lofi/1