刚开始学习Solaris,错漏之处,望指教
基本步骤:
1)关闭机器,接上硬盘
2)devfsadm
3)format记下认识出来的cXdX
4)format->fdisk->partition生成需要的分区(记得保存)
5)newfs 记得此时设备名称中的s要与上面生成的partition对应
6)建立必要的目录然后挂上?
===========================================================================================================
下面是第一块磁盘的信息:
bash-2.05# prtvtoc /dev/rdsk/c0d0s0
* /dev/rdsk/c0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 15 tracks/cylinder
* 945 sectors/cylinder
* 24388 cylinders
* 24386 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 23043825 945 23044769
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 2835 1434510 1437344 /
1 7 00 1437345 1229445 2666789 /var
3 3 01 2666790 1206765 3873554
5 0 00 3873555 14049315 17922869 /opt
6 4 00 17922870 4096575 22019444 /usr
7 8 00 22019445 1024380 23043824 /export/home
8 1 01 0 945 944
9 9 01 945 1890 2834
partition> print
Current partition table (original):
Total disk cylinders available: 24386 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 1520 700.44MB (1518/0/0) 1434510
1 var wm 1521 - 2821 600.31MB (1301/0/0) 1229445
2 backup wm 0 0 (0/0/0) 0
3 swap wu 2822 - 4098 589.24MB (1277/0/0) 1206765
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 4099 - 18965 6.70GB (14867/0/0) 14049315
6 usr wm 18966 - 23300 1.95GB (4335/0/0) 4096575
7 home wm 23301 - 24384 500.19MB (1084/0/0) 1024380
8 boot wu 0 - 0 0.46MB (1/0/0) 945
9 alternates wu 1 - 2 0.92MB (2/0/0) 1890
下面增加第二个硬盘:
SunOS 5.9
login: root
Password:
Last login: Sat Jul 3 17:23:22 from :0
Sun Microsystems Inc. SunOS 5.9 Generic January 2003
# bash
bash-2.05# devfsadm
bash-2.05# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c0d1
/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
Specify disk (enter its number): 1
selecting c0d1
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
! - execute , then return
quit
format> partition
Please run fdisk first.
format> fdisk
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
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
7 - change `7' 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
! - execute , then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 8319 + 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 - 8319 4.00GB (8320/0/0) 8386560
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: root
Enter partition permission flags[wm]: wm
Enter new starting cyl[3]:
Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: 400mb
partition> print
Current partition table (unnamed):
Total disk cylinders available: 8319 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 815 400.15MB (813/0/0) 819504
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 8319 4.00GB (8320/0/0) 8386560
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> 1
Part Tag Flag Cylinders Size Blocks
1 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: swap
Enter partition permission flags[wm]: wu
Enter new starting cyl[3]: 816
Enter partition size[0b, 0c, 816e, 0.00mb, 0.00gb]: 100mb
partition> print
Current partition table (unnamed):
Total disk cylinders available: 8319 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 815 400.15MB (813/0/0) 819504
1 swap wu 816 - 1019 100.41MB (204/0/0) 205632
2 backup wu 0 - 8319 4.00GB (8320/0/0) 8386560
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> 3
Part Tag Flag Cylinders Size Blocks
3 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: ?
Expecting one of the following: (abbreviations ok):
unassigned boot root swap
usr backup stand var
home alternates reserved
Enter partition id tag[unassigned]: home
Enter partition permission flags[wm]:
Enter new starting cyl[3]: 1020
Enter partition size[0b, 0c, 1020e, 0.00mb, 0.00gb]: $
partition> print
Current partition table (unnamed):
Total disk cylinders available: 8319 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 815 400.15MB (813/0/0) 819504
1 swap wu 816 - 1019 100.41MB (204/0/0) 205632
2 backup wu 0 - 8319 4.00GB (8320/0/0) 8386560
3 home wm 1020 - 8318 3.51GB (7299/0/0) 7357392
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> label
Ready to label disk, continue? y
partition> name
Enter table name (remember quotes): diskmy
partition> quit
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
! - execute , then return
quit
format> save
Saving new disk and partition definitions
Enter file name["./format.dat"]:
format> save
Saving new disk and partition definitions
Enter file name["./format.dat"]: /etc/format.dat
format> quit
bash-2.05# prtvtoc /dev/rdsk/c0d1s0
* /dev/rdsk/c0d1s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 8321 cylinders
* 8319 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 3024 819504 822527
1 3 01 822528 205632 1028159
2 5 01 0 8385552 8385551
3 8 00 1028160 7357392 8385551
8 1 01 0 1008 1007
9 9 00 1008 2016 3023
bash-2.05# newfs /dev/rdsk/c0d1s0
newfs: construct a new file system /dev/rdsk/c0d1s0: (y/n)? y
/dev/rdsk/c0d1s0: 819504 sectors in 813 cylinders of 16 tracks, 63 sectors
400.1MB in 51 cyl groups (16 c/g, 7.88MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568, 145760,
661856, 678048, 694240, 710432, 726624, 742816, 759008, 774176, 790368,
806560,
bash-2.05# newfs /dev/rdsk/c0d1s1
newfs: construct a new file system /dev/rdsk/c0d1s1: (y/n)? y
/dev/rdsk/c0d1s1: 205632 sectors in 204 cylinders of 16 tracks, 63 sectors
100.4MB in 13 cyl groups (16 c/g, 7.88MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568, 145760,
161952, 178144, 194336,
bash-2.05# newfs /dev/rdsk/c0d1s3
newfs: construct a new file system /dev/rdsk/c0d1s3: (y/n)? y
/dev/rdsk/c0d1s3: 7357392 sectors in 7299 cylinders of 16 tracks, 63 sectors
3592.5MB in 83 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,
6476000, 6564768, 6653536, 6742304, 6831072, 6919840, 7008608, 7096352,
7185120, 7273888,
bash-2.05# mount /dev/dsk/c0d1s0 /disk2root
bash-2.05# mount /dev/dsk/c0d1s1 /disk2swap
bash-2.05# mount /dev/dsk/c0d1s3 /disk2home
bash-2.05# fstyp -v /dev/rdsk/c0d1s0 | head -10
ufs
magic 11954 format dynamic time Sat Jul 3 17:34:08 2004
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 51 size 409752 blocks 384847
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
Broken Pipe
Unknown_fstyp (no matches)
bash-2.05# prtvtoc /dev/rdsk/c0d1s0
* /dev/rdsk/c0d1s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 8321 cylinders
* 8319 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 3024 819504 822527 /disk2root
1 3 01 822528 205632 1028159 /disk2swap
2 5 01 0 8385552 8385551
3 8 00 1028160 7357392 8385551 /disk2home
8 1 01 0 1008 1007
9 9 00 1008 2016 3023
bash-2.05# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 657M 65M 533M 11% /
/dev/dsk/c0d0s6 1.9G 1.3G 530M 72% /usr
/dev/dsk/c0d0p0:boot 10M 1.5M 8.5M 16% /boot
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0d0s1 563M 65M 442M 13% /var
swap 759M 24K 759M 1% /var/run
swap 759M 4K 759M 1% /tmp
/dev/dsk/c0d0s5 6.6G 613M 5.9G 10% /opt
/dev/dsk/c0d0s7 469M 9K 422M 1% /export/home
/dev/dsk/c0d1s0 376M 9K 338M 1% /disk2root
/dev/dsk/c0d1s1 94M 9K 85M 1% /disk2swap
/dev/dsk/c0d1s3 3.5G 9K 3.4G 1% /disk2home
bash-2.05# mount
/ on /dev/dsk/c0d0s0 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980000 on Sat Jul 3 17:22:39 2004
/usr on /dev/dsk/c0d0s6 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980006 on Sat Jul 3 17:22:40 2004
/boot on /dev/dsk/c0d0p0:boot read/write/setuid/nohidden/nofoldcase/dev=19a3010 on Sat Jul 3 17:22:37 2004
/proc on /proc read/write/setuid/dev=2e80000 on Sat Jul 3 17:22:39 2004
/etc/mnttab on mnttab read/write/setuid/dev=2f40000 on Sat Jul 3 17:22:39 2004
/dev/fd on fd read/write/setuid/dev=2f80000 on Sat Jul 3 17:22:40 2004
/var on /dev/dsk/c0d0s1 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980001 on Sat Jul 3 17:22:42 2004
/var/run on swap read/write/setuid/xattr/dev=1 on Sat Jul 3 17:22:42 2004
/tmp on swap read/write/setuid/xattr/dev=2 on Sat Jul 3 17:22:44 2004
/opt on /dev/dsk/c0d0s5 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980005 on Sat Jul 3 17:22:44 2004
/export/home on /dev/dsk/c0d0s7 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980007 on Sat Jul 3 17:22:44 2004
/disk2root on /dev/dsk/c0d1s0 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980040 on Sat Jul 3 17:33:35 2004
/disk2swap on /dev/dsk/c0d1s1 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980041 on Sat Jul 3 17:33:45 2004
/disk2home on /dev/dsk/c0d1s3 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980043 on Sat Jul 3 17:33:52 2004
bash-2.05#
将下面的内容添加到/etc/vfstab中即可实现自动挂载
/dev/dsk/c0d1s0 /dev/rdsk/c0d1s0 /disk2root ufs 1 yes logging
对其它对应的分区挂载即可
基本步骤:
1)关闭机器,接上硬盘
2)devfsadm
3)format记下认识出来的cXdX
4)format->fdisk->partition生成需要的分区(记得保存)
5)newfs 记得此时设备名称中的s要与上面生成的partition对应
6)建立必要的目录然后挂上?
===========================================================================================================
下面是第一块磁盘的信息:
bash-2.05# prtvtoc /dev/rdsk/c0d0s0
* /dev/rdsk/c0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 15 tracks/cylinder
* 945 sectors/cylinder
* 24388 cylinders
* 24386 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 23043825 945 23044769
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 2835 1434510 1437344 /
1 7 00 1437345 1229445 2666789 /var
3 3 01 2666790 1206765 3873554
5 0 00 3873555 14049315 17922869 /opt
6 4 00 17922870 4096575 22019444 /usr
7 8 00 22019445 1024380 23043824 /export/home
8 1 01 0 945 944
9 9 01 945 1890 2834
partition> print
Current partition table (original):
Total disk cylinders available: 24386 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 1520 700.44MB (1518/0/0) 1434510
1 var wm 1521 - 2821 600.31MB (1301/0/0) 1229445
2 backup wm 0 0 (0/0/0) 0
3 swap wu 2822 - 4098 589.24MB (1277/0/0) 1206765
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 4099 - 18965 6.70GB (14867/0/0) 14049315
6 usr wm 18966 - 23300 1.95GB (4335/0/0) 4096575
7 home wm 23301 - 24384 500.19MB (1084/0/0) 1024380
8 boot wu 0 - 0 0.46MB (1/0/0) 945
9 alternates wu 1 - 2 0.92MB (2/0/0) 1890
下面增加第二个硬盘:
SunOS 5.9
login: root
Password:
Last login: Sat Jul 3 17:23:22 from :0
Sun Microsystems Inc. SunOS 5.9 Generic January 2003
# bash
bash-2.05# devfsadm
bash-2.05# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c0d1
/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0
Specify disk (enter its number): 1
selecting c0d1
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
! - execute , then return
quit
format> partition
Please run fdisk first.
format> fdisk
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
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
7 - change `7' 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
! - execute , then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 8319 + 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 - 8319 4.00GB (8320/0/0) 8386560
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: root
Enter partition permission flags[wm]: wm
Enter new starting cyl[3]:
Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: 400mb
partition> print
Current partition table (unnamed):
Total disk cylinders available: 8319 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 815 400.15MB (813/0/0) 819504
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 8319 4.00GB (8320/0/0) 8386560
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> 1
Part Tag Flag Cylinders Size Blocks
1 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: swap
Enter partition permission flags[wm]: wu
Enter new starting cyl[3]: 816
Enter partition size[0b, 0c, 816e, 0.00mb, 0.00gb]: 100mb
partition> print
Current partition table (unnamed):
Total disk cylinders available: 8319 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 815 400.15MB (813/0/0) 819504
1 swap wu 816 - 1019 100.41MB (204/0/0) 205632
2 backup wu 0 - 8319 4.00GB (8320/0/0) 8386560
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> 3
Part Tag Flag Cylinders Size Blocks
3 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]: ?
Expecting one of the following: (abbreviations ok):
unassigned boot root swap
usr backup stand var
home alternates reserved
Enter partition id tag[unassigned]: home
Enter partition permission flags[wm]:
Enter new starting cyl[3]: 1020
Enter partition size[0b, 0c, 1020e, 0.00mb, 0.00gb]: $
partition> print
Current partition table (unnamed):
Total disk cylinders available: 8319 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 815 400.15MB (813/0/0) 819504
1 swap wu 816 - 1019 100.41MB (204/0/0) 205632
2 backup wu 0 - 8319 4.00GB (8320/0/0) 8386560
3 home wm 1020 - 8318 3.51GB (7299/0/0) 7357392
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
8 boot wu 0 - 0 0.49MB (1/0/0) 1008
9 alternates wm 1 - 2 0.98MB (2/0/0) 2016
partition> label
Ready to label disk, continue? y
partition> name
Enter table name (remember quotes): diskmy
partition> quit
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
! - execute , then return
quit
format> save
Saving new disk and partition definitions
Enter file name["./format.dat"]:
format> save
Saving new disk and partition definitions
Enter file name["./format.dat"]: /etc/format.dat
format> quit
bash-2.05# prtvtoc /dev/rdsk/c0d1s0
* /dev/rdsk/c0d1s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 8321 cylinders
* 8319 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 3024 819504 822527
1 3 01 822528 205632 1028159
2 5 01 0 8385552 8385551
3 8 00 1028160 7357392 8385551
8 1 01 0 1008 1007
9 9 00 1008 2016 3023
bash-2.05# newfs /dev/rdsk/c0d1s0
newfs: construct a new file system /dev/rdsk/c0d1s0: (y/n)? y
/dev/rdsk/c0d1s0: 819504 sectors in 813 cylinders of 16 tracks, 63 sectors
400.1MB in 51 cyl groups (16 c/g, 7.88MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568, 145760,
661856, 678048, 694240, 710432, 726624, 742816, 759008, 774176, 790368,
806560,
bash-2.05# newfs /dev/rdsk/c0d1s1
newfs: construct a new file system /dev/rdsk/c0d1s1: (y/n)? y
/dev/rdsk/c0d1s1: 205632 sectors in 204 cylinders of 16 tracks, 63 sectors
100.4MB in 13 cyl groups (16 c/g, 7.88MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568, 145760,
161952, 178144, 194336,
bash-2.05# newfs /dev/rdsk/c0d1s3
newfs: construct a new file system /dev/rdsk/c0d1s3: (y/n)? y
/dev/rdsk/c0d1s3: 7357392 sectors in 7299 cylinders of 16 tracks, 63 sectors
3592.5MB in 83 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,
6476000, 6564768, 6653536, 6742304, 6831072, 6919840, 7008608, 7096352,
7185120, 7273888,
bash-2.05# mount /dev/dsk/c0d1s0 /disk2root
bash-2.05# mount /dev/dsk/c0d1s1 /disk2swap
bash-2.05# mount /dev/dsk/c0d1s3 /disk2home
bash-2.05# fstyp -v /dev/rdsk/c0d1s0 | head -10
ufs
magic 11954 format dynamic time Sat Jul 3 17:34:08 2004
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 51 size 409752 blocks 384847
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
Broken Pipe
Unknown_fstyp (no matches)
bash-2.05# prtvtoc /dev/rdsk/c0d1s0
* /dev/rdsk/c0d1s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 8321 cylinders
* 8319 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 3024 819504 822527 /disk2root
1 3 01 822528 205632 1028159 /disk2swap
2 5 01 0 8385552 8385551
3 8 00 1028160 7357392 8385551 /disk2home
8 1 01 0 1008 1007
9 9 00 1008 2016 3023
bash-2.05# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 657M 65M 533M 11% /
/dev/dsk/c0d0s6 1.9G 1.3G 530M 72% /usr
/dev/dsk/c0d0p0:boot 10M 1.5M 8.5M 16% /boot
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0d0s1 563M 65M 442M 13% /var
swap 759M 24K 759M 1% /var/run
swap 759M 4K 759M 1% /tmp
/dev/dsk/c0d0s5 6.6G 613M 5.9G 10% /opt
/dev/dsk/c0d0s7 469M 9K 422M 1% /export/home
/dev/dsk/c0d1s0 376M 9K 338M 1% /disk2root
/dev/dsk/c0d1s1 94M 9K 85M 1% /disk2swap
/dev/dsk/c0d1s3 3.5G 9K 3.4G 1% /disk2home
bash-2.05# mount
/ on /dev/dsk/c0d0s0 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980000 on Sat Jul 3 17:22:39 2004
/usr on /dev/dsk/c0d0s6 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980006 on Sat Jul 3 17:22:40 2004
/boot on /dev/dsk/c0d0p0:boot read/write/setuid/nohidden/nofoldcase/dev=19a3010 on Sat Jul 3 17:22:37 2004
/proc on /proc read/write/setuid/dev=2e80000 on Sat Jul 3 17:22:39 2004
/etc/mnttab on mnttab read/write/setuid/dev=2f40000 on Sat Jul 3 17:22:39 2004
/dev/fd on fd read/write/setuid/dev=2f80000 on Sat Jul 3 17:22:40 2004
/var on /dev/dsk/c0d0s1 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980001 on Sat Jul 3 17:22:42 2004
/var/run on swap read/write/setuid/xattr/dev=1 on Sat Jul 3 17:22:42 2004
/tmp on swap read/write/setuid/xattr/dev=2 on Sat Jul 3 17:22:44 2004
/opt on /dev/dsk/c0d0s5 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980005 on Sat Jul 3 17:22:44 2004
/export/home on /dev/dsk/c0d0s7 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980007 on Sat Jul 3 17:22:44 2004
/disk2root on /dev/dsk/c0d1s0 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980040 on Sat Jul 3 17:33:35 2004
/disk2swap on /dev/dsk/c0d1s1 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980041 on Sat Jul 3 17:33:45 2004
/disk2home on /dev/dsk/c0d1s3 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=1980043 on Sat Jul 3 17:33:52 2004
bash-2.05#
将下面的内容添加到/etc/vfstab中即可实现自动挂载
/dev/dsk/c0d1s0 /dev/rdsk/c0d1s0 /disk2root ufs 1 yes logging
对其它对应的分区挂载即可
相关推荐
在solaris虚拟机上添加新磁盘 Last login: Tue Aug 13 18:23:21 2013 Oracle Corporation SunOS 5.10 Generic Patch January 2005 [root@S1011:/]# devfsadm [root@S1011:/]# format Searching for disks...done ...
在Solaris 11.3操作系统中安装Oracle 11.2.0.4数据库涉及多个步骤,包括硬件添加、系统配置、用户与组管理、软件包安装以及网络设置。以下是详细的过程: 1. **硬件添加**: 在虚拟机中添加一块20GB的新硬盘后,...
### 知识点详解:硬盘安装Solaris 10 #### 一、Solaris 10简介 Solaris是Sun Microsystems公司(现为Oracle公司的一部分)开发的一种基于UNIX的操作系统,以其高性能、高稳定性和安全性著称,在企业级服务器市场...
在 Solaris 操作系统中,磁盘阵列是一种高级存储技术,它通过组合多个物理硬盘来提高数据存储的性能、可靠性和容量。本压缩包文件 "solaris磁盘阵列.rar" 可能包含有关如何在 Solaris 中配置和管理磁盘阵列的详细...
在 Solaris 操作系统中,磁盘限额是一个重要的管理功能,它允许管理员限制特定用户或组在特定文件系统上可以使用的硬盘空间。这有助于避免单个用户占用过多资源,从而影响整个系统的性能和稳定性。以下是关于在 ...
在 Solaris 平台中,ASM (Automatic Storage Management) 是 Oracle 数据库的一种集成存储管理解决方案,它能够自动管理和分配磁盘资源。然而,在配置 ASM 时,有时会遇到磁盘格式化的问题,如文档中所述的错误。这...
- 在磁盘选择界面上方,会列出系统中可用的内部磁盘、外部磁盘和固态硬盘及其大小。 - 为了确保安装程序能够正确识别,磁盘和 SSD 需要在开机状态下。 - 显示的推荐最小磁盘大小为 20GB,若磁盘大小小于建议值但足够...
6. **设置环境变量**:为了使系统能够找到新安装的GCC,可能需要更新PATH环境变量,例如添加`export PATH=/usr/local/gcc-7.3.0/bin:$PATH`到用户或系统的shell配置文件(如.bashrc或.cshrc)。 7. **验证安装**:...
6. **添加磁盘到diskgroup**:使用`metaset -s <dg_name> -a /dev/did/rdsk/<disk_number>`将新标签过的磁盘添加到diskgroup。如果遇到错误,可能是因为磁盘未被标签,需要返回第三步重做。 7. **创建条带化分区...
例如,对于Solaris1和Solaris2,需添加本地环回地址、公共网络地址、私有网络地址、虚拟IP地址以及OpenFiler的存储网络地址等。 ### 七、安全配置 为了提高安全性,还需在两个节点上为oracle用户添加RSA密钥,以...
4. 接着,配置虚拟机硬件,例如分配内存、设置硬盘大小、添加光驱设备(指向下载的Solaris 10 ISO文件)等。 5. 开始安装,根据提示进行操作。如果选择GUI安装,会看到一系列图形化的设置界面,包括语言选择、键盘...
1. 系统资源监控:使用top、vmstat、iostat、prstat等工具监控CPU、内存、磁盘I/O、网络等资源使用情况。 2. 故障排查:学习如何通过dmesg查看内核消息,以及使用kstat获取系统统计信息,进行故障定位。 3. 性能调优...
如果是 HP DL580 服务器,将磁盘插好后,上电,插入 Solaris 光盘后,从光盘启动按照如上操作后,进入如下安装 Solaris 的操作界面。 二、安装 Oracle 数据库 安装 Oracle 数据库需要在 Solaris 操作系统上安装 ...
在创建过程中,关键的一步是添加 Solaris 10 的ISO镜像文件作为安装源,这通常通过“CD/DVD”设备选项完成。同时,需要分配足够的内存和磁盘空间给虚拟机,以确保操作系统可以正常运行。网络连接建议选择“桥接模式...
1.3.3 spare 盘的添加和删除:备用磁盘(spare disk)在磁盘故障时自动替换,提高可用性。添加备用盘用 `zpool add pool_name spare /dev/rdsk/c0t4d0`,移除则用 `zpool detach`。 zpool 的维护包括故障盘的更换和...
1. 首先,在起始页中选择新建虚拟机,根据步骤添加 Solaris 10 的镜像文件,分配内存和磁盘大小等。注意:Solaris 10 系统虚拟机分配内存时最小内存为 768MB,所以,内存分配应 >768MB,否则安装无法进行。 2. 进入...
3. Metadb建立:`metadb`命令用于创建和管理元数据库,这里是为两个不同的磁盘(c0t0d0s7和c0t1d0s7)添加元数据记录,以标识它们作为SVM的一部分。 4. Meta Disk建立:这部分涉及到了逻辑卷的命名和创建。例如,`...
- 该脚本将验证目标目录,并计算安装所需的空间以及复制CD映像到磁盘等操作。 #### 五、添加额外组件 1. **取出第一张Solaris 9 CD-ROM,插入第二张**。 2. **添加额外组件**: - 从第二张CD-ROM中运行`add_to_...
- **硬盘设备项**:在Solaris中,硬盘设备通常以`/dev/dsk/cXtYdZsA`的形式出现,其中`X`、`Y`、`Z`、`A`分别代表控制器号、目标号、磁盘号和分区号。 - **CD-ROM的使用**:Solaris支持多种CD-ROM驱动程序,用户...