Here is the coprehensive image from Wikipedia.
This YouTube video made me happy :)
2^n
./
is anonimous master inode (first inode) in ext4.ls -li
shows inode information.stat {{ file }}
commands returns human readable information about the inode.rm
command deletes the links.This video was also good (from Udacity):
Good for review quickly.
See super block:
$ sudo dumpe2fs /dev/sda1 | head -n 30
dumpe2fs 1.44.1 (24-Mar-2018)
Filesystem volume name: <none>
Last mounted on: /boot
Filesystem UUID: 0f642e82-73d9-48d2-b83f-913d843399db
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 121920
Block count: 487424
Reserved block count: 24371
Free blocks: 46284
Free inodes: 121595
First block: 1
Block size: 1024
Fragment size: 1024
Reserved GDT blocks: 256
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2032
Inode blocks per group: 254
Filesystem created: Fri Aug 18 04:01:26 2017
Last mount time: Thu Apr 15 22:06:31 2021
Last write time: Thu Apr 15 22:06:31 2021
Mount count: 13
Maximum mount count: -1
Last checked: Thu Feb 6 19:58:56 2020
$ sudo dumpe2fs /dev/mapper/vg0-root | head -n 30
dumpe2fs 1.44.1 (24-Mar-2018)
Filesystem volume name: <none>
Last mounted on: /
Filesystem UUID: 7551d7c4-f4fa-46f4-af5c-c3a8ab054a13
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 1250928
Block count: 4999168
Reserved block count: 249958
Free blocks: 1192695
Free inodes: 304342
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1022
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8176
Inode blocks per group: 511
Flex block group size: 16
Filesystem created: Fri Aug 18 04:01:26 2017
Last mount time: Thu Apr 15 22:06:23 2021
Last write time: Thu Apr 15 22:06:20 2021
Mount count: 12
Maximum mount count: -1
Others:
sync
: Cache to disk.fsck
: Check file system. Some Linux distributions run this command at boot time automatically.tune2fs
: To tune ext4 file system.lvscan
: Check logical volumes.fdisk -l
: Get physical disk informationlsblk
: Lists information about all block devices in a Linux system.pvscan
: List all physical volumes.vgscan
: List all volume groups.lvdisplay
: Allows you to see the attributes of a logical volume like size, read/write status, snapshot information etc.lvremove {{ Logical Volume }}
: Delete the logical volume.df -h
and check mount point and lvm partition.umount {{ mount_point }}
lvremove {{ Logical_Volume }}
vim /etc/fstab
and delete the corresponding line.lvextend -l +100%FREE {{ Logical_Volume_you_want_to_extend }}
resize2fs {{ Logical_Volume_you_want_to_extend }}
Rezie the filesystem first, and shrink the logical volume. Otherwise your Linux couldn’t boot correctly, should do trouble shooting with rescue mode.
# Unmount the partition
umount /dev/vg/my-lvm
# Check the filesystem
e2fsck /dev/vg/my-lvm
# Resize file system to 100GB
resize2fs /dev/vg/my-lvm 100GB
# Reduce the LVM to 10GB
lvreduce -L 100G /dev/vg/disk-name