solaris硬盘格式化分区

在root用户下输入format命令:

root@lnltedmr-tds:~# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c1t0d0 <LSI-MR9261-8i-2.12-557.86GB>
/pci@0,0/pci8086,3c0a@3,2/pci1000,9263@0/sd@0,0
1. c1t1d0 <LSI-MR9261-8i-2.12-2.72TB>
/pci@0,0/pci8086,3c0a@3,2/pci1000,9263@0/sd@1,0
Specify disk (enter its number): 0  ————选择0号磁盘
selecting c1t0d0 <LSI-MR9261-8i-2.12-557.86GB>
[disk formatted]
/dev/dsk/c1t0d0s1 is part of active ZFS pool rpool. Please see zpool(8).  ——————format程序告诉你这块逻辑盘属于ZFS文件系统


FORMAT MENU:  ————————列出format>下的子命令
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
fdisk - run the fdisk program
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
inquiry - show disk ID
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> fdisk  ————————执行fdisk创建分区(partition是选择分区)

Total disk size is 36412 cylinders
Cylinder size is 32130 (512 byte) blocks

Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 EFI 0 36412 36413 100


SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Edit/View extended partitions
6. Exit (update disk configuration and exit)
7. Cancel (exit without updating disk configuration)
Enter Selection: 7

format> partition    ——————选择分区


PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print    ——————打印分区
Current partition table (original):
Total disk sectors available: 5849583549 + 16384 (reserved sectors)

Part Tag Flag First Sector Size Last Sector
0 usr wm 34 2.72TB 5849583582
1 unassigned wm 0 0 0
2 unassigned wm 0 0 0
3 unassigned wm 0 0 0
4 unassigned wm 0 0 0
5 unassigned wm 0 0 0
6 unassigned wm 0 0 0
8 reserved wm 5849583583 8.00MB 5849599966

partition>

# format
Specify disk (enter its number): 1
format> fdisk    
Type "y" to accept the default partition, otherwise type "n" to edit the partition table. n
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Edit/View extended partitions
6. Exit (update disk configuration and exit)
7. Cancel (exit without updating disk configuration)
Enter Selection: 1    ————创建分区
Select the partition type to create:
1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other 5=DOS12
6=DOS16 7=DOSEXT 8=DOSBIG 9=DOS16LBA A=x86 Boot
B=Diagnostic C=FAT32 D=FAT32LBA E=DOSEXTLBA F=EFI (Protective)
G=EFI_SYS 0=Exit?
F
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Edit/View extended partitions
6. Exit (update disk configuration and exit)
7. Cancel (exit without updating disk configuration)
Enter Selection: 6    ————保持分区配置并退出

猜你喜欢

转载自www.cnblogs.com/wangziyi0513/p/10841431.html