【1. 分区与目录概念理解】
Linux的分区是物理上的概念,就像我们把一块硬盘分成C:,D:,E:三个区一样,物理上将存储空间分开[root@localhost ~]# df -lh
Filesystem 容量 已用 可用 已用% 挂载点
/dev/sda3 6.4G 4.8G 1.3G 80% /
/dev/sda1 99M 8.4M 86M 9% /boot
none 494M 0 494M 0% /dev/shm
/dev/hdc 105M 105M 0 100% /media/cdrom
【3. 分区的mount和umount】
前面我们提到分区必须挂载到某个特定的目录才能使用,那么假如我们把Linux最重要的分区boot分区和根分区/都不挂载到相应的目录,结果会如何呢?[root@localhost /]# umount /
umount: /: device is busy
umount: /: device is busy
[root@localhost /]# ls
bin dev home lib media mnt paul root selinux sys u01 var
boot etc initrd lost+found misc opt proc sbin srv tmp usr
[root@localhost /]# umount boot
[root@localhost /]#
[root@localhost boot]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
# Beginning of the block added by the VMware software
.host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0
# End of the block added by the VMware software
/dev/hdc /media/cdrom auto pamconsole,exec,noauto,m anaged 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,m