Linux系统中如何挂载第二块硬盘
一、检测硬盘能否被识别# fdisk -l
Disk /dev/sda: 36.7 GB, 36703934464 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksIdSystem
/dev/sda1* 1 261 209645183Linux
/dev/sda2 262 783 419296583Linux
/dev/sda3 784 1305 419296583Linux
/dev/sda4 1306 4462 25358602+5Extended
/dev/sda5 1306 1827 4192933+83Linux
/dev/sda6 1828 2088 209645182Linux swap
/dev/sda7 2089 4462 19069123+83Linux
Disk /dev/sdb: 36.7 GB, 36748945408 bytes
255 heads, 63 sectors/track, 4467 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End BlocksIdSystem
/dev/sdb1* 1 509 408851183Linux
/dev/sdb2 510 2430 15430432+83Linux
/dev/sdb3 2431 2557 1020127+82Linux swap
/dev/sdb4 2558 4467 15342075 fW95 Ext'd (LBA)
/dev/sdb5 2558 2811 2040223+83Linux
/dev/sdb6 2812 3830 818508683Linux
/dev/sdb7 3831 4467 511667183Linux
/dev/sdb说明已经识别出第二块硬盘二、挂载硬盘
1、在本地硬盘中临时创建一个目录
#mkdir /opt/data/tmp1
2、挂载第二块硬盘中的一个分区/dev/sdb1到tmp1
#mount /dev/sdb1/opt/data/tmp1
3、查看是否被挂载
# df -h
Filesystem SizeUsed Avail Use% Mounted on
/dev/sda1 2.0G141M1.8G8% /
none 1014M 0 1014M0% /dev/shm
/dev/sda2 4.0G1.8G2.0G47% /opt
/dev/sda7 18G168M17G1% /opt/data
/dev/sda5 4.0G1.4G2.4G37% /usr
/dev/sda3 4.0G2.1G1.8G55% /var
/dev/sdb1 3.9G1.4G2.3G38% /opt/tmp/tmp1三、卸载硬盘
#umount /dev/sdb1
页:
[1]