Archive for the Category » linux «

Rātapu, August 04th, 2013 | Author:

I ahau i te hiko pā o nui toku tūmau MD RAID ngohi. Pai atu i te kia te tūmau me te mea he katoa e ki raro i te tatari hoki ki reira te whakaoti i te fsck, I ahau mea whawhai ki waho o te ngohi nui kia taea e ahau te rere ā-ringa i te fsck.

Heoi, ka rere ā-ringa i te reira kite ahau i ahau kahore ara o te mohio pehea te tawhiti i me pehea te roa e tango i te reira ki te whakaoti. Ko rawa raruraru ki te taua ngohi nui tenei. Ki te rapu iti kitea e ahau i te pito o te tāpiri i te C-tawhā ka karanga fsck. Kihai i kitea e ahau i tenei i roto i te tuhinga Heoi: fsck –whakakitea āwhina kahore kōwhiringa taua.

Tahuri i te kōwhiringa ki te e ext4-motuhake, me te kupu whakaatu he bar i te ahunga whakamua maitai mahi ki te tohu ōrau. Ki te kitea te mōhiohio, hei utu mo “fsck –te tauturu ia” ranei “te tangata fsck”, whai koe ki te whai wāhi “fsck.ext4 –te tauturu ia” ranei “te tangata fsck.ext4”. 🙂

Share
Rātapu, August 04th, 2013 | Author:

History

I puta ke te nuinga mai i whakahuatia whakamutunga e ahau toku tūmau whaiaro – kua tupu te reira e te amuamu me te rohe (te reira i teie nei, he 7TB MD RAID6) a kua tata kua hanga e ia ki te Ubuntu Tūmau.

Arch Ko kore he hape. Kua whakaako Arch Linux i ahau kia nui e pā ana ki Linux (a ka ki te rave i te reira i runga i era atu toku papamahi tonu). Ko Arch tino me ake te wā, me te aro atu e hiahia ana ahau ki te whakapau i runga i te tūmau. I pā atu te hinaaro hiahia ahau ki te e taea ki te wareware mō te tūmau hoki i te wā e tae noa ki ta te īmēra whakamaumahara “a … i reira te he hono i ngā whakahōunga kia titiro koutou i, hoa.”

E kore he utu Space – a e kore he wāhi

Ko te whai wāhi ki te heke ki a Ubuntu ko te meka i rere ahau i roto i SATA tauranga, te tauranga i hiahiatia ki te hono puku pakeke ki te toenga o te rorohiko – ka whakamahi i taua ngohi 7TB RAID te rota o te tauranga! I ara hoatu e ahau atu toku rawa koroheke 200GB kōpae mārō rite ka mau ake tetahi o aua tauranga. Ahau ano hoki faaara te kaiwhiwhi e te kōpae o SMART tohu te aroturuki i hārakiraki. Ka rite ki te kimi rangitahi ki te kore o SATA tauranga, I ara heke ahau OS te tūmau a ki te huinga o te wha USB rakau i roto i te MD RAID1. Haurangi. E mohio ana ahau ki. Kihai ahau i hari rawa e pā ana ki te tere. Faaoti e ahau ki te haere i roto i te hoko i te te puku hou tōtika pakeke me te kāri roha SATA ki te haere ki reira.

I te whakamahi i tataitia Arch tuatahi o te tūmau e pā ana ki 7GB o kōpae. He wāhi nui o taua ko te Whakawhitia kōnae, raraunga keteroki me te rere ngā kōnae momo kē hiahiatia ranei. Whānui i te rahi tūturu o te OS, tae atu ki te /te kāinga kōpaki, Ko anake e pā ana ki te 2KKP. Tenei tonu i kipa ahau ki te titiro ki te super-nohopuku SSD te puku, whakaaro pea a tetahi iti e kore ai e pera te utu. Tahuri te reira i roto i te puku e te na'ina'i kore-SSD i kitea e ahau mau utu atu atu i te kotahi o enei SSDs ähua iti. Yay hoki ahau. 🙂

Kōwhiringa? Woah?!

I roto i te kōwhiri i te OS, Hiahia kē ahau whakatau e kore e waiho te reira Arch. I roto i te atu tuwha rongonui katoa, Oku tino waia ki a Ubuntu ahau me te CentOS. Fedora Ko ano a taea – engari e kore ahau i tino ano whakaaro reira hoki te tūmau. Riro Ubuntu te a tawhio noa.

Te whakatau i muri i ahau ki te hanga kihai i puta ki ahau a taea noatia Ubiquity (Ruānuku tāutanga o Ubuntu) ka ui te reira o te ahau: Pehea ki te whakaturia ake i te wawahitanga.

I hou ki te whakamahi i SSDs i Linux ahau – Ahau pai mohio o te mau herepata o te kore te whakamahi i tika a ratou, te nuinga e tika ana ki to ratou tūpono o te pikinga o rawakore ki te tukinotia.

