Tag-Archive for » ubuntu «

Sunday, August 04th, 2013 | Author:

Historia

Mengi alikuwa iliyopita tangu mimi mwisho zilizotajwa yangu binafsi server – ni imeongezeka kwa kiwango kikubwa na mipaka (sasa ina 7TB md RAID6) na alikuwa karibuni imekuwa upya kwa Ubuntu Server.

Upinde alikuwa kamwe kosa. Arch Linux alikuwa tayari alinifundisha sana kuhusu Linux (na itaendelea kufanya hivyo kwenye desktop yangu nyingine). Lakini Arch dhahiri inahitaji muda zaidi na makini kuliko napenda kutumia katika server. Walau ningependa wanapendelea kuwa na uwezo wa kusahau kuhusu server kwa muda mpaka email kukumbusha anasema “um … kuna updates wanandoa unapaswa kuangalia, buddy.”

Nafasi si bure – na wala nafasi ya

nafasi ya kuhamia Ubuntu alikuwa na ukweli kwamba nilikuwa kukimbia nje ya SATA bandari, bandari required kuunganisha anatoa ngumu kwa mapumziko ya kompyuta – kwamba 7TB uvamizi safu matumizi mengi ya bandari! Mimi nilikuwa na hata kupewa mbali wangu sana zamani 200GB ngumu kuendesha kama Ni Akachukua moja ya bandari Wale. Mimi pia alionya kwamba mpokeaji disk ya SMART ufuatiliaji unahitajika ilikuwa ni uhakika. Kama workaround muda na ukosefu wa bandari SATA, Mimi nilikuwa na hata wamehamia OS seva na seti ya nne USB vijiti katika md RAID1. Crazy. Mimi najua. Mimi si furaha sana kuhusu kasi. Niliamua kwenda nje na kununua mpya kuaminika ngumu kuendesha na kadi SATA upanuzi kwenda nayo.

server cha msingi Arch kizigeu ilikuwa kutumia kuhusu 7GB ya disk. chunk kubwa ya kwamba ilikuwa wabadilishane faili, cached data na vinginevyo miscellaneous au unnecessary files. Kwa ujumla ukubwa halisi wa OS, ikiwa ni pamoja na /nyumbani folder, ilikuwa tu kuhusu 2GB. Hii ilisababisha yangu kuangalia ndani ya super-haraka SSD kuendesha gari, kufikiri labda moja ndogo wanaweza kuwa hivyo gharama kubwa. Aligeuka kuwa gharama nafuu mashirika yasiyo ya SSD gari mimi naweza kupata kwa kweli gharama zaidi ya moja ya haya SSDs ndogo. Yay kwa ajili yangu. 🙂

Uchaguzi? Woah?!

Katika kuchagua OS, Ningependa tayari aliamua isingekuwa Arch. Kati ya mengine yote mgawanyo maarufu, Mimi nina zaidi ukoo na Ubuntu na CentOS. Fedora alikuwa pia uwezekano – lakini sikuwa umakini bado ni kuchukuliwa kwa seva. Ubuntu alishinda duru ya.

uamuzi ijayo mimi alikuwa na kufanya hawakuwa kutokea kwangu mpaka Kuenenea (Ufungaji wa Ubuntu mchawi) aliuliza ni wa kwangu: Jinsi ya kuanzisha partitions.

Nilikuwa mpya ya kutumia SSDs katika Linux – Mimi nina pamoja na ufahamu wa hasara za si kutumia yao kwa usahihi, zaidi kutokana na hatari ya longevity maskini kama vibaya.

Sikutaka kutumia ari byta kizigeu. Mimi mpango juu ya kuwaendeleza Motherboard seva / CPU / kumbukumbu si mbali sana katika siku zijazo. Kulingana na kwamba mimi niliamua kuweka byta katika faili byta juu ya uvamizi zilizopo MD. wabadilishane hautakuwa hasa kufunga lakini madhumuni yake itakuwa tu kwa ajili ya tukio nadra kwamba wakati kitu wamekwenda vibaya na kumbukumbu si inapatikana.

Hii basi kushoto kwangu kutoa mizizi njia 60GB kamili nje ya Intel 330 SSD. Nikaziangalia kutenganisha / nyumbani lakini alionekana tu kidogo pointless, aliyopewa jinsi kidogo ilitumika katika siku za nyuma. Mimi kwanza kuanzisha kizigeu na LVM – kitu Nimekuwa hivi karibuni wamekuwa wakifanya wakati mimi kuanzisha sanduku Linux (kweli, hakuna udhuru si kwa matumizi LVM). Wakati got sehemu ambapo napenda configure mfumo wa faili, Mimi clicked drop-down na instinctively kuchaguliwa ext4. Kisha mimi niliona btrfs katika orodha hiyo. Hutegemea!!

