在下列情況中使用 newfs 指令建立 UFS 檔案系統可能會失敗:
磁碟片段大小過小 (約小於 4 MB)。
磁碟大小超過 8 GB。
造成此錯誤是因為需要大量的中介資料檔案系統。螢幕上會顯示以下警告訊息:
Warning: inode blocks/cyl group (295) >= data blocks (294) in last
cylinder group. This implies 4712 sector(s) cannot be allocated.
/dev/rdsk/c0t0d0s6: 0 sectors in 0 cylinders of 48 tracks, 128 sectors
0.0MB in 0 cyl groups (13 c/g, 39.00MB/g, 18624 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
#
|
解決方法:請以超級使用者身份執行下列任一解決方法:
解決方法 1:使用 newfs 指令時請指定磁軌數。請執行以下步驟。
使用 format 指令找出要指定的磁軌數。例如:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
/pci@1f,4000/scsi@3/sd@0,0
Specify disk (enter its number):
|
此範例的磁軌數為 19。
將此數字指定至使用 newfs 指令建立的檔案系統。例如:
# newfs -v -t 19 /dev/dsk/c0t0d0s6
newfs: construct a new file system /dev/rdsk/c0t0d0s6: (y/n)? y
mkfs -F ufs /dev/rdsk/c0t0d0s6 4712 -1 19 8192 1024 16 10 167 2048
t 0 -1 8 128 n
mkfs: bad value for nsect: -1 must be between 1 and 32768
mkfs: nsect reset to default 32
Warning: 152 sector(s) in last cylinder unallocated
/dev/rdsk/c0t0d0s6: 4712 sectors in 8 cylinders of 19 tracks,
32 sectors
2.3MB in 1 cyl groups (16 c/g, 4.75MB/g, 2304 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32,
#
|
解決方法 2:請指定 newfs 指令中每個 I 節點的位元組數 (nbpi),以降低檔案系統中的 I 節點密度。例如:
# newfs -i 4096 /dev/dsk/c0t0d0s6
newfs: construct a new file system /dev/rdsk/c0t0d0s6: (y/n)? y
Warning: 1432 sector(s) in last cylinder unallocated
/dev/rdsk/c0t0d0s6: 4712 sectors in 1 cylinders of 48 tracks,
128 sectors
2.3MB in 1 cyl groups (16 c/g, 48.00MB/g, 11648 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32,
#
|