E kore ahau i hiahia ki te whakamahi i te arai Whakawhitinga oti te whakatapu. Whakamahere e ahau i runga i whakahou kaupapa / PTM / mahara te tūmau a kahore i tawhiti rawa i roto i te heke mai. I runga i taua faaoti e ahau, ka hoatu e ahau ki roto ki Huri te kōnae Whakawhitinga i runga i te RAID MD ngā. E kore e te Whakawhitinga e ngā nohopuku engari tona whakaaro anake ka waiho hoki i taua taime onge, no ka riro i te tahi mea ngā he, me te kore e wātea ana i te mahara.

Na ka whakarerea e ahau tenei ki te hoatu i te ara pakiaka te 60GB ki tonu i roto i o te Intel 330 SSD. Whakaaro ahau mawehe / te kāinga engari reira whakaaro tika, he kikokore iti, homai te iti i whakamahia i roto i te mua. Ahau tuatahi whakaturia ake te arai ki te LVM – te tahi mea kua tata ahau i mahi ina whakaturia e ahau ki runga i te pouaka Linux (tino, i reira te kahore he kupu whakahoki kahore ki te whakamahi i LVM). A, no te ka te reira ki te wahi i te wahi e whirihora e ahau te Pūnahakōnae, Pāwhiritia ahau te taka-iho me te hinengaro, i kōwhiria ext4. Na ka kite ahau i roto i te rārangi btrfs taua. Whakairi ki runga ki!!

Ko te aha?

Btrfs (“pata-eff-ess”, “pai-eff-ess”, “pi-rakau-eff-ess”, nga mea katoa Tena koe ranei i runga i te ra) Kua whakawhanakehia he Pūnahakōnae āhua hou i roto i kia kawea Linux’ kaha hoki Pūnahakōnae i runga i te ara ki te hangarau Pūnahakōnae o nāianei. Ko te Pūnahakōnae Kingi-o-te-Hill ngā, “ext” (te putanga o nāianei i huaina ext4) he tino pai – engari he iti, mau i roto i te tauira tawhito (whakaaro o te waitohu hou F22 Raptor vs. he K4 Phantom ki te hawhe-hunaonga i ngana i te whakamohoa equivalency) me he pea ki te e taea ki te whakataetae mo te tino roa ki hōu filesystems Enterprise pērā i A ahurewa ZFS. Tonu he huarahi roa ki te haere Btrfs me te whakaaro tonu whakamātau (i runga i te hunga e ui ki a koutou, me te mea ngā āhuatanga e hiahia ana koe kei). He tokomaha whakaaro ki reira hei kainga mo te whakamahi taketake – engari te tangata e haere ana ki te hanga tetahi ki pāmamao. A, o te akoranga, katoa kei te mea ki te hanga me te pūrua whakamātautau!

Mooooooo

Ko te rerekëtanga tino taketake waenganui i ext me btrfs ko e btrfs ko te “Kau” ranei “Tāruatia ki Tuhia” Pūnahakōnae. Tenei te tikanga e raraunga kua kore tino āta tuhia e te internals o te Pūnahakōnae. Ki te tuhituhi koe i te huringa ki te kōnae, ka tuhituhi a koutou huringa btrfs ki te wāhi hou i runga i pāpāho tinana, a ka whakahou i te atatohu ā-ki te tirohia ki te tauwāhi hōu. Btrfs haere te mahi anō i roto i taua hunga atatohu ā- (tukua ki te rite ki metadata) He hoki Kau. Ngā putanga tawhito o ext e kua tuhia noa te raraunga. E whakamahi Ext4 he Journal ki te whakarite e kore e pirau e puta kia yanked te plug AC i roto i te taime i te nuinga kāore i. Ngā hua o te hautaka i roto i te maha rite o nga kaupae e hiahiatia ana ki te whakahōu i ngā raraunga. Ki te SSD, te taputapu waiwai mahi he tukanga kau ōrite kore mea aha Pūnahakōnae e whakamahi ana koe. Ko te kupu tenei i te mea e kore e taea e ngā puku SSD tuhirua rawa raraunga – ratou ki te tārua i te raraunga (ki o koutou huringa) ki te wāhi hou me ka ūkui anake te poraka tawhito. He arotautanga i roto i tenei rohe ko e kore ai he SSD ara te ūkui i te poraka tawhito engari kia noa te nota ki te ūkui i te poraka i te wa i muri mai, no te kore e pera pukumahi mea. Ko te hua mutunga ko e uru rawa te pai puku SSD ki te Pūnahakōnae kau, me te kore e rite ki te mahi pai ki te filesystems kau-kore.

Ki te hanga mea whai, Kau i roto i te Pūnahakōnae haere ngāwari ringa i roto i te ringa ki te āhuatanga i huaina deduplication. Tenei ka taea e rua (neke atu rānei) ōrite poraka o ngā raraunga ki te penapena mā te whakamahi i te anake tētahi tārua kotahi, te tiaki wāhi. Ki te kau, ki te whakarerekētia te kōnae deduplicated te, e kore e pāngia i te māhanga motuhake rite e raraunga i te kōnae whakarerekētia a kua tuhituhia kua ki i te poraka rerekē tinana.

