Partition and File SystemFound the following link that has good explanations on partition, file system, etc. Though it is about UNIX, the concepts on LINUX should be similar.
http://www.freebsd.org/doc/handbook/disk-organization.html The main points are the following.
- Directories and files are stored in a file system. Each file system contains exactly one directory at the very top level, called the root directory for that file system.
- One file system is designated the root file system or /. Every other file system is mounted under the root file system.
- No matter how many disks are on the FreeBSD system, every directory appears to be part of the same disk.
- File systems can be mounted on top of one another.
- File systems are contained in partitions.
- Each partition can contain only one file system.
- File systems are a fixed size.
$ df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/sda3 ext3 3882516 2032072 1650036 56% / /dev/mapper/vg00-optvol ext3 8125880 2049796 5656656 27% /opt /dev/mapper/vg00-homevol ext3 1015704 34176 929100 4% /home /dev/mapper/vg00-varvol ext3 8125880 1960524 5745928 26% /var /dev/sda1 ext3 194410 17867 166506 10% /boot tmpfs tmpfs 1956764 0 1956764 0% /dev/shm tmpfs tmpfs 2097152 3716 2093436 1% /tmp /dev/mapper/vg01-lvol1 ext3 1032088 34936 944724 4% /opt/abc /dev/mapper/vg01-lvol2 ext3 1032088 34100 945560 4% /var/abc /dev/mapper/vg00-UsrLclHmVol ext3 5160576 1566824 3331608 32% /usr/local/home /dev/mapper/vg01-AppOptVol ext3 10321208 399984 9396936 5% /opt/abc/hzm /dev/mapper/vg01-AppVarVol ext3 10321208 1388868 8408052 15% /var/abc/hzm pghplnxl01:/export/kickstart nfs 131272224 120520768 4086592 97% /mnt/installIn the above example, the Type values are mostly "ext3". This does not have to be true. The following example is from Reference
$ df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/sda1 ext4 132239776 6210892 119311496 5% / tmpfs tmpfs 4021876 0 4021876 0% /dev/shm /dev/sdb2 ext2 30969600 117740 29278696 1% /home/oracle /dev/sdc1 ext2 576310180 71232 546964104 1% /home/data
- Linux has two forms of swap space: the swap partition and the swap file.The swap partition is an independent section of the hard disk used solely for swapping; no other files can reside there. The swap file is a special file in the filesystem that resides amongst your system and data files.
- To see what swap space you have, use the command "swapon -s".
$ /sbin/swapon -s Filename Type Size Used Priority /dev/sda2 partition 457824 457820 -1The output above shows a partition. It is not a swap file.
Note that the "df -T" command will not show the partition information.
Find Sizes of the FilesThe command "du" can be used to find the estimated file space usage. The following command will write counts for all files and sub-directories under the current directory.
Post a Comment