इनलाइन डेटा को सक्षम करने के लिए ext4, आपको e2fsprogs1.43 या बाद के संस्करण की आवश्यकता होगी । इनलाइन डेटा के लिए समर्थन मार्च 2014 में gitरिपॉजिटरी में जोड़ा गया था , लेकिन केवल मई 2016 में जारी किया गया था।
आपके पास एक बार, आप mke2fs -O inline_dataइनलाइन डेटा समर्थन के साथ एक नया फाइल सिस्टम बनाने के लिए एक उपयुक्त डिवाइस पर चल सकते हैं ; यह आपके सभी डेटा को मिटा देगा । यह मौजूदा फ़ाइल सिस्टम पर इनलाइन डेटा को सक्रिय करने के लिए अभी तक संभव नहीं है (कम से कम, tune2fsइसका समर्थन नहीं करता है)।
अब एक छोटी फाइल बनाएं, और debugfsफाइल सिस्टम पर चलाएं । cdउपयुक्त निर्देशिका के लिए, और भागो stat smallfile; आपको कुछ मिलेगा
Inode: 32770 Type: regular Mode: 0644 Flags: 0x10000000
Generation: 2302340561 Version: 0x00000000:00000001
User: 1000 Group: 1000 Size: 6
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 0
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x553731e9:330badf8 -- Wed Apr 22 07:30:17 2015
atime: 0x553731e9:330badf8 -- Wed Apr 22 07:30:17 2015
mtime: 0x553731e9:330badf8 -- Wed Apr 22 07:30:17 2015
crtime: 0x553731e9:330badf8 -- Wed Apr 22 07:30:17 2015
Size of extra inode fields: 28
Extended attributes:
system.data (0)
Size of inline data: 60
जैसा कि आप देख सकते हैं कि डेटा इनलाइन संग्रहीत किया गया था। इसका उपयोग करके भी देखा जा सकता है df; फ़ाइल बनाने से पहले:
% df -i /mnt/new
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg--large--mirror-inline 65536 12 65524 1% /mnt/new
% df /mnt/new
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg--large--mirror-inline 1032088 1280 978380 1% /mnt/new
फ़ाइल बनाने के बाद:
% echo Hello >| smallfile
% ls -l
total 1
-rw-r--r-- 1 steve steve 6 Apr 22 07:35 smallfile
% df -i /mnt/new
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg--large--mirror-inline 65536 13 65523 1% /mnt/new
% df /mnt/new
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg--large--mirror-inline 1032088 1280 978380 1% /mnt/new
फ़ाइल वहाँ है, यह एक इनोड का उपयोग करता है लेकिन उपलब्ध संग्रहण स्थान नहीं बदला है।