Kau i roto i tahuri hanga snapshotting ngāwari ngā ki te whakatinana i. I te hanga he hopuāhua te tuhi noa i te pūnaha te whakaahua hou rite he tāruarua o ngā raraunga katoa me metadata i roto i te rōrahi. Ki te kau, ka hanga e huringa, noho te tum raraunga o te whakaahua, a taea tonu he tirotiro rite o te mana o te Pūnahakōnae i te wa i hanga i te whakaahua i.

A hoa hou

Ki te runga ake i roto i te hinengaro, rawa rite hanga Ubuntu kua btrfs wātea hei kōwhiringa tāuta-wā, Te take e waiho hei wa pai ki te ruku ki btrfs me te tūhura i te iti. 🙂

Part 2 e haere mai ana, no te …

Share
Thursday, November 12th, 2009 | Author:

If you ever find yourself updating a single application in Arch Linux (a very bad idea, btw) and it upgrades readline you might end up seeing an error along the lines of:
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Hopefully you still have a bash prompt open and you haven’t closed them all. If you still can, immediately run the following:
pacman -S bash
else you won’t be able to run bash any more because bash would still be linking to the old version of readline.

hoki, in future, don’t run
pacman -Sy application
(python in my case)
instead, run:
pacman -Syu
which will ensure that all applications are upgraded.

Personally, I think that bash should have had a dependency set saying that it required the old specific version of readline and the same for the new bash, requiring the new version of readline. Regardless, rather play it safe. 😉

Share
Paraire, September 11th, 2009 | Author:

Peace in the land of USB

Under a *nix operating system, having multiple partitions on a USB drive isn’t rocket science, it just works. I roto i toku take, my USB drive has two partitions because the first partition is a bootable Arch Linux installer.

I have Windows on a desktop at homemostly for gamingand many of my colleagues use it too. Since Windows doesn’t do very well with non-Windows partitions I figured I could create a FAT32 partition on the memory stick after the bootable Arch Linux partition. FAT32 is almost ubiquitous and is usable on every common desktop operating system in the world.

Bleh

Unfortunately it doesn’t work straight off the bat. Apparently, Microsoft in their infinite wisdom decided that memory sticks are supposed to have one (and only one) partition. In reality Windows finds the first partition and then ignores any others that happen to be set up:

Please Format

Err, no, I do not want you to format my Arch Linux installation partition

The trick to getting it working is to fool Windows into thinking the device is kore a regular USB memory stick but perhaps a solid-state hard disk which happens to be connected via USB. Yes I know, this is seriously stupid that Windows behaves this way. A solid-state hard disk is just a whopping big (and fast) memory stick after all!

I found a few sources on how to do this however I still had to figure out some things on my own. Specifically, the guides I found either skipped some steps or didn’t provide enough information on where to download the driver package.

This procedure involves manually changing hardware drivers and installingnon-signeddriversnot intended for your hardware”. I know someone is going to break their system and blame me so I say now that I take no responsibility for any damage you may do to your Windows system as a result of this. Read that again. 😛

Instructions

remove the highlighted text

click for larger version

Download and unzip the driver, originally created by Hitachi, konei. Open the cfadisk.inf file in notepad (or your favourite plaintext editor), and find the section labeled [cfadisk_device]. Remove the section highlighted on the right:

Minimize (don’t close) the editor and go to your desktop iconsright-click on My Computer and select Properties. Select the hardware tab and then select [Device Manager]:

System Properties

Find the device underDisk drives”, right-click your memory stick and select Properties:

Device Manager

Click the Details tab and in the dropdown box on that page, selectHardware Ids”. Click the first line in the list of Hardware IDs and press Ctrl+C to copy the name:

USB Hardware Ids

Don’t close this dialog, go back to notepad (which was minimised) and paste the hardware ID into where the previous content was removed.

Changes pasted into notepad

Save the file in notepad and go back to the device’s property dialog window. Click theDrivertab and click the [Update Driver…] button. In the windows that pop up, selectNo, not this time”; [Next] -> “Install from a list or a specific location (Advanced)”; [Next] -> “Don’t search. I will choose the driver to install.”; [Next] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

Browse to the folder where you have saved the modified cfadisk.inf file. Click [OK]. You will find

there is a Hitachi Microdrive driver listed. Select this and click [Next]. When the warning

appears, click [Yes]. Another warning will pop up regarding a similar issue (these are theunsigned” me te “not intended for your hardwarewarnings I mentioned earlier). Click [Continue Anyway]:

At this point I recommend closing all the dialog boxes related to the setup. Finally, remove and re-insert the memory stick into your USB port and you should find that the extra partitions on the stick are accessible. In the worst-case scenario, you might still need to partition the disk however the hard part is over. 🙂

Share
Wenerei, August 26th, 2009 | Author:

If you’re using *nix and you’ve found this middle-click behaviour annoying, change Firefox‘s middlemouse.contentLoadURL about:config option to false.

Big thanks to Ayman Hourieh for the tip.

Share