{"id":309,"date":"2017-04-25T22:01:25","date_gmt":"2017-04-25T13:01:25","guid":{"rendered":"http:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/?p=309"},"modified":"2022-08-11T22:16:18","modified_gmt":"2022-08-11T13:16:18","slug":"linux%e3%81%a7%e5%88%a9%e7%94%a8%e5%8f%af%e8%83%bd%e3%81%aa%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af%e5%ae%b9%e9%87%8f%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6kernel%e3%82%bd%e3%83%bc%e3%82%b9%e3%82%92%e8%bf%bd","status":"publish","type":"post","link":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/?p=309","title":{"rendered":"Linux\u3067\u5229\u7528\u53ef\u80fd\u306a\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u306b\u3064\u3044\u3066kernel\u30bd\u30fc\u30b9\u3092\u8ffd\u3063\u3066\u78ba\u8a8d\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p>Ext4\u3067\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u30c7\u30a3\u30b9\u30af\u3092\u5bb9\u91cf\u9650\u754c\u307e\u3067\u4f7f\u3044\u5207\u308a\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305d\u3053\u3067df\u3068\u304b\u3067\u6b8b\u5bb9\u91cf\u304c\u3069\u308c\u304f\u3089\u3044\u304b\u78ba\u8a8d\u3057\u3066\u3044\u305f\u3089\u3069\u3046\u3082\u30b3\u30de\u30f3\u30c9\u306b\u3088\u3063\u3066\u5f97\u3089\u308c\u308b\u7d50\u679c\u304c\u9055\u3063\u3066\u3044\u3066\u3069\u308c\u3092\u4fe1\u3058\u308c\u3070\u826f\u3044\u306e\u304b\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u8272\u3005\u8abf\u3079\u305f\u3053\u3068\u306e\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001df\u3068tune2fs\u306e\u7d50\u679c\u306e\u3046\u3061Block count\u304c\u7570\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>tune2fs\u306e\u7d50\u679c<\/h3>\n<pre lang=\"shell\">\n$sudo tune2fs -l \/dev\/vda1\ntune2fs 1.42.13 (17-May-2015)\nFilesystem volume name:   <none>\nLast mounted on:          \/\nFilesystem UUID:          f320ede7-aa98-411b-a3f5-8aa678aa59d4\nFilesystem magic number:  0xEF53\nFilesystem revision #:    1 (dynamic)\nFilesystem 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\nFilesystem flags:         signed_directory_hash\nDefault mount options:    user_xattr acl\nFilesystem state:         clean\nErrors behavior:          Continue\nFilesystem OS type:       Linux\nInode count:              1245184\nBlock count:              4980480\nReserved block count:     249024\nFree blocks:              4215680\nFree inodes:              1115859\nFirst block:              0\nBlock size:               4096\nFragment size:            4096\nReserved GDT blocks:      1022\nBlocks per group:         32768\nFragments per group:      32768\nInodes per group:         8192\nInode blocks per group:   512\nFlex block group size:    16\nFilesystem created:       Thu Apr 13 10:19:41 2017\nLast mount time:          Fri Apr 21 04:00:57 2017\nLast write time:          Fri Apr 21 04:00:57 2017\nMount count:              5\nMaximum mount count:      -1\nLast checked:             Thu Apr 13 10:19:41 2017\nCheck interval:           0 (<none>)\nLifetime writes:          7270 MB\nReserved blocks uid:      0 (user root)\nReserved blocks gid:      0 (group root)\nFirst inode:              11\nInode size:               256\nRequired extra isize:     28\nDesired extra isize:      28\nJournal inode:            8\nDefault directory hash:   half_md4\nDirectory Hash Seed:      fc2f5507-186e-4828-b6bc-ef1d5ed91409\nJournal backup:           inode blocks\n<\/pre>\n<p>\u6ce8\u76ee\u3059\u3079\u304d\u70b9\u306f\u3001Block count\u306e\u5024\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u30014980480 \u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>df\u306e\u7d50\u679c<\/h3>\n<pre lang=\"shell\">\n$ df -B4096\nFilesystem     4K-blocks   Used Available Use% Mounted on\nudev               61266      0     61266   0% \/dev\ntmpfs              12452   1766     10686  15% \/run\n\/dev\/vda1        4869551 654973   3961458  15% \/\ntmpfs              62258      0     62258   0% \/dev\/shm\ntmpfs               1280      0      1280   0% \/run\/lock\ntmpfs              62258      0     62258   0% \/sys\/fs\/cgroup\ntmpfs              12452      0     12452   0% \/run\/user\/1000\n<\/pre>\n<p>Block size\u306f4096\u306a\u306e\u3067\u3001-B4096\u3092\u8ffd\u52a0\u3057\u3066\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\/dev\/vda1\u306e\u30d6\u30ed\u30c3\u30af\u6570\u306f4869551 \u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>df\u3068tune2fs\u306e\u9055\u3044<\/h3>\n<p>\u305d\u308c\u305e\u308c\u3001\u30c7\u30a3\u30b9\u30af\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u304c\u3001block\u6570\u306e\u7dcf\u548c\u304c\u7570\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<table>\n<tr>\n<td> tune2fs\u306b\u3088\u308b\u30d6\u30ed\u30c3\u30af\u6570 <\/td>\n<td> 4980480<\/td>\n<\/tr>\n<tr>\n<td> df\u306b\u3088\u308b\u30d6\u30ed\u30c3\u30af\u6570 <\/td>\n<td> 4869551 <\/td>\n<\/tr>\n<\/table>\n<h2>\u305d\u308c\u305e\u308c\u306e\u52d5\u4f5c\u306e\u9055\u3044<\/h2>\n<p>\u7d50\u679c\u304c\u9055\u3046\u306e\u3067\u304a\u305d\u3089\u304f\u8a08\u7b97\u306e\u3082\u3068\u306b\u3057\u3066\u3044\u308b\u65b9\u6cd5\u304c\u9055\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3001\u9069\u5f53\u306bstrace\u3067tune2fs\u3068df\u3092\u8ffd\u3044\u304b\u3051\u3066\u307f\u308b\u3068<\/p>\n<ul>\n<li>tune2fs\u306f\u30c7\u30d0\u30a4\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u76f4\u63a5\u8aad\u3093\u3067\u30c7\u30a3\u30b9\u30af\u306e\u30b5\u30a4\u30ba\u3092\u8fd4\u3057\u3066\u3044\u305d\u3046<\/li>\n<li>df\u306fstatfs\u3092\u5229\u7528\u3057\u3066\u30c7\u30a3\u30b9\u30af\u306e\u30b5\u30a4\u30ba\u3092\u8fd4\u3057\u3066\u3044\u305d\u3046<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2>\u5206\u304b\u3089\u306a\u3044\u6642\u306f\u30ab\u30fc\u30cd\u30eb\u3092\u8aad\u3080<\/h2>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001statfs\u304c\u5b9f\u969b\u306b\u8aad\u3093\u3067\u3044\u308bext4_statfs\u306e\u4e2d\u8eab\u3092\u8aad\u3093\u3067\u3044\u3051\u3070\u826f\u3044\u306f\u305a\u3002<\/p>\n<ul>\n<li>statfs\u304c\u547c\u3070\u308c\u307e\u3059 (<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/master\/arch\/x86\/entry\/syscalls\/syscall_64.tbl#L146\" target=\"_blank\" rel=\"noopener\">\u8a72\u5f53\u7b87\u6240<\/a>) <\/li>\n<li>sys_statfs\u304c\u547c\u3070\u308c\u307e\u3059\u3002\u30de\u30af\u30ed\u3067\u81ea\u52d5\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002(<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/master\/fs\/statfs.c#L172\" target=\"_blank\" rel=\"noopener\">\u8a72\u5f53\u7b87\u6240<\/a>) <\/li>\n<li>user_statfs\u304c\u547c\u3070\u308c\u307e\u3059\u3002 (<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/master\/fs\/statfs.c#L77\" target=\"_blank\" rel=\"noopener\">\u8a72\u5f53\u7b87\u6240<\/a>)<\/li>\n<li>vfs_statfs\u304c\u547c\u3070\u308c\u307e\u3059\u3002(<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/master\/fs\/statfs.c#L66\" target=\"_blank\" rel=\"noopener\">\u8a72\u5f53\u7b87\u6240<\/a>)<\/li>\n<li>statfs_by_dentry\u304c\u547c\u3070\u308c\u307e\u3059\u3002(<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/master\/fs\/statfs.c#L49\" target=\"_blank\" rel=\"noopener\">\u8a72\u5f53\u7b87\u6240<\/a>)<\/li>\n<li>dentry->d_sb->s_op->statfs\u304c\u547c\u3070\u308c\u308b\u3002\u3053\u308c\u306b\u306f\u5b9f\u969b\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u5408\u308f\u305b\u305f\u95a2\u6570\u30dd\u30a4\u30f3\u30bf\u304c\u5165\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002(<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/a643f9054c21f4fae0fbb4add663462fea7a47f0\/fs\/ext4\/super.c#L1262\" target=\"_blank\" rel=\"noopener\">\u53c2\u80031<\/a>\u3001<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/a643f9054c21f4fae0fbb4add663462fea7a47f0\/fs\/ext4\/super.c#L3913\" target=\"_blank\" rel=\"noopener\">\u53c2\u80032<\/a>\u3001<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/231753ef780012eb6f3922c3dfc0a7186baa33c2\/fs\/statfs.c#L60\" target=\"_blank\" rel=\"noopener\">\u53c2\u80033<\/a>)<\/li>\n<li>ext4_statfs\u304c\u547c\u3070\u308c\u307e\u3059\u3002(<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/a643f9054c21f4fae0fbb4add663462fea7a47f0\/fs\/ext4\/super.c#L5143\" target=\"_blank\" rel=\"noopener\">\u8a72\u5f53\u7b87\u6240<\/a>)<\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u6d41\u308c\u3067\u3059\u3002<\/p>\n<p>ext4\u306e\u521d\u671f\u5316(mount_bdev\u3068ext4_fill_super)\u306a\u3069\u306e\u4ed5\u7d44\u307f\u306f\u4eca\u306e\u3068\u3053\u308d\u5f37\u3044\u8208\u5473\u304c\u3042\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u5143\u6c17\u304c\u3042\u308b\u3068\u304d\u306e\u5bbf\u984c\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h3> ext4_statfs\u3067\u30d6\u30ed\u30c3\u30af\u30b5\u30a4\u30ba\u3092\u8a08\u7b97\u3057\u3066\u3044\u308b\u7b87\u6240 <\/h3>\n<pre lang=\"c\">\n    struct super_block *sb = dentry->d_sb;\n    struct ext4_sb_info *sbi = EXT4_SB(sb);\n    struct ext4_super_block *es = sbi->s_es;\n    ext4_fsblk_t overhead = 0, resv_blocks;\n    u64 fsid;\n    s64 bfree;\n    resv_blocks = EXT4_C2B(sbi, atomic64_read(&sbi->s_resv_clusters));\n\n    if (!test_opt(sb, MINIX_DF))\n        overhead = sbi->s_overhead;\n\n    buf->f_type = EXT4_SUPER_MAGIC;\n    buf->f_bsize = sb->s_blocksize;\n    buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead);\n<\/pre>\n<p>\u3053\u3053\u3067\u3001f_block\u304c\u77e5\u308a\u305f\u3044\u4e2d\u8eab\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u6ce8\u76ee\u3059\u308b\u884c\u3060\u3051\u629c\u304d\u53d6\u308b\u3068\u4ee5\u4e0b\u306e\u884c\u3060\u3051\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre lang=\"c\">\n    struct super_block *sb = dentry->d_sb;\n    struct ext4_sb_info *sbi = EXT4_SB(sb);\n    struct ext4_super_block *es = sbi->s_es;\n    ext4_fsblk_t overhead = 0;\n\n    if (!test_opt(sb, MINIX_DF))\n        overhead = sbi->s_overhead;\n\n    buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead);\n<\/pre>\n<p>ext4_blocks_count\u306e\u5b9f\u4f53\u3068\u3057\u3066\u306f\u3001<\/p>\n<pre lang=\"c\">\nstatic inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)\n{\n    return ((ext4_fsblk_t)le32_to_cpu(es->s_blocks_count_hi) << 32) |\n        le32_to_cpu(es->s_blocks_count_lo);\n}\n<\/pre>\n<p>es(ext4\u306esuper block)\u306e\u60c5\u5831\u304b\u3089block\u6570\u3092\u53d6\u5f97\u3057\u3066\u304d\u3066\u3044\u308b\u3060\u3051\u306b\u898b\u3048\u307e\u3059\u3002<\/p>\n<p>EXT4_C2B\u306e\u5b9f\u4f53\u306f\u3001<\/p>\n<pre lang=\"c\">\n#define EXT4_C2B(sbi, cluster)  ((cluster) << (sbi)->s_cluster_bits)\n<\/pre>\n<p>\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u3053\u3053\u307e\u3067\u6765\u305f\u3068\u3053\u308d\u3067\u3001ext4_blocks_count(es)\u306e\u5024\u304c\u4f55\u304b\u3001EXT4_C2B(sbi, overhead)\u304c\u5b9f\u969b\u3069\u306e\u3088\u3046\u306b\u306a\u308b\u306e\u304b\u304c\u5206\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u78ba\u8a8d\u3057\u305f\u304f\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2> \u56f0\u3063\u305f\u3068\u304d\u306eprintk <\/h2>\n<p>\u52d5\u4f5c\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u3064\u304b\u3080\u305f\u3081\u306b\u52d5\u4f5c\u3057\u3066\u3044\u308b\u30ab\u30fc\u30cd\u30eb\u4e0a\u306e\u5b9f\u969b\u306e\u5024\u3092printk\u3067\u51fa\u529b\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre lang=\"c\">\n    struct super_block *sb = dentry->d_sb;\n    struct ext4_sb_info *sbi = EXT4_SB(sb);\n    struct ext4_super_block *es = sbi->s_es;\n    ext4_fsblk_t overhead = 0, resv_blocks;\n    u64 fsid;\n    s64 bfree;\n    resv_blocks = EXT4_C2B(sbi, atomic64_read(&sbi->s_resv_clusters));\n\n    if (!test_opt(sb, MINIX_DF))\n        overhead = sbi->s_overhead;\n    printk(KERN_ALERT \"overhead: %d\", overhead);\n    printk(KERN_ALERT \"ext4_blocks_count(es): %d\", ext4_blocks_count(es));\n    printk(KERN_ALERT \"(sbi)->s_cluster_bits: %d\", (sbi)->s_cluster_bits);\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u306b\u5909\u66f4\u3057\u3066\u30ab\u30fc\u30cd\u30eb\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3001\u305d\u306e\u30ab\u30fc\u30cd\u30eb\u3067\u8d77\u52d5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p>df\u3092\u5b9f\u884c\u3057\u3066syslog\u306e\u4e2d\u8eab\u3092\u898b\u3066\u307f\u307e\u3059\u3002\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30ed\u30b0\u304c\u6b8b\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre lang=\"shell\">\nApr 25 12:27:43 packer-qemu kernel: [   83.645888] overhead: 110929\nApr 25 12:27:43 packer-qemu kernel: [   83.646111] ext4_blocks_count(es): 4980480\nApr 25 12:27:45 packer-qemu kernel: [   83.646384] (sbi)->s_cluster_bits: 0\n<\/pre>\n<p>\u3053\u3053\u3067\u3001\u8208\u5473\u6df1\u3044\u306e\u306fext4_blocks_count(es)\u306e\u7d50\u679c\u3067\u3059\u3002<br \/>\n\u3053\u306e\u5024\u306f\u3001tune2fs -l\u306eBlock count\u3068\u4e00\u81f4\u3057\u307e\u3059\u3002<\/p>\n<pre lang=\"shell\">\n$ sudo tune2fs -l \/dev\/vda1 |grep \"Block count\"\nBlock count:              4980480\n<\/pre>\n<p>\u3053\u306e\u7d50\u679c\u304b\u3089\u3001<\/p>\n<ul>\n<li>ext4_statfs\u306e\u30d6\u30ed\u30c3\u30af\u30b5\u30a4\u30ba\u306e\u7d50\u679c\u304ctune2fs\u306e\u7d50\u679c\u3068\u7570\u306a\u308b\u306e\u306f\u3001EXT4_C2B(sbi, overhead)\u306e\u5024\u306e\u5f71\u97ff<\/li>\n<li>(sbi)->s_cluster_bits\u306e\u5024\u30820\u306a\u306e\u3067\u3001EXT4_C2B\u306e\u6f14\u7b97\u306b\u3088\u3063\u3066\u30d3\u30c3\u30c8\u30b7\u30d5\u30c8\u306f\u5b9f\u884c\u3055\u308c\u3066\u3044\u306a\u3044<\/li>\n<li>EXT4_C2B\u306e\u7d50\u679c\u306foverhead\u306e\u5024\u305d\u306e\u3082\u306e\n<\/ul>\n<p>\u3068\u3044\u3046\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067overhead\u306e\u5024\u304c\u5909\u308f\u308b\u6761\u4ef6\u3068\u3057\u3066\u306f\u3001<\/p>\n<pre lang=\"c\">\n    if (!test_opt(sb, MINIX_DF))\n        overhead = sbi->s_overhead;\n<\/pre>\n<p>\u3053\u306e\u884c\u304c\u5b9f\u884c\u3055\u308c\u308b\u5834\u5408\u306e\u307f\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>s_overhead\u306f<a href=\"https:\/\/github.com\/torvalds\/linux\/blob\/a643f9054c21f4fae0fbb4add663462fea7a47f0\/fs\/ext4\/super.c#L3245\" target=\"_blank\" rel=\"noopener\">ext4_calculate_overhead<\/a>\u3067\u8a08\u7b97\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u3056\u3063\u304f\u308a\u898b\u308b\u3068\u3001\u5404\u30b0\u30eb\u30fc\u30d7\u3054\u3068\u306eoverhead\u3092\u8a08\u7b97\u3057\u8db3\u3057\u5408\u308f\u305b\u3066\u3001\u30b8\u30e3\u30fc\u30ca\u30eb\u304c\u3042\u308b\u5834\u5408\u306f\u305d\u306eoverhead\u3082\u8ffd\u52a0\u3057\u3066\u3044\u308b\u51e6\u7406\u306b\u898b\u3048\u307e\u3059\u3002<\/p>\n<h3> MINIX_DF \u3063\u3066\u4f55 <\/h3>\n<p>mount\u306e<a href=\"https:\/\/linuxjm.osdn.jp\/html\/util-linux\/man8\/mount.8.html\">man<\/a>\u304c\u5f15\u3063\u304b\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>\n\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb statfs \u306e\u632f\u308b\u821e\u3044\u3092\u8a2d\u5b9a\u3059\u308b\u3002 minixdf \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u8fd4\u308a\u5024\u306e f_blocks \u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u5168\u30d6\u30ed\u30c3\u30af\u6570\u304c\u5165\u308b\u3088\u3046\u306b\u306a\u308a\u3001 bsddf \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001ext2 \u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u3088\u3063\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u3066\u3001 \u30d5\u30a1\u30a4\u30eb\u306e\u4fdd\u5b58\u9818\u57df\u3068\u3057\u3066\u306f\u4f7f\u3048\u306a\u3044\u30d6\u30ed\u30c3\u30af\u306e\u5206\u3092\u5f15\u3044\u305f\u5024\u304c\u5165\u308b\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u306f bsddf\u3002\n<\/p><\/blockquote>\n<p>\u3044\u307e\u307e\u3067\u8aad\u3093\u3067\u304d\u305f\u30b3\u30fc\u30c9\u5185\u5bb9\u3068\u4e00\u81f4\u3057\u307e\u3059\u306d\uff01<br \/>\n\u3068\u3044\u3046\u304b\u30de\u30a6\u30f3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u3067statfs\u306e\u7d50\u679c\u304c\u5909\u308f\u308b\u306a\u3093\u3066\u77e5\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3088\uff01<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u3042\u305f\u308a\u3067\u3001\u81ea\u5206\u7684\u306b\u306f\u8abf\u67fb\u3068\u3057\u3066\u5341\u5206\u306a\u7d50\u8ad6\u304c\u5f97\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li>mount\u306e\u30aa\u30d7\u30b7\u30e7\u30f3(minixdf\/bsddf)\u3067statfs\u306e\u8fd4\u3059\u30d6\u30ed\u30c3\u30af\u3059\u308b\u306b\u5909\u5316\u304c\u767a\u751f\u3059\u308b<\/li>\n<li>tune2fs\u306fext4\u3068\u3057\u3066\u78ba\u4fdd\u3057\u3066\u3044\u308bblock\u6570\u3092\u8fd4\u3057\u3066\u3044\u308b<\/li>\n<li>df\u306fstatfs\u3092\u547c\u3073\u51fa\u3057\u30de\u30a6\u30f3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5f93\u3063\u305f\u52d5\u4f5c\u3067ext4\u3068\u3057\u3066\u78ba\u4fdd\u3057\u3066\u3044\u308bblock\u6570\u304b\u3089overhead\u3092\u5f15\u3044\u305f\u3082\u306e\u3001\u3082\u3057\u304f\u306fext4\u3068\u3057\u3066\u78ba\u4fdd\u3057\u3066\u3044\u308bblock\u6570\u3092\u8fd4\u3057\u3066\u3044\u308b<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u4e8b\u5b9f\u304b\u3089\u3001\u300c<strong>\u901a\u5e38\u306e\u74b0\u5883\u3067\u306fdf(bsddf\u306estatfs)\u7d50\u679c\u306e\u30d6\u30ed\u30c3\u30af\u6570\u3092\u57fa\u6e96\u3068\u3057\u3066\u30c7\u30fc\u30bf\u304c\u66f8\u304d\u8fbc\u3081\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u65ad\u3059\u308c\u3070\u3088\u3044<\/strong>\u300d\u3068\u3044\u3046\u904b\u7528\u306b\u6c7a\u5b9a\u3067\u304d\u305d\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ext4\u3067\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u30c7\u30a3\u30b9\u30af\u3092\u5bb9\u91cf\u9650\u754c\u307e\u3067\u4f7f\u3044\u5207\u308a\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002 \u305d\u3053\u3067df\u3068\u304b\u3067\u6b8b\u5bb9\u91cf\u304c\u3069\u308c\u304f\u3089\u3044\u304b\u78ba\u8a8d\u3057\u3066\u3044\u305f\u3089\u3069\u3046\u3082\u30b3\u30de\u30f3\u30c9\u306b\u3088\u3063\u3066\u5f97\u3089\u308c\u308b\u7d50\u679c\u304c\u9055\u3063\u3066\u3044\u3066\u3069\u308c\u3092\u4fe1\u3058\u308c\u3070\u826f\u3044\u306e\u304b\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u8272\u3005\u2026 <span class=\"read-more\"><a href=\"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/?p=309\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[7],"tags":[],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-7"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wwqG-4Z","_links":{"self":[{"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309"}],"version-history":[{"count":63,"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":1031,"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions\/1031"}],"wp:attachment":[{"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/light-of-moe.ddo.jp\/~sakura\/diary\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}