Lakini nini?

Btrfs (“siagi-EFF-ess”, “bora-EFF-ess”, “nyuki-mti-EFF-ess”, au chochote wewe dhana juu ya siku) ni mfumo wa faili jipya maendeleo ili kuleta Linux’ mfumo wa faili uwezo nyuma kufuatilia kwa sasa mfumo wa faili tech. Mfalme-ya-the-Hill zilizopo mfumo wa faili, “ext” (toleo la sasa kuitwa ext4) ni nzuri – lakini ni mdogo, kukwama katika dhana ya zamani (kufikiri ya bidhaa mpya F22 Raptor vs. an F4 Phantom na jaribio nusu-jested katika kuboresha equivalency) na kuna uwezekano wa kuwa na uwezo wa kushindana kwa muda mrefu sana na filesystems karibu zaidi Enterprise kama vile Oracle ZFS. Btrfs bado ina njia ndefu ya kwenda na bado ni kuchukuliwa majaribio (kutegemea ambaye kuuliza na kile unahitaji makala). Wengi wanaiona kuwa imara kwa ajili ya matumizi ya msingi – lakini hakuna ni kwenda kufanya dhamana yoyote. Na, bila shaka, kila mtu ni kusema ya kufanya mtihani na backups!

Mooooooo

tofauti ya msingi kati ya ext na btrfs ni kwamba btrfs ni “Ng'ombe” au “Nakala Andika” mfumo wa faili. Hii ina maana kwamba data ni kweli kamwe makusudi overwritten na internals mfumo wa faili ya. Kama wewe kuandika mabadiliko kwenye faili, btrfs kuandika mabadiliko yako na eneo mpya ya vyombo vya habari kimwili na update kuyatumia ndani kwa kutaja eneo mpya. Btrfs huenda hatua zaidi kwa kuwa wale kuyatumia ndani (inajulikana kama metadata) ni pia Ng'ombe. Wazee matoleo ya ext ingekuwa tu overwritten data. Ext4 atatumia Journal kuhakikisha kwamba rushwa si kutokea lazima kuziba AC kuwa yanked nje wakati wengi inopportune. Matokeo ya journal katika idadi sawa ya hatua zinazohitajika kwa update data. Na SSD, vifaa inavyotumia kazi sawa ng'ombe mchakato bila kujali filesystem unatumia. Hii ni kwa sababu SSD anatoa hawawezi kweli overwrite data – wana kunakili data (pamoja na mabadiliko yako) na eneo mpya na kisha kufuta block zamani kabisa. optimization katika eneo hili ni kwamba SSD wanaweza hata kufuta block zamani lakini badala tu kufanya kumbuka kufuta kuzuia kwa wakati mmoja baadaye wakati mambo si hivyo busy. Matokeo ya mwisho ni kwamba SSD anatoa fit vizuri sana na filesystem ng'ombe na si kufanya kama vizuri na filesystems mashirika yasiyo ya ng'ombe.

Ili kufanya mambo ya kuvutia, Ng'ombe katika mfumo wa faili urahisi huenda mkono kwa mkono na kipengele aitwaye deduplication. Hii inaruhusu mbili (au zaidi) vitalu kufanana ya data kuhifadhiwa kwa kutumia tu nakala moja, kuokoa nafasi. Pamoja na ng'ombe, kama faili deduplicated ni iliyopita, pacha tofauti hazitaathirika kama data faili iliyopita mapenzi vimeandikwa kwa kuzuia tofauti kimwili.

Ng'ombe kwa upande hufanya snapshotting rahisi kutekeleza. Wakati snapshot ni alifanya mfumo tu rekodi snapshot mpya kama kuwa kurudia ya data na metadata ndani ya kiasi. Pamoja na ng'ombe, mabadiliko yanapofanyika, data snapshot wa anakaa intact, na mtazamo thabiti wa hali ya mfumo wa faili kwa wakati snapshot lilifanywa vinaweza kuendelezwa.

rafiki mpya

Pamoja na hapo juu katika akili, hasa kama Ubuntu imefanya btrfs inapatikana kama chaguo-kufunga wakati, I figured itakuwa wakati mzuri wa kupiga mbizi katika btrfs na kuchunguza kidogo. 🙂

Sehemu 2 kuja hivi karibuni …

Kushiriki
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 na Debian vizuri. 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” au “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!

Kuhusu 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 kwa 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. Kwa mfano: 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 (vizuri, 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 pacMtu, has built-in dependency and conflict handling. I use another package manager, yaourt (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, au 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.

pia, 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 on Distrowatch.

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