歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> 關於Unix

solaris中的lofiadm用法


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
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
Copyright © Linux教程網 All Rights Reserved