Solaris - Disk Formating
1. Login as root user
2. configure the /devices directory
shell> drvconfig
3. creates /dev entries for hard disks attached to the system
shell> disks
4. fdisk
shell> fdisks /dev/rdsk/c0d0p0
No fdisk table exists. The default partition for the disk is:
? a 100% “SOLARIS System” partition
Type “y” to accept the default partition, otherwise type “n” to edit the partition table.
y
5. format
shell> format
Searching for disks…done
AVAILABLE DISK SELECTIONS:
0. c0d0
1. c1t6d0
Specify disk (enter its number): 0
selecting c0d0
Controller working list found
[disk formatted, defect list found]
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
fdisk - run the fdisk program
repair - repair a defective sector
show - translate a disk address
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
volname - set 8-character volume name
!
quit
6. Partition
format> partition
PARTITION MENU:
0 - change `0′ partition
1 - change `1′ partition
2 - change `2′ partition
3 - change `3′ 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
!
quit
partition>print
Total disk cylinders available: 25229 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 25228 12.13GB (25229/0/0) 25430832
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 usr wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0)
partition> 0 ( No change for 2, 8, 9 )
Part Tag Flag Cylinders Size Blocks
0 root wm 0 0 (0/0/0) 0
Enter partition id tag[root]:
( Only use unassigned, boot, root, swap, usr, backup, stand, var, home, alternates )
Enter partition permission flags[wm]:
( wm - read-write, mountable,wu - read-write, unmountable,rm - read-only, mountable,ru - read-only, unmountable )
Enter new starting cyl[0]: 3 ( Cylinders 0 - 2 used by Part 8, 9, So start at 3 )
Enter partition size[0b, 0c, 0.00mb, 0.00gb]: ?
Expecting up to 25427808 blocks, 25226 cylinders, 12415.92 megabytes, or 12.12 gigabytes
Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 25427808b
partition> print
Current partition table (cyl):
Total disk cylinders available: 25229 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 25228 12.13GB (25226/0/0) 25427808
1 swap wu 0 0 (0/0/0) 0
2 backup wu 0 - 25228 12.13GB (25229/0/0) 25430832
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 usr wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0)
partition> label
Ready to label disk, continue? y
partition> quit
format> quit
shell> newfs /dev/rdsk/c0d0s0
newfs: construct a new file system /dev/rdsk/c0d0s0: (y/n)? y
/dev/rdsk/c0d0s0: 25427808 sectors in 25226 cylinders of 16 tracks, 63 sectors
12415.9MB in 287 cyl groups (88 c/g, 43.31MB/g, 5504 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 88800, 177568, 266336, 355104, 443872, 532640, 621408, 710176, 798944,
887712, 976480, ….
7. Mount /dev/rdsk/c0d0s0
shell> cd /mnt
shell> mkdir newhdd
Setting for /etc/vfstab
device to mount = /dev/dsk/c0d0s0
device to fsck = /dev/rdsk/c0d0s0
mount point = /mnt/newhd
FS type = ufs
fsck pass = 1
mount at boot = yes
mount options = -
shell> vi vfstab
/dev/dsk/c0d0s0/dev/rdsk/c0d0s0/mnt/newhdufs1yes-
shell> mount /mnt/newhd
Comments
Post a Comment