01/02/2023
Harddisk အကြောင်း ပြောကြမယ်...... (part-1)...................................................................................
Harddisk တွေဟာ Non-Volatile Memory အမျိုးအစား ဖြစ်ပါတယ်။ stroage device တွေဖြစ်သော tape တို့ Floppy disk တွေ နရာမှာ အစားထိုးရန် အသုံးပြုပါသည်။ Harddrive တွေကို 1950 မှာ စတင်ထုတ်လုပ်ခဲ့ပါတယ်။ fixed disk (or) Wi******er လို့ IBM က မှည့်ခေါ်ခဲ့ပြီး နောက်ပိုင်းမှာတော့ Harddisk လို့ပြောင်းလဲ ခေါ်ဝေါ်ခဲ့ပါတယ်။
Harddisk တစ်လုံးမှာ
1. Geometry (platters)
2. Head (read/write)
3. Voice coil (Actulator Axis)
4. Actulator Arm
စသည်တို့ ပါဝင်ပါတယ်။
Geometry ဆိုတာ data တွေသိမ်းထားနိုင်တဲ့ platter တွေ စုစည်းထားတဲ့ volume တခုပဲ ဖြစ်ပါတယ်။ platter တခုချင်းစီမှာ data သိမ်းနိုင်တဲ့ မျက်နှာပြင် နှစ်ခုပါ,ပါတယ်။
Head ဆိုတာကတော့ platter ပေါ်မှာ data တွေကို read /write လုပ်တဲ့ အလုပ်ကို လုပ်ပါတယ်။ platter တွေရဲ့ read/write လုပ်နိုင်တဲ့ မျက်နှာပြင် နှစ်ခုပါတဲ့အတွက် platter တခုမှာ head နှစ်ခုရှိပါတယ်။
Voice Coil (Actulator Axis) ဆိုတာက platter ပေါ်က data တွေကို လွယ်ကူစွာဖတ်နိုင်အောင် လိုအပ်သလို ရွေ့ပေးနိုင်တဲ့ Axis ဖြစ်ပါတယ်။
Actulator Arm ဆိုတာကတော့ head နဲ့ voice coil ကို ချိတ်ဆက်ထားပေးတဲ့ Arm ဖြစ်ပါတယ်။
Harddisk CHS value
Harddisk ရဲ့ capacity ကို CHS value တွေက ဆုံးဖြတ်ပေးပါတယ်။ older system တွေမှာ CHS vaule တွေကို BIOS ထဲမှာ manual ရိုက်ထည့်ရပါတယ်။ Modern System တွေမှာတော့ Auto detect သိနေပါပီး။
What is CHS......?
C stands for Cylinder.
H stands for Head.
S stands for Sector.
What is Cylinder....??
Geometry ရဲ့ တူညီတဲ့ track တွေဟာ cylinder ပဲဖြစ်ပါတယ်။ နည်းနည်းရှုပ်နေမယ်။ Geometry ဆိုတာ platter တွေ ထပ်ပြီးစုစည်းထားတာပါ။ platter တခုချင်းမှာ data ကို store လုပ်ထားနိုင်တဲ့ track လေးတွေ ရှိပါတယ်။ track 0,track 1 စသည့်ဖြင့်ပေါ့။ Geometry ရဲ့ တူညီတဲ့ track လမ်းကြောင်းတွေကို စုပေါင်းပြီး Cylinder လို့ခေါ်ဆိုတာ ဖြစ်ပါတယ်။
What is Head.....??
Track (platter) ပေါ်က data တွေကို read/write လုပ်ပေးနိုင်တဲ့နိုင်ပါတယ်။ platter တခုချင်းမှာ head နှစ်ခုစီ ရှိပါတယ်။
What is Sector.....??
Platter ပေါ်က track တွေကို အပိုင်းလိုက်ပိုင်းလိုက်ခြင်းအာဖြင့် sector လေးတွေ ရရှိမှာ ဖြစ်ပါတယ်။ 512byte ကနေ 4KB ထိရှိပါတယ်။
CHS value တွေဟာ physical address တွေဖြစ်ပါတယ်။
Data Encoding
Harddisk Drive (HDD) ဟာ Magnetic Data Stroage Device ဖြစ်ပါတယ်။ Computer က Binary and Hexadecimal number ဖြစ်ပါတယ်။ ဒီတော့ Binary and Hexadecimal ကို Magnetic Data ပြောင်းပီး သိမ်းရပါတယ်။ data encode လို့ခေါ်ပါတယ်။ 1991 ပတ်ဝန်းကျင်မှာ Run Length Limited (RLL) encoding system ကို အသုံးပြုပါတယ်။ Modern HDD တွေမှာတော့ Partial Response Maximum Likelihood (PRML) encoding system ကို အသုံးပြုပါတယ်။
HDD Interfaces
Western Digital and Compaq တို့က AT Attachment (ATA) interface ကို 1989 March မှာ developed လုပ်ခဲ့ပါတယ်။
1. PATA (parallel advanced technology attachment)
2. SATA (serial advanced technology attachment)
3. SCSI (small computer system interface)
CHS vs LBA
CHS ဆိုတာ HDD သိမ်းတဲ့အခါ cylinder(track) ပေါ်က sector မှာ သိမ်းပြီး သက်ဆိုင်ရာ head က ဖတ်ရပါတယ်။ sector တခုရဲ့ size သည် 512bytes ရှိပါသည်။ Old System မှာသုံးတဲ့ HDD တွေမှာ CHS value အသုံးပြုပြီ Modern HDD တွေမှာ LBA ကို အသုံးပြုပါတယ်။ CHS ကို physical block address လို့လည်းခေါ်ပါတယ်။ CHS value တွေဟာ
0,0,1 (0 for cylinder, 0 for head and 1 for sector)
0,1,1 (0 for cylinder, 1 for head and 1 for sector)
စသည်ဖြင့် ဖော်ပြပါတယ်။ အချို့သော HDD ပေါ်မှာ CHS value တွေ ပါရှိတတ်ပါတယ်။ ပုံတွင်ကြည့်ရန်။
Eg.
16383/16/63 ဆိုရင်
16383 သည် cylinder(track) ဖြစ်ပါတယ်
16 သည် head ဖြစ်ပါတယ်။
63 သည် sector ဖြစ်ပါတယ်။
Why used Logical Geometry ...???
Harddisk ရဲ့ Geometry ရဲ့ တည်ဆောက်ပုံအရ platter တွေရဲ့ အပြင်ဘက်မှာ တည်ရှိနေတဲ့ sector တွေနဲ့ အတွင်းဘက်မှာ တည်ရှိနေတဲ့ sector တွေက အရွယ်အစား မတူကြပါဘူး။ဒီပြသနာကို sector translation ကို အသုံးပြုပြီးဖြေရှင်းခဲ့ပါတယ်။ နောက်ပီး harddisk တစ်လုံးမှာ capacity တွေက များလာတဲ့အခါ physical head တွေ အများကြီး တပ်ဆင်ရမယ်ဆိုရင် harddisk ကြီးက အထူကြီးဖြစ်သွားမှာပါ။ ဒီပြသနာကို ရှင်းမို့ physical Geometry နဲ့ Logical Geometry ဆိုပြီး မိတ်ဆက်ခဲ့တာ ဖြစ်ပါတယ်။ physical မှာပါတဲ့ CHS အရေအတွက်နဲ့ Logical က အရေအတွက်မတူပါဘူး။
Physical Geometry
Cylinder 16384
Heads 4
Sector/track 63
Total capacity 2.1GB ဆိုရင်
Logical Geometry ပြန်ဖွဲ့ရင်
Cylinder 1024 (10bits)
Heads 64(6bits)
Sectors/track 63(6bits) becoz sector start 1 to 63
Total capacity 2.1GB
Logical မှာက ATA version အလိုက် address bits တွေ ကွဲပြားပါတယ် ခင်ဗျာ။
ATA 22bits
ATA 28bits
ATA 32bits
ATA 48bits and ATA 64 bits ဆိုပြီးရှိပါတယ်။
Modern HDD မှာ Data ဘယ်လောက်သိမ်းနိုင်ဆိုတာ Logical Geometry ပေါ်မူတည်ပါတယ်။
Eg...
28bits ATA and sector size က 4KB(4096bytes)
2^28 = 268,435,456 sectors
268,435,456 x 4096(4KB) = 1,099,511,627,776(1TB)
Modern HDD ရဲ့ data တွေကို read/write လုပ်နိုင်မို့ CHS value တွေကို BIOS က convert လုပ်ရပါတယ်။ convert လုပ်ရာတွင်
1. INT13 (24bits) - 137GB Maximum capacity
2. ATA (28bits) -
စသည့့်တို့ဖြစ်ပါတယ်။
CHS ရဲ့ sector size သည် 512bytes to 4kilobyte ဖြစ်ပါတယ်။
======================================
Harddisk အကြောင်း ပြောကြမယ်...... (part-2)...................................................................................
Harddisk ကို CPU က လှမ်း accept လုပ်ရာမှာ method နှစ်ခု ရှိပါတယ်။
1. PIO (programmed I/O)
2. DMA (Direct Memory Access)
1. PIO mode မှာ CPU က Harddisk ကို accept လုပ်ရန် BIOS ကို အသုံးပြုပါတယ်။
2. DMA mode မှာတော့ old system dma command ကို သုံးပြီး Harddisk ထဲက data တွေကို RAM ပေါ် ဆွဲတင်ပါတယ်။
ATA version အလိုက် အသုံးပြုတဲ့ mode တွေက
ATA-1
PIO mode 0 - 3.3MBps
PIO mode 1 - 5.2MBps
PIO mode 2 - 8.3MBps
Single-Word DMA mode 0 - 2.1MBps
Single-Word DMA mode 1 - 4.2MBps
Single-Word DMA mode 2 - 8.3MBps
LBA 28bits ကို အသုံးပြုပါတယ်။
ATA-2
PIO mode 1 - 11.1MBps
PIO mode 2 - 16.6MBps
Multi-Word DMA mode 0 - 2.1MBps
Multi-Word DMA mode 1 - 4.2MBps
Multi-Word DMA mode 2 - 8.3MBps
Advanced Technology Attachment Packet Interface (ATAPI)
Support 2 or 4 harddrive as master and slave.
ATA-3
Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T) include
ATA-4
ATA-4 မှာ Ultra DMA mode ကို introduce လုပ်ခဲ့ပါတယ်။
Ultra DMA mode 0 - 16.7MBps
Ultra DMA mode 1 - 23.0MBps
Ultra DMA mode 2 - 33.3MBps
ATA-5
Ultra DMA mode 3 - 44.4MBps
Ultra DMA mode 4 - 66.6MBps
ATA မှာ 80wires 40pins ribbon cable စ,ထွက်ရှိလာပါတယ်။ ATA/66 cable လို့ခေါ်ပါတယ်။အပြာရောင် connector ကို controller မှာ တပ်ဆင်ရပါမရ်။အလယ်မှာ ရှိနေတဲ့ grey connector ကတော့ slave အတွက်ဖြစ်ပါတယ်။ connector black ကတော့ Master အတွက်ဖြစ်ပါတယ်။
ATA-6
LBA 48bits ထွက်ရှိလာပါပြီး။ older 24bits LBA နဲ့ INT 13 extension တိူ့နေရာမှာ LBA 48bits ကို အစားထိုးခဲ့ပါတယ်။
HDD stroage capacity က
2^48 = 281,474,976,710,656 sectors
281,474,976,710,656 x 5= 144,115,188,075,855,872bytes (144PB)
ထိ data သိမ်းနိုင်နေပါပီး။ဒါပေမဲ့ MBR က 2TB ထိပဲ လက်ခံနိုင်တဲ့ ပြသနာလေး ရှိနေသေးပါတယ်။
ATA-6 မှာ ATA/100 (80wires 40pins) ထွက်ပေါ်လာပါတယ်။
Ultra DMA mode 5 - 100MBps
ATA- 7
ATA /133 လို့ခေါ်ပါတယ်။ ATA-7 မှာ SATA (serial ATA) ထွက်ရှိလာပါတယ်။ sATA ရဲ့ controller က Host Bus Adapter (HBA) ဖြစ်ပါတယ်။sATA မှာ master slave မရှိပါဘူး ခင်ဗျာ။sATA speed တွေကတော့
sATA 1.0 - 1.5 Gbps (150MBps)
sATA 2.0 - 3Gbps (300MBps)
sATA 3.0 - 6Gbps (600MBps)
Vista နဲ့ နောက်ပိုင်း operating system တွေဟာ Advanced Host Controller Interface (AHCI) support လုပ်တဲ့အတွက် Hot swapping တို့ Native Command Queuing (NCQ) တို့ ပါဝင်ပါတယ်။
Bios must support
======================================
Harddisk အကြောင်း ပြောကြမယ်...... (part-3)...................................................................................
Harddisk တစ်လုံးကို တပ်ဆင်လိုက်တာနဲ့ ယျေဘုယျအားဖြင့် လုပ်ဆောင်ရမယ့် opreation တွေရှိပါတယ်။
1. Formatting
2. Partition
1. Formatting
Formatting နှစ်မျိုးရှိပါတယ်။
1. Low Level Formatting
2. High Level Formatting
1. Low Level Formatting
Order system တွေမှာ တပ်ဆင်တဲ့ Harddrive တွေဟာ capacity နည်းတဲ့ အတွက် physical block address ဖြစ်တဲ့ CHS value နဲ့ အလုပ်ကြပါတယ်။
Eg.
Cylinder 1024
Head. 16
Sector 63
Total Capacity. = 1024 x 16 x 63 x 512byte (sector/track)
= 504MB
ဒါကို Low Level Format ပြောင်းမယ်ဆိုရင်
CHS 0/0/1 (sector 1 ကနေ စ,ပါတယ်။)
CHS 0/0/2
CHS 0/0/3 etc...
CHS 1020/16/63 အထိဖြစ်ပါတယ်
1. For MBR
2. For GPT
1. For MBR
Master Boot Record ဟာ CHS value နဲ့သာ အလုပ်လုပ်ပါတယ်။ so,
HDD ရဲ့ CHS သတ်မှတ်တာကို Low Level Format လို့ခေါ်ပါတယ်။ ဒီနေရာမှာ နှစ်နည်း ထပ်ရှိပါတယ်။
1. Physical CHS
2. Logical CHS
1. Physical CHS
အရင်တုန်းက HDD တွေဟာ capacity အရမ်းနည်းတဲ့ အတွက် Physical CHS ကိုသာ အသုံးပြုပါတယ်။
Eg.
Cylinder 1024
Head. 16
Sector. 63
Total - 504
LLF
CHS 0/0/1 to CHS 1024/16/63 အထိ ဖြစ်ပါတယ်။
နောက်ပိုင်းမှာ Harddisk တွေရဲ့ capacity ဟာ 1TB, 2TB စသည့်တို့ဖြစ်လာပါတယ်။ ရိုးရိုးပဲစဉ်းစားမယ်ဆိုရင် capacity များလာတဲ့အခါ head အရေအတွက် platter အရေအတွက် အများကြီး ထည့်သွင်း တည်ဆောက်ရမှာဖြစ်ပါတယ်။ ဒါဆို Harddisk size က အရမ်းကြီးသွားမှာပေါ့။ ဒီပြသနာကိုရှင်းနိုင်ရန် physical Geometry(CHS) ကို Logical Geometry ပြောင်းလိုက်ပါတယ်။ ဘာထူခြားသွားလဲဆိုတော့ physical geometry မှာ CHS value ဘယ်လောက်ပဲ ဖြစ်နေပါစေ Logical Geometry ပြောင်းတဲ့အခါ အသုံးပြုတဲ့ method အလိုက် CHS ကို ပြန်သတ်မှတ်ပါတယ်။ရှုပ်သွားပြီးထင်ပါတယ်။
Eg.
Physical Geometry (CHS value)
Cylinder. - 16384
Heads. - 4
Sector/track - 63
Total capacity 2.1GB ဆိုရင်
Change to Logical Geometry(CHS) by Using LBA 22bits
Cylinder - 1024 (10bits)
Heads - 64(6bits)
Sectors/track - 63(6bits) becoz sector start 1 to 63
Total capacity 2.1GB
ရလာတဲ့ Logical CHS ကို တန်ဖိုးသတ်မှတ်တာဟာ Low Level Format လုပ်ခြင်းလို့ခေါ်ပါတယ်။
Low Level Format
CHS 0/0/1 to CHS 1024/64/63 အထိ ဖြစ်ပါတယ်။
Physical to Logical ပြောင်းတာကို Translate လုပ်တယ်လို့ခေါ်ဆိုပြီး Bios က လုပ်ဆောင်ပေးနိုင်ပါတယ်။ ဒီလို translate လုပ်ရာတွင် BIOS က method နှစ်မျိုးသုံးပါတယ်။
1. INT13 (24bits)
2. ATA (22bits,28bits,32bits,48bits,64bits)
2. for GPT
Physical To Logical CHS အရင်ပြောင်းတယ် ရလာတဲ့ Logical CHS တွေမှ LBA ထပ်ပြောင်းပါတယ်။ ဒါကို LLF(Low Level Format) လုပ်ခြင်းလို့ခေါ်ပါတယ်။
0/0/1 ကို lba ပြောင်းရင် LBA-0 ရပါတယ်။ပုံသေနည်းက
A = (C x HPC + H) x SPT + (S - 1)
= ( 0 x 1024 + 0) x 63 + (1 - 1)
= (0 x 63) + 0
= 0
If 0/0/2
A = (0 x 1024 + 0) x 63 + (2 -1)
= (0 x 63) + 1
= 1
A stands for Logical Block Address (LBA).
C stands for Cylinder.
H stands for Head.
S. stands for Sector.
HPC stands for Head per Cylinder.
SPT stands for Sector per Track.
Modern HDD တွေမှာ စက်ရုံက တခါတည်း Low level format တခါတည်း လုပ်ပေးပီးသားဖြစ်ပါတယ်။ အကယ်၍ လုပ်ချင်တယ်ဆို third party software တွေနဲ့ လုပ်နိုင်ပါတယ် ခင်ဗျာ။
2. Partitions
High level formating အကြောင်း မပြောခင် windows က accept လုပ်နိုင်တဲ့ partition တွေကြောင်းပြောရအောင်...ဘာကြောင့်လဲဆိုတော့ partition ပိုင်းပီးမှသာ high level format ဆိုတဲ့ file system ကို သတ်မှတ်လို့ရတာကြောင့်ပဲ ဖြစ်ပါတယ်။
Os တင်တော့မယ်ဆိုရင် ဘယ် Os ပဲ တင်တင် partition အနည်းဆုံး တပိုင်းရှိရပါမယ်။
no partition no install Os.
So.....
Harddisk မှာ
1. Basic Disk
2. Dynamic Disk ဆိုပီး ရှိပါတယ်
1. Basic Disk မှာ
1. Master Boot Record
2. GPT (GUID Partiton Table) ဆိုပြီးရှိပါတယ်။
1. Master Boot Record
Computer ကို power စ, On လိုက်ချိန်မှာ Cpu execute လုပ်မယ့် process တွေဟာ RAM ပေါ်မှာ မရှိသေးပါဘူး။ ဒီတော့ BIOs ထဲမှာရှိတဲ့ Code မပါဘဲ Pc boot တတ်မရနိုင်ပါဘူး။ PC Power On လိုက်တာနဲ့ ဘယ် address ကို စ,တင် execute လုပ်ရပါဆိုပြီး Code တခုကို Create လုပ်ခဲ့ပါတယ်။ ဒါကို Startin point လို့ခေါ်ပါတယ်။
Hdd မှာလည်း ဒီလိုပါပဲ။ Opreating system ကို Bios က load လုပ်နိုင်မယ့် နေရာမှာ code လေးကို ဖန်တီးထားရပါမယ်။ BIOS က သူဖတ်ရမယ့် Stratin point နေရာမှာ startin code (instructions) မရှိပဲ opreating system load လုပ်နိုင်မှာ မဟုပါဘူး ခင်ဗျာ။ ဒီကုတ်ရှိတဲ့ နေရာကို Master Boot Record လို့ခေါ်ပြီး HDD ရဲ့ ပထမဆုံး sector မှာ တည်ရှိပါတယ်။ MBR မှာ Opreating system load လုပ်ရမယ့် information တွေ instructions တွေ ပါဝင်ပါတယ်။
Master Boot Record တွင်
1. Master Partition Table
2. Master Boot Code
1. Master Partition Table
Partition တွေကို ဖော်ပြပေးနိုင်တဲ့ Table တခုပါရှိပါတယ်။ ဒီ Table မှာ CHs value ဘယ်လောက်ေကန ဘယ်လောက်ထိ partition တခု ဘယ်လောက်ကနေ ဘယ်လောက်ထိက partition တခု ဆိုပြီး ပါရှိပါတယ်။ partition တပိုင်း အနည်းဆုံးရှိမှ Operating System run လို့ရမှ ဖြစ်ပါတယ်။ partition တွေရဲ့ information တွေကို ဒီtable မှာ စုစည်းထားပါတယ်။ Primary Partition လေးပိုင်း (သို့) primary 3ပိုင်း နှင့် extended partition တပိုင်းပိုင်းနိုင်ပြီး extended partition ထဲတွင် logical partition တွေ ထပ်ပိုင်းလို့ရပါတယ်။ MBR သည် Legacy BIOs ကို အသုံးသောကြောင့် partition တစ်ပိုင်းကို 2.2TB ထိသာ accept လုပ်နိုင်ပါတယ်။
Extended Partition တွင် Opreating System တင်လို့မရပါ။ Data ကိုသာ store လုပ်တာ ဖြစ်ပါသည်။
2. Master Boot Code
BIOs က Operating System ကို load လုပ်နိုင်မို့ ဒီ code ကို ဖတတ်ရပါတယ်။ ဒီ Code ကို BIOs က ဖတ်ပြီးတော့ Operating System ကို Load လုပ်နိုင်ရန် Active Partition ထဲမှာ ရှိတဲ့ Boot Program ကို တာဝန် လွဲပြောင်းပေးလိုက်ပါတယ်။
Boot program
Window 7 Bootrec.exe
Window xp NTLDR
MBR ကို Legacy BIOS တွေမှာ အသုံးပြုပါတယ်။ MBR သည် Multi Operating System ကို Handle လုပ်ပေးနိုင်ပါသည်။ Opreating System တွေကို Primary Partition တွေ၌သာ တင်လို့ရတဲ့အတွက် Primary partition 3 ခုရှိရင် OS သုံးခု အသုံးပြုနိုင်ပါသည်။
======================================
Harddisk အကြောင်း ပြောကြမယ်...... (part-4)...................................................................................
2. GUID Partition Table (GPT)
GPT မှာ MBR ရဲ့ partition limitations ကို fixed လုပ်ထားပါတယ်။
MBR က 4 Partiton ထိသာ လက်ခံနိုင်ပီး GPT က 128 partition ထိ လက်ခံနိုင်ပါတယ်။MBR က 2.2TB ထိ GPT က zettabyte ထိ လက်ခံနိုင်ပါတယ်။ MBR က CHS value ကို BIOs မှာ assign လုပ်ရသလို GPT ကလည်း LBA ကို BIOS မှာ assign လုပ်ရပါတယ်။
How to convert CHS to LBA
👇👇👇👇👇👇👇👇
https://m.facebook.com/story.php?story_fbid=1253630578136750&id=1038031269696683
LBA0သည် protective MBR ဖြစ်ပါသည်။ မည်သည့် data မှ override မလုပ်ပါ။master boot record နဲ့ Partiton အစား gpt header နဲ့ partition entry arrays ကို အသုံးပြုပါတယ်။ GPT header က LBA တိုင်းမှာ ပါ,ပါတယ်။
Partition ပိုင်းပီးနောက် data တွေ သိမ်းဆည်းနိုင်ရန် file system ကို format လုပ်ပေးရပါတယ်။ sector တပိုင်းစီဟာ 512byte ရှိပါတယ် 512byte ရှိသော file အတွက် လုံလောက်ပေမဲ့ 512byte ထက် နည်းသော file ကိုမှတ်သောအခါ သူက နောက်ထပ် data ကို အဲ sector မှာ ထပ်မသိမ်းတော့ပါဘူး ဒီတော့ sector ဆုံးရှူံးမှု ဖြစ်ပေါ်စေပါတယ်။ 512bytes ထက်ကြီးတဲ့ file ကို သိမ်းတဲ့အခါကျတော့ 512byte ကို sector တခုမှာ ပိုနေတဲ့ file size မှာ မသိမ်းတော့ဘဲ အခြားလွတ်နေတဲ့ sector ကို ရှာပီး file complete ဖြစ်တဲ့အထိ သိမ်းပါတယ်။ ဒီ file ကို ပြန် retrieve လုပ်တဲ့အခါ သိမ်းထားတဲ့ sector တွေ မှတ်မိဖို့လို့ပါတယ်။ ဒီတော့ developer တွေဟာ sector တွေကို file system လို့ခေါ်တဲ့ address တွေနဲ့ hdd. ပေါ်မှာ ပြန်သတ်မှတ်ပါတယ်။ ထိုသို့သတ်မှတ်ခြင်းကို high level formatting လို့ခေါ်ပါတယ်။
Windows က support တဲ့ file system တွေက
1. FAT 16(File Allocated Table 16bits)
2. FAT 32
3. NTFS (New Technology File System)
1. FAT16
Column နှစ်ခုရှိပါတယ်။ ဘယ်ဘက်ခြမ်းက address တွေဖြစ်ပီး Hexadecimal number တွေနဲ့ သတ်မှတ်ပါတယ်။ 0000 to ffff ဖြစ်ပါတယ်။ 16bit hexadecimal ဖြစ်တဲ့အတွက် 2^16 = 65535(64k) ဖြစ်ပါတယ်။ sector တခုက 512byte ဖြစ်တဲ့အတွက်
65535 x 512 = 32MB
ထိ ပဲ support လုပ်ပါတယ်။
ပြသနာက သူက hdd ရဲ့ partition က 32MB ပဲ ဖြစ်ရမယ်။ ပိုလို့မရပါဘူး။ Older system hdd တွေအတွက် အဆင်ပြေပါတယ်။
Modern HDD အတွက်က အဆင်မပြေဘူး။ ဒီတော့ developer တွေက Cluster ကို introduced လုပ်ခဲ့ကြတယ်။
What is Cluster....?
Cluster ဆိုတာ sector တွေကို ပေါင်းထားတာကို cluster လို့ခေါ်ပါတယ်။ sector တွေကို Cluster အရင်ဖွဲ့တယ်။ ပြီးမှ cluster တခုချင်းစီကို FAT (address) သတ်မှတ်ထားတာပါ။ Cluster ဖွဲ့တဲ့နေရာမှာ Cluster Size(sector/cluster) ကို Format Program က partition size ကိုကြည့်ပြီး သတ်မှတ်ပါတယ်။ FAT ရဲ့ max size 2Gb ထိပဲ ဖြစ်ပါတယ်။
Partition size. Sector/cluster
16 to 127.9MB. 4
128 to 255.9MB. 8
256 to 511.9MB. 16
512 to 1023.9MB. 32
1024 to 2048MB. 64
Theory
Partition = sector/cluster x FAT16 x Sector size
Partition = 4 x 64 x 512
= 128MB
4 (sector/cluster)
64bits(FAT Address Size or number of clusters)
512byte (sector size)
How FAT access file....?
File တွေကို သိမ်းတော့မယ်ဆိုရင် folder ဆောက်ပီး သိမ်းတာဟာ cluster (or) sector ဆုံးရှူံးမှု ကို save စေပါတယ်။ အဘယ်ကြောင့် ဆိုသော်
Cluster တခုသည် Address တခုဖြစ်ပါသည်။
So....
1MB ရှိသော file ကို Cluster (addrsss 0000) မှာ မှတ်လိုက်တယ်ဆိုပါစို့။ ထို့နောက် 2MB ရှိသော file ကို မှတ်တဲ့အခါ cluster (address 0001) မှာ သွားမှတ်ပါတယ်။ ပထမ cluster (address 0000) မှာ ပိုနေတဲ့ 1MB ကို မသုံးတော့ဘူး။ ဘာလို့လဲဆိုတော့ cluster(address) တခုမှာ file name တခုပဲ access လုပ်နိုင်တဲ့အတွက်ကြောင့်ဖြစ်ပါတယ်။ folder ဆောက်ပြီး မှတ်သော အခါ folder name က cluster (address) မှာ assign လုပ်လိုက်ပါတယ်။ ထိုနောက် အဲ folder ထဲ ထည်တဲ့ file အရွယ်အစား ပမာဏ အလိုက် cluster တွေကို ဖြည့်ပြီး နေရာပြီးပေးပါတယ်။ cluster တခုပြည့်သွားခဲ့သည်ရှိသော နောက်ထပ် လွှတ်နေသော clutser တခုကိုထပ်ပြီး ဒီ folder နာမည်ကို assign လုပ်ပါတယ်။ ဒီတော့ cluster or sector ဆုံးရှူံးမှုကို save ဖြစ်သွားပါတယ်။
2. FAT 32
FAT 16 က maximum 2GB ထိပဲ ရပါတယ်။ ဒီအတွက် Microsoft. က Windows 95 OS R2 (OEM Service Release2) မှာ အထူးကောင်းမွန်သော FAT 32 ကို မိတ်ဆက်ခဲ့ပါတယ်။ FAT 32 ဟာ address 28bits နှင့် reserved (for future) 4bits ဖြစ်ပါတယ်။ sector size 512byte ကနေ 4096byte ထိ ရှိပါတယ်။
Partition Size. Cluster Size
512MB to 1023MB. 4KB
1024MB to 2GB. 4KB
2GB to 8GB. 4KB
8GB to 16GB. 8KB
16GB to 32GB. 16KB
>32GB. 32KB
2TB partition for HDD is used 4KB size Clusters.
2^32 x 512 x 8 = 17,592,186,044,416bytes
= 16TB
...
Cluster size သည် Partition size အနဲအများပေါ်မူတည်ပါသည်။
3. New Technology File System (NTFS)
NTFS ဟာ Master File Table(MFT) လို့ခေါ်တဲ့ enhanced file allocation table ကို အသုံးပြုပါတယ်။NTFS ကို windows NT မှာ စတင်အသုံးပြုခဲ့ပါတယ်။ NTFS မှာ feature 5 ခုပါ,ပါတယ်။
1. Security
2. Compression
3. Encryption
4. Disk Quotas
5. Cluster Sizing
1. Security
Access Contorl List (ACL) ကို အသုံးပြုပြီ individual file & folder တွေကို တည်ဆောက်နိုင်ပါတယ်။
2. Compression
File တွေကို compress လုပ်ပီ သိမ်းနိုင်ပါတယ်။ compress လုပ်ထားတဲ့ file & folder တွေကို အပြာရောင်စာသားနဲ့ ပြပါတယ်။
3. Encryption
File (or) Folder တွေကို encryption file system(EFS) အသုံးပြုပြီး encrypt လုပ်နိုင်ပါတယ်။ enrcypt key သိတဲ့သူသာ file (or) folder ကို access လုပ်နိုင်မှာပါ။
4. Disk Quotas
ဒါကတော့ user တွေကို stroage ကို သတ်မှတ်ပေးတဲ့ အခါ အသုံးပြုပါတယ်။
5. Cluster Size
NTFS ရဲ့ cluster size ကို adjust လုပ်လို့ရပါတယ်။ သူရဲ့ default size တွေကတော့
Drive size. Cluster size. Number of Sectors
512MB or less. 512byte. 1
513MB to 1024MB. 1024bytes(1KB) 2
1025MB to 2048MB. 2048bytes(2KB) 4
2049MB and larger. 4096bytes(4KB) 8
စသည်တို့ပဲ ဖြစ်ပါတယ်။
======================================
Harddisk အကြောင်း ပြောကြမယ်...... (part-5)...................................................................................................
2. Dynamic Disk
Dynamic disk (dynamic stroage) တွေကို workstations တွေနဲ့ Server တွေမှာ အများအားဖြင့် အသုံးပြုပါတယ်။ Dynamic disk တွေမှာ OS တစ်ခုတည်းသာ တင်ရန် (dual boot scenario should not use) recommend ပေးထားပါတယ်။ Dynamic Disk တွေကို volume တွေအဖြစ် တွေ့မြင်နိုင်ပီး voulme 1ခု (သို့) 1ခုထက်ပိုပီး တွေ့မြင်နိုင်ပါတယ်။ Dynamic disk တွေကို restart လုပ်ရန်မလိုဘဲ resize လုပ်နိုင်ပါတယ်။ Basic disk ကနေ dynamic disk ပြောင်းလိုက်ခြင်းအားဖြင့် partition တွေ စိတ်ကြိုက်ပိုင်းနိုင်သွားပါပီး။ သူမှာ primary, extended and logical partition တွေ မရှိပါဘူး။ Dynamic disk ဟာ RAID (Redundancy Arrays of Independent Disk) အနေနဲ့ အလုပ်လုပ်နိုင်ပါတယ်။
Windows က support လုပ်တဲ့ voulme type တွေက တွေမှာ
1. Simple Volume
2. Spanned Volume
3. Mirror Volume
4. Striped Volume &
5. RAID-5 စသည့်တို့ဖြစ်ပါတယ်။
Voulme. Win xp. Win7. Winser 2008/R2
Simple. X. X. X
Spanned. X. X. X
Striped. X. X. X
Mirrored. X. X
RAID-5. X
1. Simple Volume
Simple Volume ဟာ primary partition လို အလုပ်လုပ်ပါတယ်။ hdd တလုံးကို simple volume တွေ အများကြီး ခွဲနိုင်ပါတယ်။
2. Spanned Volume
Hdd နှစ်လုံးရဲ့ unallocated space တွေကို volume တစ်ခုအဖြစ်ပေါင်းစည်းထားတာကို Spanned Volume လို့ခေါ်ပါတယ်။
3. Striped Volume
Striped volume ကို RAID 0 ဟုလည်းခေါ်သည်။ hdd နှစ်လုံးအနည်းဆုံး လိုအပ်ပါသည်။ ဒီ hdd နှစ်လုံးရဲ့ unallocated space နှစ်ခုကို striped လုပ်နိုင်ပါတယ်။ hdd တလုံး failure ဖြစ်တာနဲ့ data lost ဖြစ်မှာ ဖြစ်ပါတယ်။
4. Mirror Volume
Mirror volume ကို RAID 1 ဟုလည်းခေါ်သည်။ hdd နှစ်လုံးအနည်းဆုံး လိုအပ်ပါသည်။ ဒီ hdd နှစ်လုံးရဲ့ unallocated space နှစ်ခုကို mirror လုပ်နိုင်ပါတယ်။သူကတော့ hdd တလုံး failure ဖြစ်တာနဲ့ data lost ဖြစ်မှာ မဟုတ်ပါဘူး ခင်ဗျာ။
5. RAID 5
RAID 5 ကတော့ hdd 3 သို့ 3 ထက်ပိုလိုအပ်ပါတယ်။ data safety အတွက် RAID 5 or RAID ကို အသုံးပြုများကြပါတယ်။
:
MYANMAR ICT ACADEMY