Tag-Archive for » ubuntu «

Sunday, August 04th, 2013 | Author:

Istwa

Anpil te chanje depi dènye mansyone mwen pèsonèl sèvè – li te grandi pa leaps ak limit (li kounye a gen yon 7TB MD RAID6) epi li te dènyèman te rebati ak Ubuntu Sèvè.

Arch pa te janm yon erè. Arch Linux te deja te moutre m 'anpil sou Linux (epi yo pral kontinye fè sa sou Desktop lòt m '). Men, Arch definitivman mande pou plis tan ak atansyon pase Mwen ta renmen pase sou yon sèvè. Idealman mwen ta pito pou kapab bliye sou sèvè a pou yon ti tan jiskaske yon imel rapèl di “um … gen yon dènye koup ou ta dwe gade nan, zanmi.”

Espas se pa gratis – ak ni se pa espas

Opòtinite nan emigre nan Ubuntu te lefèt ke mwen te kouri soti nan Sata pò, pò yo oblije konekte kondui difisil yo rès la nan òdinatè a – ki etalaj ATAK 7TB sèvi ak yon anpil nan pò! Mwen te menm ki te fè kado mwen trè fin vye granmoun 200GB ki gen kapasite difisil kòm li te pran moute youn nan moun ki pò. Mwen menm mwen te avèti moun k ap resevwa a ki gen kapasite a SMART siveyans endike li te enfidèl. Kòm yon solisyon tanporè nan mank nan pò sata, Mwen te menm te imigre eksplwatasyon sèvè a nan yon seri kat baton USB nan yon MD RAID1. Fou. Mwen konnen. Mwen pa t 'twò kontan sou vitès la. Mwen deside ale deyò epi yo achte yon nouvo serye kondwi difisil ak yon kat ekspansyon sata yo ale ak li.

Prensipal patisyon sèvè a nan Arch te lè l sèvi avèk sou 7GB nan ki gen kapasite. Yon moso gwo nan sa ki te yon swap dosye, done kach ak otreman divès oswa nesesè dosye. An tou gwosè aktyèl la nan eksplwatasyon an, ki gen ladan an /lakay katab, te sèlman sou 2GB. Sa a pouse m 'nan gade nan yon super vit- SSD kondwi, panse petèt yon yon sèl ki pi piti yo pa ta ka tèlman chè. Li te tounen soti ke pi bon mache ki pa SSD kondwi a mwen te kapab jwenn aktyèlman koute plis pase youn nan sa yo SSDs relativman ti. Ye pou m '. 🙂

Chwa? Wa?!

Lè w ap chwazi eksplwatasyon an, Mwen ta deja deside li pa ta dwe Arch. Soti nan tout distribisyon yo ak lòt popilè, Mwen se pi abitye ak Ubuntu ak CentOS. Fedora te tou yon posibilite – men mwen pa t 'seryezman ankò konsidere li pou yon sèvè. Ubuntu te genyen tou nan.

Desizyon nan pwochen mwen te fè pa t 'rive jwenn mwen an rive Ubikwite (Sòsye enstalasyon ubentu a) mande li nan m ': Kouman yo mete a moute Partitions.

Mwen te nouvo nan lè l sèvi avèk SSDs nan Linux – Mwen byen okouran de Handbuch yo nan pa sèvi avèk yo kòrèkteman, sitou akòz risk yo nan lonjevite pòv si abusive.

Mwen pa t 'vle sèvi ak yon patisyon swap devwe. Mwen plan sou mete ajou mèr sèvè a / CPU / memwa pa twò lwen nan lavni an. Ki baze sou ki mwen deside mwen pral mete swap nan yon dosye swap sou atak la MD ki deja egziste. Swap a pa pral patikilyèman vit, men objektif sèlman li yo pral pou sa okazyon ra lè yon bagay nan ale mal ak memwa a pa disponib.

Sa a Lè sa a, kite m 'bay la chemen rasin 60GB a plen soti nan yon Intel 330 SSD. Mwen konsidere separe / kay, men li jis te sanble yon ti kras initil, bay ki jan ti kras te itilize nan tan lontan an. M 'premye mete kanpe patisyon an ak Lvm – yon bagay mwen te dènyèman te fè lè mwen mete kanpe yon bwat Linux (vrèman, gen nan pa gen eskiz pa sèvi ak lvm). Lè li te rive nan pati a kote mwen ta konfigirasyon filèsistèm a, Mwen klike drop-desann epi enstenktivman chwazi ext4. Lè sa a, mwen remake btrfs nan lis la menm. Kwoke sou!!

