Kaydso Qeybta » ubuntu «

Axad, Ogosto 04th, 2013 | Qoraa:

Taariikhda

Inbadan ayaa isbadalay tan iyo markii ugu dambeysay ee aan sheego server shaqsiyeed – waxay ku kortay boodbooyin iyo soohdin (waxay hadda leedahay 7TB md RAID6) oo mar dhow ayaa dib loo dhisay iyadoo Ubuntu Server.

Gawaarida marna qalad ma ahayn. Arch Linux horey wax badan buu iiga baray Linux (oo waan kusii wadi doonaa inaan ku sameeyo desktop-kayga kale). Laakiin Arch xaqiiqdii waxay u baahan tahay waqti iyo feejignaan ka badan intii aan jeclaan lahaa inaan ku qaato serverka. Fikrad ahaan waxaan jeclaan lahaa inaan awoodo inaan iska iloobo adeegaha in yar illaa iimayl xusuusin ah uu dhaho “a … waxaa jira laba casriyeyn ah oo ay tahay inaad fiiriso, saaxiib.”

Meel bannaan maahan – mana aha mid bannaan

Fursadda aan ugu haajiro Ubuntu waxay ahayd xaqiiqda oo ah inaan ka dhammaaday SATA dekedaha, dekedaha loo baahan yahay inay ku xirmaan darawallada adag kombiyuutarka intiisa kale – in soo diyaarinta 7TB RAID ay isticmaasho dekedo badan! Xitaa waan bixiyay aad duug ah 200GB disk adag maadaama ay qaadatay mid ka mid ah dekedahaas. Waxaan sidoo kale uga digay qaataha in diskiga SMART kormeerku wuxuu muujiyey in aan lagu kalsoonaan karin. Sida ku-meel-gaadhka ku-meel-gaadhka ah ee la'aanta dekeddaha SATA, Xitaa waxaan u haajiray OS-ka adeegaha illaa afar xirmo oo USB ah oo ku jira md RAID1. Waali. waan ogahay. Aad uma aanan faraxsanayn xawaaraha. Waxaan go aansaday inaan baxo oo aan iibsado darawal adag oo la isku halleyn karo iyo kaarka ballaarinta SATA si aan ula socdo.

Qeybinta aasaasiga ah ee 'Arch server' waxay isticmaaleysay qiyaastii 7GB disk ah. Qeyb weyn oo ka mid ah taas ayaa ahayd a isdhaafsasho faylka, xogta keydsan iyo haddii kale faylal kaladuwan ama aan loo baahnayn. Guud ahaan cabirka dhabta ah ee OS, ay ka mid yihiin /guriga galka, wuxuu ahaa oo keliya qiyaastii 2GB. Tani waxay igu kaliftay inaan fiiriyo super-soon SSD wadid, ka fikirida mid ka yar in uusan sidaa qaali u ahayn. Waxaa ii soo baxday in kan ugu raqiisan ee aan ahayn SSD-ka ee aan runtii ku heli lahaa qiime dheeraad ah marka loo eego mid ka mid ah SSD-yadaas yar yar. Haa aniga. 🙂

Xulasho? Woah?!

Xulashada OS, Waxaan horey u go’aansaday inaysan Arch noqon doonin. Dhamaan qeybiyeyaasha kale ee caanka ah, Waxaan aad u aqaan Ubuntu iyo CentOS. Fedora sidoo kale waxay ahayd macquul – laakiin si dhab ah ugama aanan fakarin wali server. Ubuntu ayaa ku guuleysatay wareegga.

Go’aanka xiga ee aan qaadan lahaa aniga iguma soo dhicin ilaa Ubilence (Saaxir rakibaadda Ubuntu) ayaa iga weydiisay: Sida loo dejiyo xijaab.

Waxaan ku cusbaa isticmaalka SSD-ka Linux – Waxaan si fiican uga warqabaa khaladaadka jira ee aanan sida saxda ah u isticmaalin, badanaa waxay ugu wacan tahay halistooda cimri dherer xumo haddii si qaldan loo adeegsado.

Ma aanan dooneynin inaan isticmaalo qayb isku beddel ah. Waxaan qorsheynayaa kor u qaadista server-ka hooyada / CPU / Memory-ka ee aan aad ugu fogeyn mustaqbalka. Iyada oo ku saleysan taas ayaan go'aansaday inaan ku beddelanayo faylka isku-beddelka md RAID-da jirta. Isweydaarsigu si gaar ah uma noqon doono mid deg deg ah laakiin ujeedadiisa kaliya ayaa noqon doonta munaasabadaas dhifka ah marka wax khaldamaan oo xusuusta aan la helin.

