1. Check whether the hard disk can be identified
# Fdisk-lDisk/dev/sda: 36.7 GB, 36703934464 bytes255 heads, 63 sectors/track, 4462 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 261 2096451 83 Linux/dev/sda2 262 783 83 Linux/dev/ sda3 784 1305 4192965 83 Linux/dev/sda4 1306 4462 25358602 + 5 Extended/dev/sda5 1306 1827 4192933 + 83 Linux/dev/sda6 1828 2088 2096451 82 Linux swap/dev/sda7 2089 4462 19069123 + 83 LinuxDisk/dev/sdb: 36.7 GB, 36748945408 bytes255 heads, 63 sectors/track, 4467 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdb1 * 1 509 4088511 83 Linux/dev/sdb2 510 2430 15430432 + 83 Linux/dev /sdb3 2431 2557 1020127 + 82 Linux swap/dev/sdb4 2558 4467 15342075 f W95 Ext 'd (LBA) /dev/sdb5 2558 2811 2040223 + 83 Linux/dev/sdb6 2812 3830 8185086 83 Linux/dev/sdb7 3831 4467 5116671 83 Linux/dev/sdb indicates the second hard disk has been identified
Ii. Attach a hard disk
1. Create a directory on the local hard disk.
#mkdir /opt/data/tmp1
2. mount a partition in the second Hard Disk/dev/sdb1
Totmp1
#mount /dev/sdb1 /opt/data/tmp1
3. Check whether the disk is mounted.
# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda1 2.0G 141M 1.8G 8% /none 1014M 0 1014M 0% /dev/shm/dev/sda2 4.0G 1.8G 2.0G 47% /opt/dev/sda7 18G 168M 17G 1% /opt/data/dev/sda5 4.0G 1.4G 2.4G 37% /usr/dev/sda3 4.0G 2.1G 1.8G 55% /var/dev/sdb1 3.9G 1.4G 2.3G 38% /opt/tmp/tmp1
3. Detach a hard disk
#umount /dev/sdb1