- 论坛徽章:
- 0
|
VTOC的理解和修复
磁盘的Label(VTOC)信息是存在磁盘的第一个Sector(512Byte)中。
VTOC中存放的信息有:
磁盘的逻辑分区信息;
磁盘的物理参数(geometry);
访问特性;
命名,等。
以上信息可以用命令[format], [format -> partition -> print], [prtvtoc]看得到。
# format
Searching for disks...done AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,4000/scsi@3/sd@0,0
1. c0t1d0 testing
/pci@1f,4000/scsi@3/sd@1,0
Specify disk (enter its number): 1
selecting c0t1d0
[disk formatted] partition> print
Current partition table (original):
Total disk cylinders available: 4924 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 2168 3.71GB (2169/0/0) 7788879
1 swap wu 2169 - 2753 1.00GB (585/0/0) 2100735
2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084
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 home wm 2754 - 4923 3.72GB (2170/0/0) 7792470 partition> ^DVTOC的信息可以用[dd]命令进行备份或复制: # dd if=/dev/rdsk/c0t1d0s2 of=c0t1d0_label.dat bs=512 count=1
1+0 records in
1+0 records out
#
# ls -log c0t1d0_label.dat -rw-r--r-- 1 512 Feb 29 18:18 c0t1d0_label.dat 另外,用[format -> backup]可以尝试修复受损的VTOC。 FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
format> backup
Disk has a primary label, still continue? y
Searching for backup labels...found.
Restoring primary label. - 这是因为在进行磁盘的Label的时候系统自动地备份一份到特定的区域(reserved cylinders)。 - END -
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/56536/showart_1271810.html |
|