Men, yon sa?

Btrfs (“bè-efe-ESS”, “pi bon-efe-ESS”, “myèl-pyebwa-efe-ESS”, oswa kèlkeswa sa ou imajine nan jou a) se yon relativman nouvo filèsistèm devlope yo nan lòd pote Linux’ kapasite filèsistèm retounen sou track ak teknoloji aktyèl filèsistèm. Wa a-of-a-Hill ki deja egziste filèsistèm, “ext” (vèsyon aktyèl la rele ext4) se trè bon – men li se sèlman, kole nan yon paradigm fin vye granmoun (panse a yon mak nouvo F22 raptor vs. yon F4 Phantom ak yon tantativ mwatye jwe li t'ap jwe nan yon ajou ekivalans) ak se fasil yo dwe kapab fè konpetisyon pou trè long ak plus filèsistèm Enterprise tankou ZFS Oracle a. Btrfs toujou gen yon fason lontan yo ale epi li se toujou konsidere kòm eksperimantal (depann sou ki moun ou mande ak sa ki karakteristik ou bezwen). Anpil konsidere li yo dwe ki estab pou itilize de baz – men pa gen moun ki pral fè okenn garanti. Ak, nan kou, tout moun ap di yo fè ak teste sovgad!

Mooooooo

Diferans ki pi fondamantal ant ext ak btrfs se ke btrfs se yon “Bèf” oswa “Kopi sou Ekri” filèsistèm. Sa vle di ke done se pa janm aktyèlman fè espre efase pa entèrn filèsistèm a. Si ou ekri yon chanjman nan yon dosye, btrfs pral ekri chanjman ou a nan yon kote nouvo sou medya fizik epi yo pral mete pwent yo entèn, al gade nan kote a nouvo. Btrfs ale yon etap pi lwen nan ke moun endikasyon entèn (refere yo kòm Metadata) yo se tou Bèf. Vèsyon ki pi ansyen nan ext ta gen tou senpleman efase done yo. Ext4 ta sèvi ak yon Journal asire ke koripsyon pa pral rive yo ta dwe ploge nan AC yanked soti nan moman sa a ki pi inoportun. Rezilta yo jounal nan yon nimewo ki sanble nan etap oblije mete ajou done. Avèk yon SSD, pyès ki nan konpitè ki kache opere yon pwosesis bèf ki sanble pa gen pwoblèm sa filèsistèm w ap itilize. Sa a se paske SSD kondui pa ka aktyèlman recouvrir done – yo gen a kapab bay kopi done yo (ak chanjman ou) nan yon kote ak nouvo Lè sa a, efase blòk la fin vye granmoun antyèman. Yon optimize nan zòn sa a se ke yon SSD ka pa menm efase blòk la fin vye granmoun men pito tou senpleman fè yon nòt ou efase blòk la nan yon moman pita lè bagay sa yo yo pa konsa pou sa okipe. Rezilta a fen se ke kondui SSD anfòm trè byen ak yon filèsistèm bèf epi yo pa fè kòm byen ak ki pa bèf filèsistèm.

Pou fè zafè enteresan, Bèf nan filèsistèm a fasil ale men nan men ak yon karakteristik rele deduplikasyon. Sa a pèmèt de (oswa plis) blòk ki idantik nan done yo dwe estoke lè l sèvi avèk sèlman yon kopi sèl, ekonomize espas. Avèk bèf, si se yon dosye deduplicated modifye, jimo a apa pa pral afekte kòm done dosye a modifye a pral yo te ekri nan yon blòk diferan fizik.

Bèf nan vire fè snapshotting relativman fasil a aplike. Lè yo bay yon snapshot te fè sistèm nan senpleman anrejistre snapshot nan nouvo tankou se te yon repetisyon nan tout done ak Metadata nan volim nan. Avèk bèf, lè chanjman yo te fè, done snapshot an rete entak, epi li ka yon View ki konsistan de estati filèsistèm a nan lè yo te snapshot a te fè yo ap konsève a.

Yon zanmi nouvo

Avèk pi wo a nan nan tèt ou, espesyalman kòm ubentu te fè btrfs disponib kòm yon opsyon enstale-fwa, Mwen kalkile li ta yon bon moman yo plonje nan btrfs ak eksplore yon ti kras. 🙂

Pati 2 vini byento …

pataje
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 ak Debian byen. 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” oswa “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!

Konsènan 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 frape 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 to 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. Pou egzanp: 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 (byen, 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 pacnonm, 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, oswa 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.

Epitou, 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!
pataje