First, vmware adds a hard disk to the machine and restarts the Machine [root @ Db2 ~] # Fdisk-lDiskdevsda: 8589 MB, 8589934592bytes255heads, 63 sectorstrack, 1044cylindersUnitscylindersof16065*5128225280 bytesdevicestarboottendblocksidsystemde
First, vmware assigns a to machine.DdOne hard disk
Restart the machine
[Root @ Db2 ~] #Fdisk-L
Disk/dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/TrAcks, 1044 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 12 96358 + 83 Linux
/Dev/sda2 13 784 6201090 83 Linux
/Dev/sda3 785 1044 2088450 82 Linux swap
[Root @ Db2 ~] # Reboot
Broadcast message from root (pts/0) (Thu Jul 21 15:45:50 2011 ):
The system is going down for reboot NOW!
[Root @ Db2 ~] #
Last login: Thu Jul 21 15:22:27 2011 from 192.168.0.1
[Root @ Db2 ~] # Fdisk-l
Disk/dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 12 96358 + 83 Linux
/Dev/sda2 13 784 6201090 83 Linux
/Dev/sda3 785 1044 2088450 82 Linux swap
Disk/dev/sdb: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk/dev/sdb doesn \'t contain a valIdPartition table
[Root @ Db2 ~] # Fdisk/dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
Until you decideWriteThem. After that, of course, the previous
Content won \'t be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be correctEdBy w (rite)
Command (m for help): m
Command action
A toggle a bootable flag
B edit bsd disklabel
C toggle the dos compatibility flag
D delete a partition
L list known partition types
M print this menu
N add a new partition
O create a new empty DOS partition table
P print the partition table
Q quit without saving changes
S create a new empty Sun disklabel
T change a partition \'s system id
U change display/entry units
V verify the partition table
W write table to disk andExIt
X extra fuNcTionality (experts only)
Command (m for help): n
Command action
E extended
P primary partition (1-4)
P
Partition number (1-4): 1
First cylinder (1-783, default 1): 1
Last cylinder or + size or + sizeM or + sizeK (1-783, default 783): 783
Command (m for help): w
The partition table has been altered!
Calling ioctl () to re-read partition table.
Syncing disks.
[Root @ Db2 ~] # Fdisk-l
Disk/dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 12 96358 + 83 Linux
/Dev/sda2 13 784 6201090 83 Linux
/Dev/sda3 785 1044 2088450 82 Linux swap
Disk/dev/sdb: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sdb1 1 783 6289416 83 Linux
[Root @ Db2 ~] #Mkfs-T ext3/dev/sdb1
Mke2fs1.35 (28-Feb-2004)
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
786432 inodes, 1572354 blocks
78617 blocks (5.00%) reserved forSuPer user
First data block = 0
MaximumFileSystem blocks = 1610612736
48 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting infoRmAtion: done
This filesystem will be automatically checked every 35 mounts or
180 days,WhichEver comes first. Use tune2fs-c or-I to override.
[Root @ Db2 ~] #Mkdir/Db2
[Root @ Db2 ~] # Mount/dev/sdb1/db2
[Root @ Db2 ~] #Df-G
Df: Invalid option -- g
Please execute &LsQuo; df -- help' to get more information.
[Root @ Db2 ~] # Df-h
Filesystem capacity in use available % mount point
/Dev/sda2 5.9 GB 3.6G 2.0G 65%/
/Dev/sda1 92 MB 12 M 75 M 14%/boot
None 506 M 0 506 M 0%/dev/shm
/Dev/sdb1 6.0G 45 M 5.6G 1%/db2
[Root @ Db2 ~] # Vi/etc/fstab
# This file is edited by fstab-Sync-See \ 'man fstab-sync \ 'for details
LABEL = // ext3 defaults 1 1
LABEL =/boot ext3 defaults 1 2
None/dev/pts devpts gid = 5, mode = 620 0 0
None/dev/shm tmpfs defaults 0 0
None/proc defaults 0 0
None/sys sysfs defaults 0 0
LABEL = SWAP-sda3 swap defaults 0 0
/Dev/hdc/media/CdRom auto paMcOnsole, fscontext = system_u: object_r: removable_t, exec, noauto, managed 0 0