Chinaunix首页 | 论坛 | 博客
  • 博客访问: 229507
  • 博文数量: 108
  • 博客积分: 3092
  • 博客等级: 中校
  • 技术积分: 1172
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-25 16:35
文章分类

全部博文(108)

文章存档

2011年(3)

2010年(43)

2009年(19)

2008年(43)

我的朋友

分类: LINUX

2010-06-10 15:31:39

1. The difference between Linux & Windows file system structure


They both take the hierarchy structure. For Windows, the root of the tree is the drive. But there are no drive letters in Linux, there is just one file structure. It starts with root (/) and all local file systems, all local devices, and all remote file systems are represented as subdirectories in this structure.

When Linux first boots, it builds this file structure based on information in the /etc/fstab file. Where Windows assigns drive letters to hard drive partitions and other storage devices, Linux assigns them directories in the root file structure.

In Linux, each partition is a file system, and has its own directory structure. Linux will organize the directory structure from different partition to a system global hierarchy directory structure.

 

2. Logical Volume Management(LVM)


Some concepts:

PP(Physical Partition): eg: harddisk partition, RAID partition.

PV(Physical Volume): it is the abstraction of  PP, which maintenance  PP structure information. It is the basic logical unit to organize VG. A PV corresponds to a PP generally.

PE(Physical Extends): each PV will take PE as the basic unit.

VG(Volume Group): it is the LVM volume group, which includes one or more PV. It could be treated ad LVM storage pool.

LE(Logical Extends): the basic umit of LV. A LE corresponds to a PE.

LV(Logical Volume): it builds upon VG and under the file system and is organized by LEs

 

LVM provide LV layer to the file system and hide the operation details. The LV operations have nothing different with the partition. When write to the LV, LVM will positioning to correspond  LE, and write data to the correspond PE according to the mapping table at the head of PV.

 

Advantages:

1) the file system could span multi-disks, so the capacity will not restricted by the physical hard disk.

2) the capacity could be expanded dynamically when the system is running.

3) new disk could be added to the LVM storage pool.

4) important data could be mirrored to multi-physical disks.

5) it is convenient to export the whole VG and import to another machine.

 

Disadvantages:

1) when remove a disk from the VG, ‘reducevg’ must be used, or there will be problems.

2) when one disk in the volume has any problem, the whole VG will be affected.

3) the storage performance will reduce due to the extra operations.

  

3. What is “mount”


The term for adding a device to the file system is mounting. Linux will automatically mount a / (root) file system. There may also be a separate /boot file system, containing the core kernel boot files. Linux will also mount some special file systems. The swap space is not shown as a part of the file system, but is handled by the kernel. However, other special file systems such as proc, are seen as a normal part of the file system, and its contents can be handled just like normal files.

Other file systems, such as removable media or remote file systems, will need to be manually mounted. When mounting a file system, you will need to know the correct way to reference it from Linux, and have an empty directory to use as a mount point.

 

4. Useful commands


fdisk: partition table manipulator

mkfs: build a Linux file system

df: report file system disk usage

du: estimate file space usage

dd: convert and copy a file

 

(fdisk)

pvcreate

vgcreate

vgdisplay

lvcreate

(mkfs)

阅读(631) | 评论(0) | 转发(0) |
0

上一篇:李Q的6月计划

下一篇:performance test materials

给主人留下些什么吧!~~