Tag-Archive for » Linux «

Axad, Ogosto 04th, 2013 | Qoraa:

Waxaan lahaa cilad koronto oo saameyn ku yeelatay adeegeyga weyn md DUUL diyaarin. Halkii loo oggolaan lahaa in adeegu guud ahaan hoos u dhaco inta laga sugayo inuu dhammaystiro fsck, Waxaan haystay boot iyada oo aan lahayn saf ballaaran sidaa darteed waxaan ku maamuli lahaa fsck gacanta.

Si kastaba ha noqotee, markii aan gacanta ku waday waxaan ogaaday inaanan hayn wado aan ku ogaado inta ay le'eg tahay iyo muddada ay qaadanayso in la dhammaystiro. Tani waxay si gaar ah dhibaato ugu tahay noocyo badan. In yar oo aan raadinayay ayaan helay cirifka ku darida cabirka -C markii aad wacayso fsck. Tan kama aanan helin dukumiintiyada si kastaba ha ahaatee: fsck –Caawinaad ma muujin ikhtiyaar noocaas ah.

Ikhtiyaarku wuxuu noqdaa mid gaar u leh ext4, oo markaa waxay muujineysaa bar horumarineed oo si fiican u shaqeynaya oo leh tilmaame boqolkiiba. Si aad u hesho macluumaadka, halkii “fsck –I caawi” ama “nin fsck”, waa inaad ku dartaa “fsck.ext4 –I caawi” ama “nin fsck.ext4”. 🙂

Share
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
Jimcaha, Sebtember 11th, 2009 | Qoraa:

Nabadda dhulka USB

Hoosta a *nix nidaamka hawlgalka, oo leh qaybo kala duwan oo ku yaal a USB drive maahan cilmi gantaal, way shaqaysaa uun. In kiiskeyga, USB-kayga USB-gu wuxuu leeyahay laba qaybood waayo qaybta hore waa la-rujin karaa Arch Linux rakibaya.

Waan haystaa Windows on desktop ah guriga – badanaa loogu talagalay ciyaaraha – inbadan oo asxaabteyduna wey isticmaalaan sidoo kale. Maaddaama Windows uusan sifiican u qaban qeybaha aan Windows-ka ahayn waxaan is tusay inaan abuuri karo a FAT32 xijaab on usha xasuusta ka dib markii xijaabi Arch Linux xijaab. FAT32 ku dhowaad waa meel walba waana la isticmaali karaa nidaam kasta oo ka shaqeeya nidaamka desktop ee adduunka ka jira.

Bleh

Nasiib darrose si toos ah ugama shaqeynayso fiidmeerka. Sida muuqata, Microsoft xikmadooda aan la koobi karayn waxay go'aansadeen in ulaha xusuusta loo malaynayo inuu mid leeyahay (iyo mid keliya) xijaab. Xaqiiqdii Windows wuxuu helaa qaybtii ugu horreysay ka dibna iska indhatiraa kuwa kale ee dhaca ee la dejinayo:

Please Format

Khalad, maya, Dooni maayo inaad qaabeeysid qaybinta rakibaadda Arch Linux

Tabaha loo siinayo inay shaqeyso ayaa ah in lagu nacaseeyo Windowska fikirka aaladda ay tahay ma a USB xasuusta joogto ah laakiin laga yaabee a disk adag oo adag taas oo ku dhacda in lagu xiro USB. Haa waan ogahay, tani waa nacasnimo daran in Windows sidan u dhaqmo. Qalab adag oo adag oo adag ayaa ah uun weyn (oo soon) xasuusta dheji ka dib!

Waxaan ka helay ilo yar oo ku saabsan sida tan loo sameeyo hase yeeshe weli waxay ahayd inaan keligey waxyaabaha qaar ogaado. Gaar ahaan, the guides I found either skipped some steps or didn’t provide enough information on where to download the driver package.

This procedure involves manually changing hardware drivers and installingnon-signeddriversnot intended for your hardware”. I know someone is going to break their system and blame me so I say now that I take no responsibility for any damage you may do to your Windows system as a result of this. Read that again. 😛

Instructions

remove the highlighted text

click for larger version

Download and unzip the driver, originally created by Hitachi, here. Open the cfadisk.inf file in notepad (or your favourite plaintext editor), and find the section labeled [cfadisk_device]. Remove the section highlighted on the right:

Minimize (don’t close) the editor and go to your desktop icons – midig u guji kumbuyuutarkeyga oo dooro Properties. Xullo tabta qalabka kadibna dooro [DMaamulaha evice]:

System Properties

Raadi qalabka hoostiisa “Wadayaasha diskiga”, midig u-guji xusuustaada oo xulo Properties:

Device Manager

Guji faahfaahinta tab iyo sanduuqa hoos u dhaca ee ku yaal boggaas, dooro “Qalabka Ids”. Guji sadarka koowaad ee liiska Aqoonsiga Qalabka kadibna riix Ctrl + C si aad uqorto magaca:

