- 论坛徽章:
- 0
|
无聊时做的小实验,各位可以试试.
先给硬盘建一个分区如下:
Current partition table (original):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition>
partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 128mb
partition> p
Current partition table (unnamed):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 3 128.00MB (4/0/0) 262144
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> l
Ready to label disk, continue? y
partition> q
newfs /dev/rdsk/c3t1d1s0
挂起来:
newfs: /dev/rdsk/c3t1d1s0 last mounted as /test
newfs: construct a new file system /dev/rdsk/c3t1d1s0: (y/n)? y
/dev/rdsk/c3t1d1s0: 262144 sectors in 4 cylinders of 32 tracks, 2048 sectors
128.0MB in 4 cyl groups (1 c/g, 32.00MB/g, 15040 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 67616, 135200, 202784,
mkdir /test
mount /dev/dsk/c3t1d1s1 /test
df -h /test
Filesystem size used avail capacity Mounted on
/dev/dsk/c3t1d1s0 121M 1.0M 108M 1% /test
df -o i /test
Filesystem iused ifree %iused Mounted on
/dev/dsk/c3t1d1s0 4 60156 0% /test
mkfile 64m /test/testfile
ls -l /test/testfile
-rw------T 1 root other 67108864 Apr 6 15:28 /test/testfile
df -o i /test
Filesystem iused ifree %iused Mounted on
/dev/dsk/c3t1d1s0 5 60155 0% /test
改下slice0的大小
Current partition table (original):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 3 128.00MB (4/0/0) 262144
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 3 128.00MB (4/0/0) 262144
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[262144b, 4c, 3e, 128.00mb, 0.12gb]: 256mb
partition> p
Current partition table (unnamed):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 7 256.00MB (8/0/0) 524288
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> l
Ready to label disk, continue? y
partition> q
/usr/lib/fs/ufs/mkfs -G -M /test /dev/rdsk/c3t1d1s0 524288
/dev/rdsk/c3t1d1s0: 524288 sectors in 8 cylinders of 32 tracks, 2048 sectors
256.0MB in 8 cyl groups (1 c/g, 32.00MB/g, 15040 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 67616, 135200, 202784, 270368, 337952, 405536, 473120,
再查下大小,呵呵,变了,文件也没问题。
df -h /test
Filesystem size used avail capacity Mounted on
/dev/dsk/c3t1d1s0 241M 65M 164M 29% /test
df -o i /test
Filesystem iused ifree %iused Mounted on
/dev/dsk/c3t1d1s0 5 120315 0% /test
ls -l /test/testfile
-rw------T 1 root other 67108864 Apr 6 15:28 /test/testfile
又试了一次,也没问题.
Current partition table (original):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 7 256.00MB (8/0/0) 524288
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 7 256.00MB (8/0/0) 524288
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[524288b, 8c, 7e, 256.00mb, 0.25gb]: 512mb
partition> p
Current partition table (unnamed):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 15 512.00MB (16/0/0) 1048576
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> l
Ready to label disk, continue? Y
/usr/lib/fs/ufs/mkfs -G -M /test /dev/rdsk/c3t1d1s0 1048576
/dev/rdsk/c3t1d1s0: 1048576 sectors in 16 cylinders of 32 tracks, 2048 sectors
512.0MB in 16 cyl groups (1 c/g, 32.00MB/g, 15040 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 67616, 135200, 202784, 270368, 337952, 405536, 473120, 540704, 608288,
675872, 743456, 811040, 878624, 946208, 1013792,
df -h /test
Filesystem size used avail capacity Mounted on
/dev/dsk/c3t1d1s0 482M 65M 405M 14% /test
呵呵,不过有个问题,在slice 0下面再创一个分区slice 3,slice0下面还有自由空间也不能扩展文件系统了,虽然照着提示做了fsck和lockfs也还是不行。删了slice3后也还是不行。再把整个disk重新化分区,又可以扩展了。
format> verify
Primary label contents:
Volume name = < >
ascii name = <IQSTOR-IQ1200_1D3_V0021-5012 cyl 812 alt 2 hd 32 sec 2048>
pcyl = 814
ncyl = 812
acyl = 2
nhead = 32
nsect = 2048
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 31 1024.00MB (32/0/0) 2097152
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 400 - 407 256.00MB (8/0/0) 524288
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
format> q
icilszx06:root / 35 > /usr/lib/fs/ufs/mkfs -G -M /test /dev/rdsk/c3t1d1s0 2097152
inode blocks/cyl group (92248 >= data blocks (4096)
number of cylinders per cylinder group (1) must be increased.
Note that cgsize may have been adjusted to allow struct cg to fit.
Filesystem is currently inconsistent. It must be repaired with fsck(1M)
before being used. Use the following command to do this:
fsck /dev/rdsk/c3t1d1s0
You will be told that the filesystem is already mounted, and asked if you
wish to continue. Answer `yes' to this question.
One problem should be reported, that the summary information is bad.
You will then be asked if it should be salvaged. Answer `yes' to
this question.
The filesystem is currently mounted read-only and write-locked. After
running fsck, unlock the filesystem and re-enable writing with
the following command:
lockfs -u /test
partition> p
Current partition table (unnamed):
Total disk cylinders available: 812 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 31 1024.00MB (32/0/0) 2097152
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 811 25.38GB (812/0/0) 53215232
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
partition> l
Ready to label disk, continue? y
partition> q
/usr/lib/fs/ufs/mkfs -G -M /test /dev/rdsk/c3t1d1s0 2097152
/test: Invalid argument
[ 本帖最后由 solaris10_x86 于 2006-4-6 16:28 编辑 ] |
|