• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 298  文章 - 377  trackbacks - 0
            <2007年12月>
            2526272829301
            2345678
            9101112131415
            16171819202122
            23242526272829
            303112345

            常用鏈接

            留言簿(34)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊

            收藏夾

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/iscsi/test 

            mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/md0

            ==============================================================================

            根據”維基百科“和“kernel.org”:

            Ext4 adds 48-bit block addressing, so it will have 1EiB of maximum file system size and 16 TiB of maximum file size

            意思就是說,ext4支持最大1EiB(1EiB=1024PiB ,1PiB=1024TiB ,1TiB=1024GiB)的文件系統和16TiB的文件。

             

            http://en.wikipedia.org/wiki/File_system_comparison#Limits

            https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Bigger_File_System_and_File_Sizes

             

            今天在格式化一個20T的Raid空間時候,發生了這個錯誤:

            mkfs.ext4: Size of device /dev/md0 too big to be expressed in 32 bits

            using a blocksize of 4096. 

             

            有人說:

            雖然 ext4 的 feature list 有支援 > 16TB, 不過.... 那目前來看就只是設計目標, 因為 e2fsprogs 不支援 > 16TB.....

            https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Creating_ext4_filesystems

            NOTE: Although very large fileystems are on ext4's feature list, current e2fsprogs currently still limits the filesystem size to 2^32 blocks (16TiB for a 4KiB block filesystem). Allowing filesystems larger than 16T is one of the very next high-priority features to complete for ext4.

             

            很多人用mkfs.ext4嘗試不通之后,就改用xfs了。

            而實際上,這個問題早有人解決了,解決方法起始也比較簡單。

            http://blog.ronnyegner-consulting.de/2011/08/18/ext4-and-the-16-tb-limit-now-solved/

            http://rritw.com/a/JAVAbiancheng/ANT/20101003/43604.html

             

            原來EXT4是真的支持1EiB的文件系統的,只是mkfs無法支持大于16T的文件系統,所以只需要升級一下格式化工具即可。

            關于為什么mkfs.ext4不能格式化大于16T的Ext4文件系統以及其解決方法,原文解釋如下:

            To be specific: Even with the most recent e2fsprogs 1.41.14 there is no way to create file systems larger than 16 TB.

            But: According to this post it should work since June:

            It’s taken way too long, but I’ve finally finished integrating the 64-bit patches into e2fsprogs’s mainline repository. All of the necessary patches should now be in the master branch for e2fsprogs. The big change from before is that I replaced Val’s changes for fixing up how mke2fs picked the correct fs-type profile from mke2fs.conf with something that I think works much better and leaves the code much cleaner. With this change you need to add the following to your /etc/mke2fs.conf file if you want to enable the 64-bit feature flag automatically for a big disk:

            [fs_types] ext4 = {
            features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
            auto_64-bit_support = 1 # <—- add this line
            inode_size = 256
            }

            Alternatively you can change the features line to include the feature “64bit”; this will force the use of the 64-bit fields, and double the size of the block group descriptors, even for smaller file systems that don’t require the 64-bit support. (This was one of my problems with Val’s implementation; it forced the mke2fs.conf file to always enable the 64-bit feature flag, which would cause backwards compatibility issues.) This might be a good thing to do for debugging purposes, though, so this is an option which I left open, but the better way of doing things is to use the auto_64-bit-support flag.

             

             

            所以,只需要升級下工具即可,升級方式如下:

            git clone git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git

            cd e2fsprogs

            ./configure

            make && make install

             

            完畢之后還是不能用mkfs.ext4來格式化,而要用“mke2fs”進行格式化,命令參考如下:

            mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/md0

             

            需要注意的是,這是一個還在開發中的工具,使用請個人承擔風險:

            This are *development* tools – use at your OWN RISK

             

            格式化完畢后就掛載了,來看看你的超大EXT4文件系統吧:

            mount -t ext4 /dev/md0 /mnt

             

            mount|grep md0

             /dev/md0 on /cache/data type ext4 (rw)

             

            df -h

            /dev/md0               19T  229M   18T   1% /mnt

             

            最后,E文作者總結了這么幾點,Conclusion:

            With the most recent e2fstools (1.42-WIP) it is possible to create ext4 file system larger than 16 TB.

            If you do so remember the following:

            • the tool is still in development – use at your own risk!

            • tune the values for autocheck (after x mounts / after y days)

            • adjust the “-i” switch which defines the bytes/inode ratio; in the example above one inode is created for every 8 MB

            • the more inodes you create the longer fsck takes and the more memory it needs

            • Resizing the file system (growing / shrinking) is NOT possible at the moment


            ==============================================================================

            mke2fs  建立Linux系統使用的ext2或ext3

            必要參數

            <設備名稱> 與設備對應文件,例如/dev/hd1
            -b<塊大小> 指定塊大小
            -c 在創建文件系統之前檢查指定的設備
            -g<塊組數量> 指定一個塊組中塊的數量

            選擇參數

            -E<擴展參數> 為要創建的文件系統指定一些參數
            -f<不連續區段大小> 不知道連續區段的大小
            -F 強制執行,即使指定設備沒有被掛載或者不是塊設備
            -l<文件> 從指定文件中讀取壞的塊列表
            -i<字節> 指定每個inode的字節數
            -j 創建使用ext3卷號的文件系統
            -J<擴展參數> 為使用ext3卷號的文件系統指定一些參數
            -L 設置創建的文件系統的標簽
            -N 指定iniode的數量
            -q 執行時不顯示任何信息
            -E<擴展選項> 為要創建的文件系統指定一些可選項
            -f<不連續區段大小> 指定不連接區段的大小
            -F 強制執行,即使指定設備沒有被掛載或者不是塊設備
            -l<文件> 從指定的文件中讀取壞的塊列表
            -i<字節> 指定每個inode的字節數
            -j 創建使用ext3卷號的文件系統
            -J<擴展選項> 為使用ext3卷號文件系統指定一些選項
            -L 設置創建的文件系統的標簽
            -N 指定inode的數量
            -q 執行時不顯示任何信息
            -V 顯示版本信息


            ==============================================================================
            [root@OEL63 ~]# df -h
            Filesystem Size Used Avail Use% Mounted on
            /dev/mapper/vg_oel63-lv_root
            18G 11G 5.9G 65% /
            tmpfs 496M 375M 121M 76% /dev/shm
            /dev/sda1 485M 55M 405M 12% /boot
            [root@OEL63 ~]# fdisk -l

            Disk /dev/sda: 21.5 GB, 21474836480 bytes
            255 heads, 63 sectors/track, 2610 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes
            Sector size (logical/physical): 512 bytes / 512 bytes
            I/O size (minimum/optimal): 512 bytes / 512 bytes
            Disk identifier: 0x000cd5a1

            Device Boot Start End Blocks Id System
            /dev/sda1 * 1 64 512000 83 Linux
            Partition 1 does not end on cylinder boundary.
            /dev/sda2 64 1959 15215616 8e Linux LVM
            /dev/sda3 1959 2610 5236185 8e Linux LVM

            Disk /dev/sdb: 1073 MB, 1073741824 bytes
            255 heads, 63 sectors/track, 130 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes
            Sector size (logical/physical): 512 bytes / 512 bytes
            I/O size (minimum/optimal): 512 bytes / 512 bytes
            Disk identifier: 0x3d49ddef

            Device Boot Start End Blocks Id System
            /dev/sdb1 1 130 1044193+ 83 Linux

            Disk /dev/sdc: 10.7 GB, 10737418240 bytes
            255 heads, 63 sectors/track, 1305 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes
            Sector size (logical/physical): 512 bytes / 512 bytes
            I/O size (minimum/optimal): 512 bytes / 512 bytes
            Disk identifier: 0x00000000

            Disk /dev/mapper/vg_oel63-lv_root: 18.9 GB, 18857590784 bytes
            255 heads, 63 sectors/track, 2292 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes
            Sector size (logical/physical): 512 bytes / 512 bytes
            I/O size (minimum/optimal): 512 bytes / 512 bytes
            Disk identifier: 0x00000000

            Disk /dev/mapper/vg_oel63-lv_swap: 2080 MB, 2080374784 bytes
            255 heads, 63 sectors/track, 252 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes
            Sector size (logical/physical): 512 bytes / 512 bytes
            I/O size (minimum/optimal): 512 bytes / 512 bytes
            Disk identifier: 0x00000000

            二。新建分區及文件

            [root@OEL63 ~]# fdisk /dev/sdc
            Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
            Building a new DOS disklabel with disk identifier 0xcb0d4a1a.
            Changes will remain in memory only, until you decide to write them.
            After that, of course, the previous content won't be recoverable.

            Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

            WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
            switch off the mode (command 'c') and change display units to
            sectors (command 'u').

            Command (m for help): n
            Command action
            e extended
            p primary partition (1-4)
            p
            Partition number (1-4): 1
            First cylinder (1-1305, default 1):
            Using default value 1
            Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305):
            Using default value 1305

            Command (m for help): w
            The partition table has been altered!

            Calling ioctl() to re-read partition table.
            Syncing disks.
            [root@OEL63 ~]# mkfs -t ext4 /dev/sdc1
            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
            655360 inodes, 2620595 blocks
            131029 blocks (5.00%) reserved for the super user
            First data block=0
            Maximum filesystem blocks=2684354560
            80 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

            Writing inode tables: done
            Creating journal (32768 blocks): done
            Writing superblocks and filesystem accounting information: done

            This filesystem will be automatically checked every 27 mounts or
            180 days, whichever comes first. Use tune2fs -c or -i to override.
            三。掛載到具體目錄

            [root@OEL63 ~]# mkdir /data01
            [root@OEL63 ~]# mount /dev/sdc1 /data01
            [root@OEL63 ~]# df -h
            Filesystem Size Used Avail Use% Mounted on
            /dev/mapper/vg_oel63-lv_root
            18G 11G 5.9G 65% /
            tmpfs 496M 375M 121M 76% /dev/shm
            /dev/sda1 485M 55M 405M 12% /boot
            /dev/sdc1 9.9G 151M 9.2G 2% /data01
            [root@OEL63 ~]# vi /etc/fstab
            #
            # /etc/fstab
            # Created by anaconda on Tue Aug 20 00:50:32 2013
            #
            # Accessible filesystems, by reference, are maintained under '/dev/disk'
            # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
            #
            /dev/mapper/vg_oel63-lv_root / ext4 defaults 1 1
            UUID=c7219271-21be-4f0c-bc21-0dce3d881129 /boot ext4 defaults 1 2
            /dev/mapper/vg_oel63-lv_swap swap swap defaults 0 0
            tmpfs /dev/shm tmpfs defaults 0 0
            devpts /dev/pts devpts gid=5,mode=620 0 0
            sysfs /sys sysfs defaults 0 0

            proc /proc proc defaults 0 0

            /dev/sdc1 /data01 ext4 defaults 1 1
            @import url(http://www.shnenglu.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
            posted on 2016-06-22 11:53 聶文龍 閱讀(5873) 評論(0)  編輯 收藏 引用 所屬分類: Linux
            久久亚洲春色中文字幕久久久| 久久精品国产亚洲AV忘忧草18| 欧美色综合久久久久久| 久久免费视频一区| 久久综合噜噜激激的五月天| 99久久超碰中文字幕伊人| 久久伊人亚洲AV无码网站| 久久久久高潮综合影院| 久久99热只有频精品8| 久久性精品| 麻豆AV一区二区三区久久| 国产精品午夜久久| 欧美噜噜久久久XXX| 国产AⅤ精品一区二区三区久久| 亚洲午夜精品久久久久久浪潮| 18岁日韩内射颜射午夜久久成人| 亚洲精品无码久久久影院相关影片| 精品久久久久久国产牛牛app| 精品久久久久久久久午夜福利| 国产精品欧美久久久久无广告| 亚洲国产精品无码久久久不卡| 欧美一区二区精品久久| 久久97精品久久久久久久不卡| 久久精品无码专区免费青青| 无码AV波多野结衣久久| 久久国产香蕉视频| 亚洲欧美成人久久综合中文网| 精品久久久久久无码专区| 久久人人爽人人爽人人av东京热 | 欧美粉嫩小泬久久久久久久| 69久久夜色精品国产69| 久久婷婷久久一区二区三区| 国产精品无码久久综合| 亚洲成色WWW久久网站| 国产69精品久久久久久人妻精品| 亚洲国产精品一区二区久久hs| 伊人久久大香线蕉成人| 男女久久久国产一区二区三区| 久久精品国产亚洲AV蜜臀色欲 | 久久九九精品99国产精品| 亚洲国产美女精品久久久久∴|