Tag-Archive for » Ubuntu «

Sondag, 4 Augustus, 2013 | Author:

Geskiedenis

Baie het verander sedert ek laas genoem my persoonlike bediener – dit het gegroei deur spronge en perke (Dit het nou '7TB MD RAID6) en dit het onlangs herbou met Ubuntu Bediener.

Boog was nog nooit 'n fout. Arch Linux het reeds my geleer het so baie oor Linux (en sal voortgaan om dit te doen op my ander lessenaar). Maar Arch vereis beslis meer tyd en aandag as wat ek wil om te spandeer op 'n bediener. Ideaal Ek sou verkies om in staat wees om te vergeet van die bediener vir 'n rukkie totdat 'n herinnering e-pos sê “um … daar is 'n paar updates moet jy kyk na, buddy.”

Ruimte is nie vry – en is ook nie ruimte

Die geleentheid om te migreer na Ubuntu was die feit dat ek het hardloop uit SATA hawens, die hawens vereis hard dryf om toegang tot die res van die rekenaar – dat 7TB RAID reeks maak gebruik van 'n baie hawens! Ek het selfs weggegee my baie ou 200GB hardeskyf as wat dit geneem het om een ​​van die hawens. Ek het ook gewaarsku dat die ontvanger dat die skyf se SMART monitering aangedui dit is onbetroubaar. As 'n tydelike oplossing tot die gebrek aan SATA poorte, Ek het selfs migreer die bediener se bedryfstelsel op 'n stel van vier USB stokkies in 'n besturende direkteur RAID1. Crazy. Ek weet. Ek was nie te gelukkig oor die spoed. Ek het besluit om uit te gaan en 'n nuwe betroubare hardeskyf en 'n SATA uitbreiding kaart te gaan met dit koop.

Die bediener se primêre Arch verdeling gebruik oor 7GB van skyf. 'N groot deel van dit was 'n ruil lêer, data in die cache en andersins diverse of onnodige lêers. Overall die werklike grootte van die OS, insluitend die /huis gids, was net oor 2GB. Dit het my genoop om te kyk na 'n super-vinnige SSD ry, dink dalk 'n kleiner een is dalk nie so duur. Dit blyk dat die goedkoopste nie-SSD ry ek kon eintlik vind kos meer as een van hierdie relatief klein SSDs. Yay vir my. 🙂

Keuse? Woah?!

In die keuse van die OS, Ek het reeds besluit om dit nie sou wees Arch. Uit al die ander gewilde verdelings, Ek is die meeste vertroud is met Ubuntu en CentOS. Fedora was ook 'n moontlikheid – maar ek het nog nie ernstig beskou dit as 'n bediener. Ubuntu het die ronde.

Die volgende besluit wat ek moes maak nie plaasgevind het nie vir my tot Ubiquity (Ubuntu se installasie wizard) dit van my gevra: Hoe om die opstel van die mure.

Ek was 'n nuwe te gebruik SSDs in Linux – Ek is deeglik bewus van die slaggate van nie gebruik dit korrek, meestal as gevolg van hul risiko van swak langslewendheid as misbruik.

Ek wou nie 'n toegewyde ruilpartisie te gebruik. Ek is van plan op die opgradering van die bediener se moederbord / CPU / geheue nie te ver in die toekoms. Gebaseer op wat ek besluit ek swap gestel sal word in 'n ruillêer op die bestaande md RAID. Die ruil sal nie besonder vinnig, maar sy enigste doel sal wees vir daardie rare geleentheid wanneer iets verkeerd geloop en die geheue is nie beskikbaar nie.

Dit het toe vir my die te gee wortel pad die volle 60GB uit 'n Intel 330 SSD. Ek het dit oorweeg / home te skei, maar dit was net 'n bietjie nutteloos, hoe min is gebruik in die verlede. Ek het die eerste stel met die verdeling LVM – iets wat ek het onlangs te doen wanneer ek die opstel van 'n Linux box (regtig, Daar is geen verskoning nie LVM te gebruik). Wanneer dit by die deel waar ek sou die lêerstelsel instel, Ek het op die drop-down en instinktief gekies ext4. Toe sien ek Btrfs in dieselfde lys. Hang aan!!

Maar 'n wat?

Btrfs (“botter-eff-ess”, “beter-eff-ess”, “Bee-boom-eff-ess”, of wat ookal jy fancy op die dag) is 'n relatief nuwe lêerstelsel ontwikkel om Linux te bring’ lêerstelsel vermoëns terug op die regte spoor met die huidige lêerstelsel tech. Die bestaande Koning-van-die-Hill lêerstelsel, “ext” (die huidige weergawe genaamd ext4) is redelik goed – maar dit is beperk, vas in 'n ou paradigma (dink aan 'n splinternuwe F22 Raptor vs. 'n F4 Phantom met 'n half-jested poging om 'n opgradering equivalentiefactoren) en dit is onwaarskynlik in staat wees om te kompeteer vir 'n baie lang met nuwer Enterprise lêerstelsels soos Oracle se ZFS. Btrfs het nog 'n lang pad om te gaan en is nog steeds beskou as eksperimentele (afhangende van wie jy vra en wat jy nodig het). Baie dit oorweeg om stabiel te wees vir basiese gebruik – maar niemand gaan enige waarborge te maak. En, natuurlik, almal sê te maak en te toets backups!

Mooooooo

Die mees fundamentele verskil tussen ext en Btrfs is dat Btrfs is 'n “Koei” of “Kopie op Skryf” lêerstelsel. Dit beteken dat die data is nooit eintlik doelbewus oorskryf deur die lêerstelsel se internals. As jy skryf 'n verandering na 'n lêer, Btrfs sal skryf jou veranderinge aan 'n nuwe plek op fisiese media en sal werk om die interne verwysings te verwys na die nuwe ligging. Btrfs gaan 'n stap verder in dat daardie interne verwysings (bedoel as metadata) is ook Koei. Ouer weergawes van ext net oorskryf wil hê die data. Ext4 sou 'n Blaar gebruik om te verseker dat korrupsie nie sal plaasvind nie, moet die AC plug yanked word op die mees ongeleë oomblik. Die tydskrif in 'n soortgelyke aantal stappe wat nodig is om data op te dateer. Met 'n SSD, die onderliggende hardeware bedryf 'n soortgelyke koei proses maak nie saak wat lêerstelsel wat jy gebruik. Dit is omdat die SSD dryf kan eintlik nie data oorskryf – hulle het die data te kopieer (met jou veranderinge) na 'n nuwe plek en dan vee die ou blok heeltemal. 'N optimalisering in hierdie gebied is dat 'n SSD kan selfs nie vee die ou blok nie, maar eerder net 'n aantekening om die blok te vee op 'n later tyd wanneer dinge nie so besig. Die eindresultaat is dat SSD dryf pas baie goed met 'n koei lêerstelsel en nie so goed presteer met 'n nie-koei lêerstelsels.

Om sake interessant te maak, Koei in die lêerstelsel gaan maklik hand in hand met 'n funksie genoem deduplicatie. Dit kan twee (of meer) identiese blokke van data gestoor word met behulp van slegs 'n enkele kopie, spaar ruimte. Met koei, as 'n deduplicated lêer verander, die afsonderlike tweeling sal nie geaffekteer word nie as die van die gewysigde lêer se data sal geskryf gewees het na 'n ander fisiese blok.

Koei op sy beurt maak snapshotting relatief maklik om te implementeer. Wanneer 'n momentopname is die stelsel rekords bloot die nuwe momentopname as 'n duplisering van alle data en metadata binne die volume. Met koei, wanneer veranderinge gemaak word, die momentopname se data bly ongeskonde, en 'n konsekwente siening van die lêerstelsel se status by die tyd die momentopname is gemaak gehandhaaf kan word.

'N nuwe vriend

Met die bogenoemde in gedagte, veral as Ubuntu Btrfs as 'n installasie-time opsie beskikbaar gemaak het, Ek het gedink dit sou 'n goeie tyd om te duik in Btrfs en verken 'n bietjie. 🙂

Deel 2 kom gou …

Deel
Thursday, January 01st, 2009 | Author:

Apparently, what operating system you use can say a lot about you. If you’re using some form of *nix, which distro you’re using can say a lot as well. Redundancy aside, I believe that a Linux distribution depends absolutely on its package management and distribution system.

I liked apt-get (1, 2) but there was some technical problem at some point and it caused me to use aptitude instead. Using aptitude is slightly easierit has more features automated into single, logical, commands where apt-get requires separate commands. Aptitude also has a curses-based GUI. If you’re not using the GUI then, other than brevity in terms of number of commands to learn, there is apparently no technical reason to prefer one over the other. Aptitude and apt-get serve K/X/Ubuntu en Debian goed. From this point, I use the names Kubuntu and Ubuntu in a loosely interchangeable fashion.

In my use of CentOS (based on Red Hat), I’ve found I like yum. It seems to work in much the same as aptitudeone command to rule them all. It has some rather annoying default behaviour I’m not going to get into here as its most likely because I’m just not used to it. At least from a technical perspective, it is very good. I believe that Fedora also makes use of yum though my experience with Fedora is very limited.

the theory

Fedora and Ubuntu are in a class of distributions that have a fairly rigorous release cycle. Ubuntu 8.10 (the version is named so for the year and month of its release) sal nie, except for major bugs and minor changes, have another major update until the next version, Jaunty Jackalope. Ubuntu users have the latest versions of most software on their desktops right now. In the months preceding the next release, however, they’re not going to be so lucky unless they like using “beta” releases. As I’m not very familiar with Fedora, I’m not going to bother going into its release cycle.

These 2 distributions are also within a class of distributions known asbinary” of “binary-baseddistributions. This means that when you download an update, the files that are downloaded are precompiled and should run on anysupportedhardware. This isn’t specifically optimised for your desktop’s hardware, for example, your processor. Perhaps you have an AMD processor which has extra instruction support which Intel CPUs do not have. The reverse could also be true. For this reason, a binary-release distribution cannot optimise for one particular brand of hardware. Regardless of thisnon-optimisation”, it should run at a decent pace.

the practice!

Oor 2 years ago I started using Kubuntu. After a few months of working with it, I started to learn more about its specifics. I’m not much of a fan of using GUI tools to update the system when, ultimately, its all happening on the command-line anyway. The GUI tools just hide the complexity I don’t mind seeing.

I ended up making a bash script, update, which would run all the steps required to get aptitude to just go ahead and upgrade already, kthx?©, perhaps stopping along the way to back up my configuration, remount the NFS network share where we keep an on-site repository, back up the local cache of aptitude’s installed packages, do some folder-link shuffling to use a local copy if the network share couldn’t remount, sync between the local copy and the network share if the previous update had a network share issue, and update lists of packages in the repository. In general, it wouldn’t go ahead if there were any errors though, as you can tell, this script became a messy beast that went above and beyond the original requirements. It worked well for me.

Until the day came to update between Kubuntu 6.10 om 7.04. I did this manually though, not with the script.

I ended up reinstalling from scratch as a result of the mess that ensued. At least, as a backup administrator should do well to demonstrate, it was easy to recover everything I really needed. 🙂

What else is out there?

Even before I had to reinstall Kubuntu, I was introduced to another distribution called Gentoo. There are 2 very distinct differences between Gentoo and Ubuntu’s update system. The first is that Gentoo is a source-based distribution. This means that when you update a package, the package manager downloads the source and compiles everything, hopefully optimising it for your system. This, I think, is very cool. The downside to this is that compiling everything takes a very long time.

Here are my (very unscientific) estimates for the length of time it takes to install a basic GUI OS to a desktop from installation media, excluding extraneous drivers (for example, the latest 3D graphics drivers):

OS: minmax (median)

Windows Vista: 15 – 30 (20) minutes

Ubuntu: 15 – 40 (20) minutes

Gentoo: 3 – 40 (6) hours

Gentoo also requires much tinkering with the config files in order to get things workingthis is another reason for the extremely long delay between inserting the CD and booting your awesome* new desktop. Popular applications have binary packages available for downloadthough this isn’t a default option.

They see me rollin

There is one more very important distinction Gentoo has from most other distributions. It is arolling-releasedistribution. This means that there isn’t any rigorous version orreleasethat the distribution adheres to. If you install Gentoo todayif you finish installing Gentoo today, you’re probably going to have the latest version of all the applications you installed. If some obscure application gets a major update tomorrow, within a few days, if you update your system, you’re going to have that latest version on your desktop.

The difference between this rolling release and theotherdistributions is rather staggering. Byvoorbeeld: If KDE 4.2 were to be released tomorrow, you’d probably have to wait less than 2 weeks for it to be available on Gentoo. Ubuntu users might have to wait till 9.04 – that’s a 4-month wait.

Something more suitable?

Personally, I’m not willing to put in the 40 hours of effort to get my system working the way I want it to. My colleague had to reinstall recently for some obscure reason and it turns out he wasn’t willing to put in the 6 hours (he’s more experienced with Gentoo) of effort to get his system back to how it was running either. Instead, Arch Linux caught his eye. Arch Linux is a rolling-release (like Gentoo), binary-based (like Ubuntu) distribution. Its packages (goed, the vast majority of them) don’t need much tinkering with their config files to get things working nicely either. Its the best of both worlds!

You still need to know what you’re doing* but if you’ve come to this juncture, it shouldn’t be such a giant leap of faith. Arch Linux’s package manager, called pacman, has built-in dependency and conflict handling. I use another package manager, jogurt (French for yoghurt), which has very quickly become popular with Arch users. Yaourt enhances the functionality of pacman by allowing you to download and install applications directly from the AUR, of Arch User Repository. This repository contains scripts that allow you to automatically download and install many applications that would otherwise be completely unsupported by Arch’s own core developers. It downloads and compiles the package into a chroot’d environment. It then packages the chroot’d environment into a pacman-compatible package tarball and uses pacman to deploy it into your system.

ook, the AUR supports a voting system whereby popular packages get placed into the more official [community] repository. Yaourt also supports an automated voting mechanism whereby, after installing a package via AUR, it asks if you want to vote for its inclusion in [community].

I estimate that the time taken for my Arch installation was about 90 minutes. I don’t recommend Archlinux for newbies though I do recommend it for any Linux user who’s gotten bored with other distrosand wants to get into the nitty gritty without having to install Linux From Scratch. Arch Linux has been getting pretty popular these days. Its currently at number 14 op Distrowatch.

* IF you know what you’re doing. AND YOU BETTER BLOODY KNOW WHAT YOU’RE DOING!
Deel