[root@mdc2vr6009 data]# blockdev --getbsz /dev/VolGroup01/LogVol11
4096
blockdev --reportPlease confirm the block size
[root@mdc2vr6009 data]# blockdev --getbsz /dev/VolGroup02/data
1024
The default block size is 4096 bytes
dumpe2fs /dev/sdb3 | grep -i 'Block size'
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Blocks
By default a filesystem can contain 2^32 blocks; if the '64bit' feature is enabled, then a filesystem can have 2^64 blocks.
32-bit mode | 64-bit mode | ||||||||
Item | 1KiB | 2KiB | 4KiB | 64KiB | 1KiB | 2KiB | 4KiB | 64KiB | |
---|---|---|---|---|---|---|---|---|---|
Blocks | 2^32 | 2^32 | 2^32 | 2^32 | 2^64 | 2^64 | 2^64 | 2^64 | |
Inodes | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | |
File System Size | 4TiB | 8TiB | 16TiB | 256PiB | 16ZiB | 32ZiB | 64ZiB | 1YiB | |
Blocks Per Block Group | 8,192 | 16,384 | 32,768 | 524,288 | 8,192 | 16,384 | 32,768 | 524,288 | |
Inodes Per Block Group | 8,192 | 16,384 | 32,768 | 524,288 | 8,192 | 16,384 | 32,768 | 524,288 | |
Block Group Size | 8MiB | 32MiB | 128MiB | 32GiB | 8MiB | 32MiB | 128MiB | 32GiB | |
Blocks Per File, Extents | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | 2^32 | |
Blocks Per File, Block Maps | 16,843,020 | 134,480,396 | 1,074,791,436 | 4,398,314,962,956 | 16,843,020 | 134,480,396 | 1,074,791,436 | 4,398,314,962,956 | |
File Size, Extents | 4TiB | 8TiB | 16TiB | 256TiB | 4TiB | 8TiB | 16TiB | 256TiB | |
File Size, Block Maps | 16GiB | 256GiB | 4TiB | 256PiB | 16GiB | 256GiB | 4TiB | 256PiB |
Note: Files not using extents (i.e. files using block maps) must be placed in the first 2^32 blocks of a filesystem.
[root@mdc1brc0107 ~]# blockdev --getbsz /dev/mapper/VolGroup01-backup_lv
4096
[root@mdc2vr6009 /]# lvcreate -n data --size 290G VolGroup02
Logical volume "data" created
[root@mdc2vr6009 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol10 VolGroup01 -wi-ao 4.00g
LogVol11 VolGroup01 -wi-ao 6.00g
LogVol12 VolGroup01 -wi-ao 30.00g
LogVol13 VolGroup01 -wi-ao 6.00g
LogVol14 VolGroup01 -wi-ao 6.00g
LogVol15 VolGroup01 -wi-ao 30.00g
swap VolGroup01 -wi-ao 12.00g
data VolGroup02 -wi-a- 290.00g
[root@mdc2vr6009 /]# mkfs
mkfs mkfs.ext2 mkfs.ext4 mkfs.msdos
mkfs.cramfs mkfs.ext3 mkfs.ext4dev mkfs.vfat
[root@mdc2vr6009 /]# mkfs.ext4 /dev/VolGroup02/data
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
19005440 inodes, 76021760 blocks
3801088 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2320 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@mdc2vr6009 /]# mount /opt/iwov_data
[root@mdc2vr6009 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol10
4.0G 522M 3.3G 14% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 248M 36M 200M 16% /boot
/dev/mapper/VolGroup01-LogVol14
6.0G 87M 5.6G 2% /home
/dev/mapper/VolGroup01-LogVol12
30G 14G 15G 48% /opt
/dev/mapper/VolGroup01-LogVol11
6.0G 1.8G 3.9G 31% /usr
/dev/mapper/VolGroup01-LogVol13
6.0G 392M 5.3G 7% /var
/dev/mapper/VolGroup01-LogVol15
30G 3.9G 25G 14% /www
tmpfs 8.0G 3.3M 8.0G 1% /tmp
none 30G 14G 15G 48% /iwmnt/default
none 30G 14G 15G 48% /iwmnt/iwadmin
/dev/mapper/VolGroup02-data
286G 191M 271G 1% /opt/iwov_data
[root@mdc2vr6009 /]# ls -l /opt/iwov_data
total 16
drwx------ 2 root root 16384 Mar 24 17:13 lost+found
[root@mdc2vr6009 /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup01 lvm2 a-- 99.72g 5.72g
/dev/sdb VolGroup02 lvm2 a-- 300.00g 10.00g
[root@mdc2vr6009 /]# cd /opt/iwov_data
[root@mdc2vr6009 iwov_data]# touch pankaj
[root@mdc2vr6009 iwov_data]# ls -l
total 16
drwx------ 2 root root 16384 Mar 24 17:13 lost+found
-rw-r--r-- 1 root root 0 Mar 24 17:15 pankaj
[root@mdc2vr6009 iwov_data]# cat > deleteit
^C
[root@mdc2vr6009 iwov_data]# ls -l
total 16
-rw-r--r-- 1 root root 0 Mar 24 17:16 deleteit
drwx------ 2 root root 16384 Mar 24 17:13 lost+found
-rw-r--r-- 1 root root 0 Mar 24 17:15 pankaj
[root@mdc2vr6009 iwov_data]# blockdev --getbsz /dev/VolGroup02/data
4096
No comments:
Post a Comment