Tag-Arhiv za » ubuntu «

Nedjelja, 4. kolovoz, 2013 | Autor:

Povijest

Mnogo se promijenilo otkako sam posljednji put spominje my osobni poslužitelja – ona je narasla po skokovi i granice (on sada ima 7TB MD RAID6) , a nedavno je obnovljena s Ubuntu Server.

Svod nikada nije bio pogreška. Arch Linux je već učio me toliko o Linuxu (i nastavit će to učiniti na mom drugom desktopu). Ali Arch svakako zahtijeva više vremena i pažnje nego Želio bih provesti na poslužitelju. Idealno Ja bih radije biti u stanju zaboraviti na poslužitelj za vrijeme dok podsjetnik e-mail govori “hm … postoji nekoliko ažuriranja trebali pogledate, Prijatelj.”

Prostor nije besplatan – a nije ni prostor

Prilika za prelazak na Ubuntu je činjenica da sam istekli SATA priključci, portovi potrebni za povezivanje tvrdih diskova s ​​ostatkom računala – da 7TB RAID polje koristi puno luka! Čak sam dao moju vrlo Stari 200GB tvrdog diska koji je uzeo jednu od tih luka. Također sam upozorio primatelja da je disk-a SMART praćenja ukazuju da je to bio nepouzdan. Kao privremeno rješenje do nedostatka SATA priključaka, Čak sam bio premješten na poslužitelju OS na skup od četiri USB sticku u MD RAID1. Lud. Znam. Nisam bio previše sretan o brzini. Odlučio sam izaći i kupiti novi pouzdan hard disk i SATA kartice za proširenje da ide s njom.

Poslužitelja je primarna particija Arch je korištenjem oko 7GB u disku. Veliki dio koji je razmijeniti file, spremljene podatke i na drugi način Razno i ​​nepotrebne datoteke. Cjelokupna stvarna veličina OS, uključujući /dom mapa, bila je samo oko 2GB. To je potaknulo me da pogledate u super-brzo SSD pogon, razmišljam možda jedan manji možda nije tako skupo. Ispalo je da je najjeftiniji non-SSD disk sam mogao naći zapravo trošak više od jedne od tih relativno malih SSDs. Jupi za mene. 🙂

Izbor? Woah?!

U odabiru OS, Već sam odlučio da ne bi bilo Arch. Od svih drugih popularnih distribucija, Ja sam najviše upoznat s Ubuntu i CentOS. Fedora Također je moguće – ali nisam ga još ozbiljno uzeti u obzir za poslužitelj. Ubuntu dobio krug.

Sljedeća odluka Morao sam napraviti nije mi palo na pamet dok se Sveprisutnost (Ubuntu instalacija čarobnjak) ga pitao za mene: Kako postaviti particije.

Bio sam novi u korištenju SSD-ovi u Linuxu – Ja sam dobro svjestan zamke ih ne koriste pravilno, uglavnom zbog opasnosti od lošeg dugovječnosti ako zloupotrebljava.

Ja ne želim koristiti namjenski swap particiju. Planiram na nadogradnju poslužitelja matična ploča / CPU / memorija ne predaleko u budućnost. Na temelju toga sam odlučila da će staviti swap-u swap datoteku na postojećem md RAID. Swap neće biti osobito brz, ali njegova jedina svrha će biti za tu rijetku prigodu kad je nešto pošlo po zlu, a memorija nije dostupan.

To onda me ostavila dati Korijen put puna 60GB od Intel 330 SSD. Smatrao sam odvojio / home, ali to samo činilo malo besmisleno, s obzirom koliko malo je korišten u prošlosti. Prvi put sam postaviti particije LVM – nešto što sam nedavno radila kad sam postaviti Linux okvir (stvarno, nema izgovor da ne koriste LVM). Kada je dobio na dijelu gdje bih konfigurirati datotečni sustav, Ja kliknuo padajući i instinktivno odabrana EXT4. Tada sam primijetio btrfs u istom popisu. Držati se!!

No, ono što?

