File System

ก่อนหน้านี้เราเคยเห็น ข่าวลือ เรื่องนี้มาก่อนแล้ว ล่าสุดบล็อก Building Windows 8 ของไมโครซอฟท์เพิ่งออกมาเปิดเผยข้อมูลของมันอย่างเป็นทางการ
อธิบายแบบสั้นๆ คือ Windows 8 จะมีระบบไฟล์ (file system) แบบใหม่ที่เป็นภาคต่อของ NTFS ที่ใช้กันมานาน ระบบไฟล์ตัวใหม่มีชื่อเรียกว่า Resilient File System หรือตัวย่อ ReFS ซึ่งมีคุณสมบัติเด่นที่ความเหนียวแน่น (resilence) ของมันในการรับมือกับปัญหาระบบไฟล์พัง
ReFS จะเสร็จพร้อมใช้ใน Windows 8 แต่ไมโครซอฟท์พยายามปรับตัวแบบค่อยเป็นค่อยไป ดังนั้นในขั้นแรก มันจะถูกใช้กับ Windows Server 8 ก่อนเฉพาะในพาร์ทิชันเก็บข้อมูล จากนั้นในอนาคตข้างหน้า ไมโครซอฟท์จะเพิ่มมันเข้ามาใน Windows Client รุ่นหน้า (อาจจะเป็น Windows 9) ในฐานะระบบไฟล์สำหรับเก็บข้อมูลเช่นกัน และสุดท้ายมันจะเข้ามาทดแทน NTFS อย่างสมบูรณ์ในพาร์ทิชันที่วินโดวส์ติดตั้งอยู่ (boot partition)

การใช้โค้ดร่วมกับ NTFS

จุดเด่นของไมโครซอฟท์ในช่วงหลังคือความเข้ากันได้ (compatibility) ซึ่งในกรณีของ ReFS ก็ไม่ต่างกันนัก ไมโครซอฟท์ต้องการให้ ReFS ทำงานร่วมกับระบบเดิมๆ ที่ใช้ NTFS ได้ทันที แนวทางการออกแบบของไมโครซอฟท์จึงยกโค้ดที่เกี่ยวข้องกับ file system API (เช่น การขอระบบไฟล์ให้อ่าน-เขียน-ลบไฟล์) ของ NTFS มาเลย แล้วเปลี่ยนแปลงเฉพาะเอนจินฐานล่างที่จัดการกับไฟล์บนดิสก์

แนวทางการออกแบบนี้ถือว่าน่าสนใจมาก เพราะความเข้ากันได้กับระบบเก่าอยู่ในระดับสูง (ไม่ทั้งหมด 100%) และโค้ดส่วน file system API เดิมถูกพัฒนามานาน ผ่านการทดสอบมาเยอะ บั๊กย่อมน้อยกว่าการเขียนใหม่ทั้งหมด

คุณสมบัติของ ReFS

