Tag-Archive for » ubuntu «

Sunday, August 04th, 2013 | Author:

Storja

Ħafna kienu nbidlu peress I aħħar imsemmi tiegħi server personali – din kibret leaps u limiti (issa għandha 7TB md RAID6) u kien reċentement ġie rrikostitwit ma Ubuntu Server.

Arch qatt kien żball. Arch Linux kienet diġà mgħallma me daqstant dwar Linux (u se tkompli tagħmel dan fuq id-desktop tiegħi oħra). Iżda Arch definittivament teħtieġ iktar ħin u attenzjoni milli nixtieq li jonfqu fuq server. Idealment I d jippreferu li jkunu kapaċi tinsa dwar il-server għal waqt sakemm email tfakkira jgħid “um … hemm koppja aġġornamenti għandek tfittex fil, buddy.”

Ispazju mhuwiex ħieles – u la huwa l-ispazju

L-opportunità li jemigraw lejn Ubuntu kien il-fatt li kelli jispiċċaw ta ' SATA portijiet, il-portijiet meħtieġa biex jgħaqqdu hard drives għall-bqija tal-kompjuter – li firxa RAID 7TB juża ħafna ta 'portijiet! I kienet saħansitra mogħtija bogħod tiegħi ħafna qodma hard disk 200GB kif hija ħadet up waħda minn dawk il-portijiet. I wkoll wissa lir-riċevitur li l-disk tal SMART monitoraġġ indika li kien inaffidabbli. Bħala workaround temporanja għan-nuqqas ta 'portijiet SATA, I kienet saħansitra emigraw OS-server li sett ta 'erba stikek USB fi md RAID1. Crazy. Naf. I ma kienx wisq kuntenti dwar il-veloċità. I iddeċieda li joħorġu u jixtru hard drive affidabbli ġodda u karta espansjoni SATA li jmorru magħha.

Partition l-server primarja Arch kien uża madwar 7GB ta 'disk. A blokki kbar ta 'dak kien tpartit fajl, data Cached u fajls inkella jew mixxellanji mhux meħtieġa. B'mod ġenerali d-daqs attwali tal-OS, inkluż il- /home folder, Kien biss madwar 2GB. Dan wassal għalija li tħares lejn super fast SSD issuq, ħsieb forsi wieħed iżgħar jista 'ma jkunx tant għali. Irriżulta li l-irħas drive mhux SSD I jista 'jsib ispiża attwalment aktar minn wieħed minn dawn SSDs relattivament żgħar. Yay għalija. 🙂

Għażla? Woah?!

Fl-għażla l-OS, I d diġà ddeċidiet li ma jkunx Arch. Mit-total ta 'l-distribuzzjonijiet oħra popolari, Jien aktar familjari ma Ubuntu u CentOS. Fedora kien ukoll il-possibbiltà – iżda I kien għadu ma kkunsidrata serjament dan għal server. Ubuntu rebaħ il-round.

Id-deċiżjoni li jmiss I kellha tagħmel ma seħħx lili sakemm Ubikwità (Wizard installazzjoni Ubuntu) talabha ta 'lili: Kif twaqqaf il- ħitan.

I kien ġdid għall-użu SSDs fl-Linux – Jien konxju tal-iżvantaġġi ta 'mhux jużawhom b'mod korrett, aktar minħabba r-riskju tagħhom ta 'lonġevità fqira jekk użati ħażin.

I ma riedx li jużaw partition tpartit dedikat. I pjan dwar it-titjib motherboard-server / CPU / memorja mhux wisq fil-futur. Ibbażat fuq dan I iddeċieda I se tpoġġi swap ġo fajl tpartit fuq il-RAID md eżistenti. It-tpartit ma se jkun partikolarment mgħaġġel iżda uniku skop tagħhom se jkun għal din l-okkażjoni rari meta xi ħaġa marret ħażin u l-memorja ma jkunx disponibbli.

Dan imbagħad telqu lili biex jagħtu l- passaġġ għerq l-60GB sħiħa barra minn Intel 330 SSD. I kkunsidrat jisseparaw / home iżda hija biss deher ftit inutli, mogħti kif ftit kien użat fil-passat. I l-ewwel stabbilit il-partition ma LVM – xi ħaġa li stajt reċentement qed tagħmel kulmeta I twaqqaf kaxxa Linux (verament, hemm l-ebda skuża biex ma jużawx LVM). Meta ltqajna għall-parti fejn nixtieq kkonfigurat l-filesystem, I għafast il-drop-down u istintivament magħżula ext4. Imbagħad I ndunat Btrfs fl-istess lista. Tistrieħ fuq!!