Tani waxay markaa iga tagtay inaan siiyo wadada xididka 60GB buuxa ee ka mid ah Intel 330 SSD. Waxaan ka fiirsaday kala tag / guri laakiin waxay umuuqatay wax aan micno lahayn, la siiyay inta yar ee la isticmaali jiray waagii hore. Waxaan marka hore qotomiyey xijaab leh LVM – wax aan dhawaanahan sameynayay markasta oo aan dejiyo sanduuq Linux ah (run ahaantii, ma jirto wax cudurdaar ah oo aan loo isticmaalin LVM). Markay gaadhay qaybtii aan ku habayn lahaa nidaamka faylasha, Waxaan dhajiyay hoos-u-dhaca oo si xamaasad leh u xushay ext4. Kadib waxaan ku arkay btrfs isla liistada. Sudhan!!

Laakiin maxay tahay?

Btrfs (“subag-eff-ess”, “fiican-eff-ess”, “shinni-geed-eff-ess”, ama wax kastoo aad ujeceshahay maalinta) waa nidaam cusub oo faylal ah oo loo soo saaray Linux’ awoodaha faylasha ee nidaamka saxda ah ee nidaamka casriga ah. Nidaamka faylasha ee jira ee King-of-the-Hill, “dheeraad ah” (nooca hada la yiraahdo ext4) waa wax fiican – laakiin waa xaddidan tahay, ku xayiran muuqaal hore (ka fikir nooc cusub F22 Raptor vs. ah F4 Phantom oo leh isku day nus kaftan ah oo lagu hagaajinayo u dhigma) umana badna inay awood u yeelan karto inay muddo dheer la tartanto nidaamyada faylasha cusub ee Enterprise sida Oracle’s ZFS. Btrfs wali waddo dheer ayaa loo hayaa welina waxaa loo arkaa tijaabo (waxay kuxirantahay qofka aad weydiiso iyo astaamaha aad ubaahantahay). Kuwo badan waxay u tixgeliyaan inay xasilloon tahay isticmaalka aasaasiga ah – laakiin cidina ma samaynayso dammaanad qaad. Iyo, Dabcan, qof walba wuxuu dhahayaa sameyso oo tijaabiyo keyd!

Mooooooo

Farqiga ugu aasaasiga ah ee u dhexeeya ext iyo btrfs ayaa ah in btrfs-ku uu yahay a “CoW” ama “Nuqul ku qor” nidaamka faylasha. Tani waxay ka dhigan tahay in xogta aan si dhab ah si ula kac ah dib loogu qoro gudaha nidaamka faylasha. Haddii aad u qorto isbeddel feyl, btrfs waxay kuu qori doonaan isbeddeladaada meel cusub oo ku saabsan warbaahinta jirka waxayna cusbooneysiin doonaan tilmaamayaasha gudaha si ay u tixraacaan goobta cusub. Btrfs waxay tallaabo dheeri ah u qaadaysaa tilmaamayaashaas gudaha ah (loo yaqaan metadata) yihiin sidoo kale CoW. Noocyadii hore ee ext ayaa si fudud dib loogu qori lahaa xogta. Ext4 waxay isticmaali doontaa Joornaal si loo hubiyo in musuqmaasuqu uusan dhici doonin haddii fiilada AC laga siibto xilliga ugu habboon. Joornaalku wuxuu ku soo baxayaa tiro tallaabooyin la mid ah oo loo baahan yahay si loo cusbooneysiiyo xogta. Iyada oo leh SSD, qalabka hoose wuxuu ku shaqeeyaa nidaam la mid ah CoW iyadoon loo eegin nooca faylasha aad isticmaaleysid. This is because SSD drives cannot actually overwrite datathey have to copy the data (with your changes) to a new location and then erase the old block entirely. An optimisation in this area is that an SSD might not even erase the old block but rather simply make a note to erase the block at a later time when things aren’t so busy. The end result is that SSD drives fit very well with a CoW filesystem and don’t perform as well with non-CoW filesystems.

To make matters interesting, CoW in the filesystem easily goes hand in hand with a feature called deduplication. This allows two (or more) identical blocks of data to be stored using only a single copy, saving space. With CoW, if a deduplicated file is modified, the separate twin won’t be affected as the modified file’s data will have been written to a different physical block.

CoW in turn makes snapshotting relatively easy to implement. When a snapshot is made the system merely records the new snapshot as being a duplication of all data and metadata within the volume. With CoW, when changes are made, the snapshot’s data stays intact, and a consistent view of the filesystem’s status at the time the snapshot was made can be maintained.

A new friend

With the above in mind, especially as Ubuntu has made btrfs available as an install-time option, I figured it would be a good time to dive into btrfs and explore a little. 🙂

Qaybta 2 coming soon

Share