สิ่งที่เพิ่มเข้ามาใน ReFS ส่วนมากเป็นการแก้ปัญหาเรื่องระบบไฟล์พัง ป้องกันไฟล์มีปัญหา โดยคงฟีเจอร์หลายๆ อย่างของ NTFS อย่าง BitLocker, symbolic links, ACL, file ID ฯลฯ มาด้วย
ฟีเจอร์ส่วนใหญ่เป็นเรื่องของเทคนิคด้าน file system ใครสนใจก็อ่านเพิ่มได้ที่ต้นฉบับ ละเอียดดีมาก

  • ตัว storage engine เก็บข้อมูลแบบ B+ tree ที่ได้รับความนิยมในระบบไฟล์ยุคใหม่
  • ตรวจสอบความถูกต้องของข้อมูลผ่านการ checksum (ฟีเจอร์ของ journaling file system)
  • มี checksum แยกของไฟล์ (integrity stream) มาให้เลือกใช้ (ฟีเจอร์นี้จะไม่เปิดเป็น default)
  • ใช้วิธีการเขียนไฟล์แบบ copy on write หรือ allocate-on-write ซึ่งจะเขียนไฟล์บนบล็อคใหม่แทนการเขียนทับบนบล็อคเก่า ช่วยแก้ปัญหาข้อมูลเก่าพังเวลาเขียนไฟล์แล้วมีปัญหาได้
  • มันถูกออกแบบมาให้ทำงานร่วมกับ Storage Spaces ซึ่งเป็นฟีเจอร์ใหม่อีกอย่างหนึ่งของ Windows 8 (อธิบายแบบสั้นๆ มันคือ Software RAID เวอร์ชันของไมโครซอฟท์ แบบละเอียดอ่านที่ Storage Spaces) ซึ่งช่วยสำรองระบบไฟล์บนดิสก์อีกตัวหนึ่ง และซ่อมกลับมาได้เมื่อดิสก์ตัวใดตัวหนึ่งมีปัญหา
  • ในกรณีที่ทุกอย่างสิ้นหวังจริงๆ มีดิสก์สองตัวไฟล์ก็ยังพัง การกู้ระบบคืนก็ถูกออกแบบมาให้ง่ายและเร็ว โดย ReFS จะดึงข้อมูลที่มีปัญหาออกจากระบบไฟล์ เพื่อให้ระบบโดยรวมทำงานต่อไปได้ก่อน ตรงนี้ทำได้เร็วและไม่ต้องรอกู้ไฟล์ทั้งระบบ ซึ่งเวลาเป็นเรื่องสำคัญในกรณีของเซิร์ฟเวอร์
  • รองรับดิสก์ขนาดใหญ่ ไฟล์จำนวนมากๆ โดยระบบไฟล์ขนาดใหญ่ที่สุดที่รองรับคือ 2^78 ไบต์ (ซึ่งวินโดวส์แบบ 64 บิตสามารถอ้างได้แค่ 2^64 ไบต์)

ข้อมูลเชิงเทคนิค

ยกตารางของไมโครซอฟท์มาเลยนะครับ

table { border-top: 1px solid #ccc; border-left: 1px solid #ccc }
tr { border-bottom: 1px solid #ccc; }
td { border-right: 1px solid #ccc; }

<td valign="top" width="279">
<p align="left"><b>Attribute</b></p>
</td>

<td valign="top" width="296">
<p align="left"><b>Limit based on the on-disk format</b></p>
</td>
</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum size of a single file</p>
</td>

<td valign="top" width="296">
<p align="left">2^64-1 bytes</p>
</td>

</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum size of a single volume</p>
</td>

<td valign="top" width="296">
<p align="left">Format supports 2^78 bytes with 16KB cluster size (2^64 * 16 * 2^10). Windows stack addressing allows 2^64 bytes</p>

</td>
</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum number of files in a directory</p>
</td>

<td valign="top" width="296">

<p align="left">2^64</p>
</td>
</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum number of directories in a volume</p>
</td>

<td valign="top" width="296">
<p align="left">2^64</p>
</td>
</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum file name length</p>

</td>

<td valign="top" width="296">
<p align="left">32K unicode characters</p>
</td>
</tr>

<tr>
<td valign="top" width="279">

<p align="left">Maximum path length</p>
</td>

<td valign="top" width="296">
<p align="left">32K</p>
</td>
</tr>

<tr>

<td valign="top" width="279">
<p align="left">Maximum size of any storage pool</p>
</td>

<td valign="top" width="296">
<p align="left">4 PB</p>
</td>
</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum number of storage pools in a system</p>
</td>

<td valign="top" width="296">
<p align="left">No limit</p>
</td>

</tr>

<tr>
<td valign="top" width="279">
<p align="left">Maximum number of spaces in a storage pool</p>
</td>

<td valign="top" width="296">
<p align="left">No limit</p>

</td>
</tr>
</tbody></table>

ประเด็นอื่นๆ

  • Windows Server 8 ไม่สามารถบูตจากพาร์ทิชันที่เป็น ReFS ได้
  • ReFS ไม่สามารถใช้ได้กับ removable media
  • ยังไม่รองรับการแปลง NTFS เป็น ReFS ได้โดยตรง เนื่องจากข้อมูลปัจจุบันมีขนาดใหญ่และอาจมีปัญหาในการแปลง ไมโครซอฟท์จึงจงใจให้ใช้วิธีก็อปปี้ข้อมูลจาก NTFS มาลง ReFS แทน

รายละเอียดที่เหลืออ่านกันเองตามลิงก์ เหมาะมากสำหรับคนที่สนใจเรื่องการออกแบบระบบไฟล์ครับ
ที่มา - Building Windows 8

Hiring! บริษัทที่น่าสนใจ

Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand