Archive for the Category » pūrua «

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
Saturday, February 21st, 2009 | Author:

The relatively new document types Office 2007 has given some web hosts problems when their clients want to offer documents for download. Most often, the documents are being offered by the web server as text/html which is then rendered as a ton of garbage on the web user’s screen.

The best way to resolve this is to add all the MIME types to the server’s main configuration. IIS7 for Windows already has these MIME types set up correctly by default. IIS6 and IIS5 require the MIME types to be added, as might Apache on older installations. For Apache, there is also a workaround for the individual domain owner to add the mime types via Apache’s .htaccess kōnae.

IIS 6 MIME type addition (for the Server Administrator)

Before this can be done, ensure that your server is also set to allow direct metabase editing:

  1. Load IIS Manager: Start -> Run, “inetmgr” -> [OK]
  2. Right click theserverand clickProperties
  3. Within theInternet Information Servicestab (usually the only tab), ensure that theEnable Direct Metabase Editcheckbox is checked.
  4. Click [OK]

Be sure to back up IIS’s configuration (konei for IIS5) beforehand. I won’t take any responsibility for an admin breaking his server. I have reason to believe this may also work on IIS5 however I have just as much reason to believe that it might just give lots of errors. If an IIS5 / Windows 2000 admin is willing to test this for me after backing up your configuration please let me know of the results.

Copy the following text into a file named msoff07-addmime.vbs and execute it once from the commandline by typing cscript msoff07-addmime.vbs and pressing Enter. If you run it more than once, the MIME types will be added each time and you will have multiple identical entries:

' This script adds the necessary Office 2007 MIME types to an IIS 6 Tūmau.
' To use this script, just double-click or execute it from a command line.
' Running this script multiple times results in multiple entries in the
' IIS MimeMap so you should not run it more than once.
' Modified from http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Dim MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
' Set the MIME types to be added
MimeTypesToAddArray = Array(".docm", "application/vnd.ms-word.document.macroEnabled.12", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/vnd.ms-word.template.macroEnabled.12", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12", _
".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", _
".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12", _
".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", _
".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12", _
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application/vnd.ms-excel.addin.macroEnabled.12", _
".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12", _
".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12", _
".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
".xltm", "application/vnd.ms-excel.template.macroEnabled.12", _
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template") 
 
' Get the mimemap object
Set MimeMapObj = GetObject("IIS://LocalHost/MimeMap")
 
' Call AddMimeType for every pair of extension/MIME type
For counter = 0 ki UBound(MimeTypesToAddArray) Step 2
    AddMimeType MimeTypesToAddArray(counter), MimeTypesToAddArray(counter+1)
Next
 
' Create a Shell object
Set WshShell = CreateObject("WScript.Shell")
 
' Stop and Start the IIS Service
Set oExec = WshShell.Exec("net stop w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Loop
 
Set oExec = WshShell.Exec("net start w3svc")
Do While oExec.Status = 0
    WScript.Sleep 100
Loop
 
Set oExec = Nothing
 
' Report status to user
WScript.Echo "Microsoft Office 2007 Document MIME types have been registered."
 
' AddMimeType Sub
Sub AddMimeType (Ext, MType)
 
    ' Get the mappings from the MimeMap property.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
 
    ' Add a new mapping.
    i = UBound(MimeMapArray) + 1
    Redim Preserve MimeMapArray(i)
    Set MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Extension = Ext
    MimeMapArray(i).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.SetInfo
 
End Sub

Apache MIME type addition (for the Server Administrator)

Apache stores its MIME types in a file normally located at $installpath/conf/mime.types. See the mod_mime documentation for more on how it works. Arch Linux installs its MIME types at /etc/httpd/conf/mime.types me te Parallels Plesk installs it in /usr/local/psa/admin/conf/mime.types. Your distribution might have it in another place, so find your mime.types file by running locate mime.types.

Add the following lines to your mime.types file:

application/vnd.ms-word.document.macroEnabled.12                          docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document   docx
application/vnd.ms-word.template.macroEnabled.12                          dotm
application/vnd.openxmlformats-officedocument.wordprocessingml.template   dotx
application/vnd.ms-powerpoint.template.macroEnabled.12                    potm
application/vnd.openxmlformats-officedocument.presentationml.template     potx
application/vnd.ms-powerpoint.addin.macroEnabled.12                       ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12                   ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow    ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12                pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-powerpoint.slide.macroEnabled.12                       sldm
application/vnd.openxmlformats-officedocument.presentationml.slide        sldx
application/vnd.ms-excel.addin.macroEnabled.12                            xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12                     xlsb
application/vnd.ms-excel.sheet.macroEnabled.12                            xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         xlsx
application/vnd.ms-excel.template.macroEnabled.12                         xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template      xltx

Apache MIME type addition (For the domain owner with at least FTP accessusing .htaccess file)

Add the following text to your domain’s .htaccess kōnae, most commonly in an httpdocs/ directory

AddType application/vnd.ms-word.document.macroEnabled.12 docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.ms-word.template.macroEnabled.12 dotm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
Share