File system
Windows
Ntfs
FAT32
Linux
VFS: Virtual file system: different from the underlying file system, through a unified interface, output to the upper application
Ext2
Ext3
Ext4
Xfs
File system: The partition file on the line organization management, and the establishment of an index table, the file system has the kernel provides
Formatting: Creating a file system
Low-level formatting: creating tracks, sectors
Advanced formatting: Creating a file system
Partitions are divided by cylinder.
Track: Data is stored on track
Sectors: Dividing tracks into fan-like sections for managing
Cylinder: multiple platters, sectors of the same position, forming cylindrical faces
0 sectors of 0 tracks: (not part of any partition) MBR 512-byte master boot record
446 Bytes: bootloader Startup related
64 bytes: Partitioned table, identifying 1 partitions per 16 bytes, up to 4 primary partitions
2 Bytes: Indicates whether the current hard drive is bootable 5A
Extended partition: Logical concept: Level two partition table
Logical Partitioning
Linux Disk partitioning
sda[1..]
SDA1:SDA The first hard drive on the hard drive
logical partition starting from 5
Fdisk:=15 a partition
Fdisk-l View all current drive information
Fdisk Hard Drive device/DEV/SDA
Interactive commands
-M: Help
-D: Delete partition
-N: Creating partitions
E:extended Extended Partition
P Primary partition primary partition
-P: Display current partition information
-T: Modifying the partition type
-W: Save exit
-Q: Do not save exit
-L: System ID corresponding to each partition type
83:linux
82:linux Swap
8e: Logical Volume LVM
-T: Modifies the system ID of the specified partition
/proc/partitions kernel-aware partition information
Red Hat 5:partpobe core re-probing device
Red Hat 6:partx-a Notifies the kernel of the current partition
Partx-a/DEV/SDA5/DEV/SDA Separate a partition for the kernel to recognize
Creating a file system
Mkfs-t File System Type partitioning
MKFS.EX3 partition formats the file system as Ext3
Blkid partitions display partition properties such as UUID, volume label
UUID: Global Unique ID number, used to avoid excessive hard disk, when loading the partition, the sda* will cause an error, the UUID can uniquely identify the partition
mke2fs-t {EXT2,EXT3,EXT4}/etc/mke2fs.conf: Used to set default features and unique features of each file system;
-b Specifies the block size {1023;2048;4096} bytes default 4096 bytes
{1k;2k;4k}
The block size depends on the CPU support for the size of the memory page frame, the X86 system default page box size is 4K;
2*0=1k 2*1=2k 2*2=4k
-L Set Volume label
-M n reserved block of n% reserved BLOCK: The space reserved for root, to prevent the full disk, the administrator can not open the process management system, the default 5%
view reserved blocks
[email protected] ~]# Tune2fs-l/dev/sda1 | grep "Reserved"
Reserved block count:10240 reserved for fast size
Reserved blocks uid:0 (user root) to which user
Reserved blocks gid:0 (group root
Display partition information: such as inode number block size
TUNE2FS Equipment
-L: Show file system super fast Information
-L: Re-set the volume label
-M: Adjust the number of reserved blocks reserved for administrator use
-o: Set default mount Options
-O: Set file system default features
E2lable Device Volume label modify or view device volume label
Mount: Each partition needs to be mounted to a directory in the directory, which accesses the partitions attached to the directory
Mount Partition mount point
Mount/dev/sda3/test
Mount based on volume label
Mount Label= "volume label" Mount point
Mount according to UUID
Mount Uuid= "UUID" mount point
Release Mount when no process access is available
Umoun/test
/etc/fstab: System boot automatically mount file system
Mounting devices
A device file; a volume label; UUID.
Mount point
File system
Mount Options
Defaults default options, multiple options comma separated
Switching frequency:
0: Never Back up
1: Daily backup
2: One-day interval backup
Self-Test order
0: Do not check
1: First detection: Generally only the root file system is detected by the first
Mount
-O for specifying mount options
RO: Read-only Mount
RW: Read-write Mount
Noatime: Turn off update access time
Auto: Whether to run "mount-a" Auto Mount
Defaults: Default mount Options
Rw,suid,dev,exec,atuo,nouser,async,and,relatime
Async: Asynchronous write: Memory is present and written to hard disk over time
Sync: Sync write: Save to memory immediately and write memory to hard disk
Dev: Allow device files to be used on the file system
EXEC: Allow running binaries on file system
Remount: Re-mount
-N does not update the/etc/mtab file when you mount the file system
/etc/mtab: Tracks all current mounted devices
-R equivalent to "-O-Ro", read-only Mount
-A Mount/etc/fstab all file systems that support auto mount options
fuser [Mount_point] Viewing a process that is accessing a mount point
Fuser mount point
fuser-km mount point kills the process
This article is from the "Hanging Sword" blog, please be sure to keep this source http://sublime.blog.51cto.com/8856101/1533401