Btrfs (“maslac-eff-ESS”, “bolje eff-ESS”, “pčela-drvo-eff-ESS”, ili što god vam mašta na dan) je relativno novi datotečni sustav razvijen kako bi se donijeti Linux’ datotečnog mogućnosti vratiti se na stazu s trenutnom datotečnog sustava tech. Postojeći King-of-the-Hill datotečni sustav, “ext” (Trenutna verzija zove EXT4) je prilično dobro – ali to je ograničeno, zaglavi u staroj paradigmi (mislim sasvim novom F22 Raptor vs. an F4 Phantom s pola šalili pokušaj jednog ekvivalentnosti nadogradnje) i malo je vjerojatno da bi mogli konkurirati za jako dugo s novijim Enterprise datotečne sustave kao što su Oracle ZFS. Btrfs još uvijek ima dug put to ići i još uvijek smatra eksperimentalnim (ovisno o tome koji vas pitati i što značajke koje trebate). Mnogi smatraju da je to stabilna za osnovnu uporabu – ali nitko neće napraviti nikakve garancije. I, naravno, svi govore da bi i testiranje sigurnosnih kopija!

Mooooooo

Najbitnija razlika između ext i btrfs je da je btrfs “Krava” ili “Kopiraj na Write” datotečni sustav. To znači da su podaci zapravo nikada namjerno prebrisati datotečni sustav je unutarnji. Ako pišete promjenu u datoteku, btrfs će napisati svoje promjene na novo mjesto na fizičkom mediju, te će ažurirati interne naputke da se odnosi na novo mjesto. Btrfs ide korak dalje u da ti unutarnji pokazivače (nazivaju metapodacima) su također Krava. Starije verzije ext bi jednostavno prepisati podatke. Ext4 će koristiti Journal kako bi se osiguralo da se korupcija neće dogoditi trebao AC utikač se povukao iz na većini neumjesan trenutku. Časopis rezultati u sličnom broju koraka potrebno ažurirati podatke. Uz SSD, temeljni hardvera djeluje na sličan kravu proces bez obzira što datotečni sustav koji koristite. To je zato SSD diskovi zapravo ne može prepisati podatke – oni moraju kopirati podatke (s promjenama) na novo mjesto, a zatim izbrisati stari blok cijelosti. Optimizacija u ovom području je da SSD možda čak i ne izbriše staru blok nego jednostavno zabilježite za brisanje bloka na kasnije vrijeme kada se stvari nisu toliko zauzet. Krajnji rezultat je da SSD diskovi vrlo dobro uklapaju s kravom datotečnog sustava i ne obavljaju, kao i sa non-kravu datotečnih.

Da bi stvar bila zanimljiva, Krava u datotečni sustav lako ide ruku pod ruku sa značajkom naziva deduplikacija. To omogućuje dva (ili više) identičnih blokova podataka koji će biti pohranjeni korištenjem samo jednu kopiju, štedi prostor. S kravu, ako deduplicated datoteka izmjena, odvojeni blizanac neće biti pogođeni kao izmijenjene datoteke u podaci će biti napisani na nekom drugom fizičkom bloka.

Krava je pak čini snapshotting relativno lako provesti. Kad snimak je napravljen sustav samo zapisuje novu snimku kao dupliranje svih podataka i metapodataka unutar volumena. S kravu, kada su promjene, snimka je podataka ostaje netaknut, i dosljedan pogled datotečni sustav statusu u vrijeme snimak je napravljen može održavati.

Novi prijatelj

Uz gore na umu, pogotovo jer Ubuntu je napravio btrfs dostupan kao install-time opciju, Pomislio sam da će to biti dobar put da se upustim u btrfs i istražiti malo. 🙂

Dio 2 uskoro …

Udio
Thursday, January 01st, 2009 | Autor:

Očigledno, 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 i Debian dobro. 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) will not, 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” ili “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!

Oko 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 tresnuti Skripta, 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 za 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) minuta

Ubuntu: 15 – 40 (20) minuta

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. Na primjer: 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. Umjesto, Arch Linux caught his eye. Arch Linux is a rolling-release (like Gentoo), binary-based (like Ubuntu) distribution. Its packages (dobro, 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 pacčovjek, 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, ili Arch korisnik repozitorij. 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.

Također, the AUR supports a voting system whereby popular packages get placed into the more official [community] repozitorij. 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 minuta. 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 na Distrowatch.

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