File System Management
* Re-creating the file system will damage the original file
Mkfs:make File System
-T Fstype
Mkfs-t ext2 = mkfs.ext2
Mkfs-t ext3 = Mkfs.ext3
Specialized in managing EXT series files
Mke2fs
-j: Creating a ext3 Type file system
-B block_size: Specifies the block size, default 4096; Desirable value is 1024,2048 or 4096;
-L lable: Specifies the partition volume label;
-M #: Specifies the percentage of blocks that are reserved for super users;
-I #: To specify how many bytes of space to create an inode, the default is 8192, the value should be the block size of 2^n times;
-N #: Specify Inode Count
-F: Force file system creation;
-E: The user specifies additional file system properties.
Blkid: Querying or viewing disk device-related properties
Uuid
TYPE
lable
E2lable: Used to view or define volume labels
E2lable device File Volume Label: Set Volume label
TUNE2FS: Adjusting the file system's related properties
-J: ext2 upgrade to ext3 without compromising the original data
-L lable: Set or modify the volume label;
-M #: Adjust the reserved percentage;
-R #: Specifies the number of reserved blocks;
-O: Set default mount options;
Cc.
-C #: Specify the number of mounts to the # times after the self-test, 0 or 1 means to turn off this function;
-I #: self-Test with # days after each mount, 0 or 1 means turn off this feature;
-L: Displays the information in the Super block;
DUNMPE2FS: Displaying file property information
-H: Show only information in the Super block
Fsck: Checking and repairing the Linux file system
-T Fstype: Specifying the file system type
-A: Automatic repair
E2FSCK: Dedicated to repairing Ext2/ext3 file system
-F: Forced check
-P: Automatic repair
Swap partition:
Free-m Viewing system memory Status
Create swap partition
Mkswap/dev/sdb1
-L LABEL
Mount/Unload Swap partition
Swapon/dev/sdb1
Swapon-a enable all switching devices defined in the/etc/fstab
Swapoff/dev/sdb1
DD command replication with CP directly on the underlying replication 1 0
if= Data sources
of= Data storage target
bs= Number of bytes
Count= Replication Times
seek=#: Skip space size when creating data files
Backup SDA before 512 bytes and MBR
DD IF=/DEV/SDA Of=/mnt/usb/mbr.bak bs=512 count=1
Restore MBR
DD If=/mnt/usb/mbr.bak OF=/DEV/SDA bs=512 count=1
Linux Basics-File System Management