USB Hardware Ids

Ha xidhin hadalkan, dib ugu noqo qoraalka (taas oo la yareeyay) oo ku dhaji Aqoonsiga qalabka meesha nuxurkii hore laga saaray.

Changes pasted into notepad

Ku keydi faylka warqadda xusuusta oo dib ugu noqo daaqadda wada hadalka qalabka. Guji “Darawal” tab oo guji [Udarawal pdate…] badhanka. Daaqadaha ka soo baxa, dooro “Maya, maahan tan tmagac”; [Ndheeraad ah] -> “Ka rakib liiska ama a smeel gaar ah (Hormarsan)”; [Ndheeraad ah] -> “Draadin. I will choose the driver to install.”; [Ndheeraad ah] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

Browse to the folder where you have saved the modified cfadisk.inf file. Click [OK]. You will find

there is a Hitachi Microdrive driver listed. Select this and click [Ndheeraad ah]. When the warning

appears, click [Yes]. Another warning will pop up regarding a similar issue (these are theunsigned” iyo “not intended for your hardwarewarnings I mentioned earlier). Click [Continue Anyway]:

At this point I recommend closing all the dialog boxes related to the setup. Finally, remove and re-insert the memory stick into your USB port and you should find that the extra partitions on the stick are accessible. In the worst-case scenario, you might still need to partition the disk however the hard part is over. 🙂

Share
Arbaco, April 22nd, 2009 | Qoraa:

Gawaarida Linux’s installation process is documented on the Arch wiki. I recommend that persons new to Arch try the excellent Beginner’s Guide instead of the Official Arch Linux Install Guide. Though both wiki entries cover similar ground, the Beginner’s Guide gives a lot more relevant information for those new to the system. The Beginner’s Guide is aimed at desktop installation and, as I’m installing a server, I won’t be going through the installation of the graphical environment at all. Assuming that you’re following my installation, assume that I’ve followed the Beginner’s Guide right up to and including the installation of sudo. I installed the ssh daemon afterwards rather than during the initial setup however.

A few small recommendations and notes regarding installation:

  • If you can, consider using a USB memory stick for the installer and keep it handy for future installations.
  • I keep a copy of my localrepositoryof installed applications on my installer memory stick. Once installation is finished I save a bit of download and update time by copying this to the new server’s /var/cache/pacman/pkg/ folder. The repository on my desktop is typically 1.7GB
  • For the rc.conf, South African-appropriate regional settings are:
    LOCALE=en_ZA.utf8
    TIMEZONE=Africa/Johannesburg
  • I’ve set up the network very simply, according to the guide, and will be expanding on the network setup in a later post.
  • As it is for a server, my non-privileged user on the server is only part of 3 groups: wheel (for sudo), storage, and users. A desktop user will likely be in many more groups.

I prefer using an application called yogurt instead of Arch’s default package manager. Yaourt has the exact same usage syntax as pacman except that it supports a few extra options. It is actually a wrapper application in that it, in turn, uses pacman. Importantly, yaourt supports installation of applications from Arch’s AUR. The AUR is a repository of installation scripts built by Arch users for Arch users to easily install applications that are not officially supported by the main Arch repositories. Yaourt can download and install applications from AUR or the main repositories with the same command, treating the AUR asjust another repository”. Pacman unfortunately does not support this.

Haddana, the installation is covered in the wiki. I recommend the easy route mentioned in the wiki if you’re new at Arch. Its too much too soon to do it the hard way (also mentioned in the wiki entry).

When done, update your system by issuing the single command:

yaourt -Syu

OR

pacman -Syu

and follow the given recommendations.

Share
Sabti, March 28th, 2009 | Qoraa:

Its amazing how much you can do by combining the small yet powerful commands Unix has available.

This little-used command, time, finally became useful today as a way to report the length of time that certain automated operations are running. In my example, I’m timing how long it takes to build the Linux kernel:

$ time rebuild-kernel26
...
couple-thousand-lines-of-scrolling-text
...
==> Finished making: kernel26 2.6.28.8-1 x86_64 (Sat Mar 28 17:19:52 SAST 2009)
real    62m21.994s
user    43m31.846s
sys     6m1.096s

Yup, that took a little over an hour to build. The values are:

  • realthe actual time elapsed while the command was running – 62 minutes
  • userthe amount of userland time the command used – 43 minutes
  • systhe amount of system time the command used – 6 minutes

(I was busy doing other things while this was happening which is why it took 62 minutes for the desktop to do (43+6=) 49 minutes-worth of work)

If you’re using the GNU version (most likely), it also gives you the option of displaying the results in a custom fashion. Mostly, this command could be useful in scripts where you need to report how long a task tookor maybe? just a geeky way to time something random. 😛

Share
Qeybta: Linux  | Calaamadaha: , , , , , , ,  | Faallo Ka Bax