Iżda dak?

Btrfs (“butir eff-ESS”, “aħjar eff-ESS”, “bee-siġra-eff-ESS”, jew kwalunkwe inti fancy fil-jum) huwa filesystem relattivament ġdida żviluppata sabiex iġibu Linux’ kapaċitajiet filesystem lura fuq il-binarji ma 'kurrent filesystem teknoloġija. Ir-Re-of-the-Hill eżistenti filesystem, “ext” (il-verżjoni attwali msejjaħ ext4) hija pjuttost tajba – iżda hi limitata, staġnati paradigma qodma (think ta 'marka ġdida F22 Raptor vs. ta F4 Phantom ma 'tentattiv nofs jested fi upgrade ekwivalenza) u mhuwiex probabbli li jkunu jistgħu jikkompetu għal żmien twil ma 'filesystems Intrapriża ġodda bħall- ZFS Oracle. Btrfs għad baqgħalha triq twila quddiemha u għadu meqjus sperimentali (jiddependi fuq li inti titlob u liema karatteristiċi li għandek bżonn). Ħafna jaħsbu li hu stabbli għall-użu bażiku – imma ħadd ma jkun se jagħmel xi garanziji. U, tal-kors, kulħadd huwa qal li tagħmel u test backups!

Mooooooo

L-aktar differenza fundamentali bejn ext u Btrfs hija li Btrfs huwa “Cow” jew “Kopja fuq Write” filesystem. Dan ifisser li d-data hija qatt ma attwalment deliberatament jinkiteb fuqhom mill-intern tal-filesystem tal. Jekk inti tikteb bidla għall-fajl, Btrfs se jikteb bidliet tiegħek għal post ġdid fuq midja fiżika u se taġġorna l-pointers interni li jirreferi għall-post ġdid. Btrfs tmur pass ieħor f'dik dawk pointers interni (imsejħa metadata) huma ukoll Cow. Verżjonijiet anzjani ta 'ext ikollu sempliċement fuq ohra l-informazzjoni. Ext4 ser jużaw Ġurnal sabiex jiżguraw li l-korruzzjoni mhux se jseħħ jekk il-plagg AC jiġu yanked fil-mument l-aktar inadatt. Ir-riżultati ġurnal f'numru simili ta 'passi meħtieġa li jaġġornaw id-dejta. Bil SSD, l-hardware sottostanti topera proċess baqra simili x'ikun filesystem inti qed tuża. Dan huwa minħabba drives SSD ma tistax attwalment jissostitwixxu data – huma għandhom kopja tad-data (mal-bidliet tiegħek) għal post ġdid u mbagħad iħassar il-blokk qodma kompletament. Ottimizzazzjoni f'dan il-qasam hija li SSD ma jista 'anke tħassar l-blokk qodma iżda sempliċiment tagħmel nota litħassar l-blokk fi żmien aktar tard meta l-affarijiet mhumiex daqshekk busy. Ir-riżultat aħħari huwa li drives SSD jaqblu tajjeb ħafna ma 'filesystem baqra u ma jwettqu kif ukoll ma filesystems mhux baqra.

Biex l-affarijiet interessanti, Cow fil-filesystem faċilment tmur id f'id ma 'karatteristika imsejjaħ deduplication. Dan jippermetti 2 (jew aktar) blokki identiċi ta 'data li għandha tiġi maħżuna bl-użu biss kopja waħda, iffrankar l-ispazju. Bil Cow, jekk fajl deduplicated hija modifikata, l twin separata mhux se jiġu affettwati bħala data tal-fajl modifikata se jkunu nkitbu għal blokk fiżika differenti.

Cow mbagħad jagħmel snapshotting relattivament faċli biex jiġi implimentat. Meta notament s-sistema hija biss l-istampa l-ġdida bħala duplikazzjoni tad-dejta kollha u metadata fil-volum. Bil Cow, meta bidliet ikunu saru, data tal-snapshot ta soġġorni intatti, u viżjoni konsistenti tad-istatus tal-filesystem fil-ħin l-istampa saret tista 'tinżamm.

A ħabib ġdid

Bl-hawn fuq fil-moħħ, speċjalment fir-Ubuntu għamlet Btrfs disponibbli bħala għażla jinstallaw-time, I dehret se jkun żmien tajjeb biex adsa fis Btrfs u tesplora ftit. 🙂

Parti 2 coming soon …

Aqsam
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 u Debian ukoll. 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” jew “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!

Dwar 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 li 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. Per eżempju: 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 (ukoll, 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 pacbniedem, 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, jew 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.

wkoll, 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!
Aqsam