Okokufundisa: I-Loop File Systems

Luyini uhlelo lwefayela le-loop?

I-Gnu / Linux (kanye neningi lezinhlelo ze-unix) inendlela evumela ukufaka ifayili (elifomethwe ngaphambilini) njengokungathi yidiski eliqinile, imvamisa ngaphandle kwetafula lokuhlukanisa. Lo mdwebo we-crappy (owenziwe yimi) uchaza ukuthi le ndlela isebenza kanjani.

Ishadi lokugeleza elichaza (cishe) ukuthi amafayela e-loops asebenza kanjani ku-GNU / linux.

** Ayimeleli ngokuphelele ukusebenza kwangempela.

Ukusetshenziswa kwamafayela we-loop

Amafayela we-1- Mount.iso

Amafayela we-.iso, ubuhle obusezingeni elijwayelekile kuma-CD nakuma-DVD, awalutho ngaphandle kwefayela elingu-loop uhlelo lwalo olungaba ISO 9960 (okuvame kakhulu kumaCD) noma UDF (okuvame kakhulu kuma-DVD). Ukuyifaka, sizosebenzisa umyalo we-mount.

mkdir iso # sakha umkhombandlela chmod -R 666 iso # sinikeza bonke abasebenzisi funda imvume ukukhweza isithombe.iso iso / # sifaka isithombe se-iso (sidinga impande)

Umkhawulo onawo ukuthi, ngenxa yezizathu ezisobala, womabili la mafayili amafayili afundwa kuphela.

2- ama-squashfs afundwayo kuphela

Ake sithi sinefolda yezithombe kanye / noma amavidiyo ahlelwe ngokuya ngonyaka athathwe ngawo. Ngokusobala, akunakwenzeka neze ukuthi sifuna ukuguqula idatha equkethwe kumafolda weminyaka edlule. Yilapho ama-Squashfs engena khona. I-squashfs uhlelo lwefayela olucindezelwe kuphela, ngakho-ke lapho isithombe senziwe, ngeke sikwazi ukuguqula idatha ngaphakathi.

Ngakho-ke, hhayi kuphela sizokonga inani elikhulu lesikhala, kodwa futhi kuzoba nomphumela wokufuna ukwazi ukuthi ukufundwa kwamafayela kuzoshesha, ngokufunda amafayela amancane, ngoba kulezi zinsuku ukucindezela ifayili kungumzamo omncane wama-CPU amaningi.

Ukushiya ama-preambles, ukudala isithombe se-squashfs kufanele sisebenzise umyalo we-mksquashfs, ogama lakhe lilula:

mksquashfs directorio 1 [directorio 2 directorio 3...] imagen.sqsfs -comp [algoritmo de compresión] -b [tamaño del bloque ]

Nasi isibonelo esisebenzayo:

mksquashfs fotos-2009 fotos-2010 fotos-2011 fotos-2012 fotos-2013 fotos_2009-2013.sqsfs -comp xz -bs 1M

Yebo, i-algorithm ekhethiwe yi-xz ngoba yiyo leyo isilinganiso sokucindezela esiphakeme okunikezwayo (kwalokhu okutholakalayo), ngenkathi usayizi webhlokhi okhethiwe ubuningi. ini ivumela imiphumela engcono yokucindezela (ngokuzenzakalela zingama-64KiB).

Manje kufanele sikwazi ukuyifaka ngokulula;

mount fotos_2009-2013.sqsfs fotos_2009-2013/

Ngemuva kokubheka ukuthi konke kulungile, singasusa amafayela woqobo noma sishiye ifayela njengesipele.

Uma kwenzeka sifuna ukuthi ifakwe lapho i-OS iqala, kufanele sengeze umugqa walesi sitayela ku / etc / fstab:

/dir/loop.sqsh /dir/mountdir squashfs ro,defaults 0 0

Ukufaka idatha engalungile kufayela le- / etc / fstab kuzobangela ukuthi uhlelo luyeke ukubhutha. Ukuqinisekisa ukuthi yonke into isebenza kahle, singasebenzisa umyalo ukukhweza -a

Manje, kwenzekani lapho sifuna ukufaka noma ukususa amafayela, noma ukumane sikhiphe lezi zithombe? Yebo, sinomyalo umyalo unsquashfs.

unsquashfs [opciones] snapshot.sqfs [Directorios o archivos que extraer]

Ngokuzenzakalelayo izosebenzisa i- "squashfs-root" njengomkhombandlela wesizinda. kungashintshwa nge -d inketho

Ngaphandle kwalesi sibonelo, ama-squashfs asetshenziswa futhi ku:
  • Ama-Livecds
  • Izinhlelo ezishumekiwe
  • Amaseva
  • Ngokuvamile, noma yiluphi uhlelo lokufunda kuphela

3- «Ukushintshana okuphuthumayo»

Cabanga ukuthi nganoma yisiphi isizathu (ubuthongo basebusika, ukuhlanganiswa okukhulu ...) udinga ukushintshaniswa okwengeziwe. Yilapho kufakwa khona ifayela le-loop, isinyathelo sokuqala ukwenza ifayela elingenalutho losayizi othile, ngosayizi othile webhulokhi, lokhu sikwenza ngomyalo dd:

dd if=/dev/zero of=loop bs=1M count=512

dd ezandleni ezingafanele mubi kunenkawu ephethe isibhamu. Cabanga ngaphambi kokucindezela ukungena

Kulokhu, ibhlokhi iyi-MiB eyodwa futhi usayizi wefayela ngu-512MiB. Akudingeki kube ngale ndlela.

Sakha futhi sisebenzise ukushintshaniswa ngalo myalo

mkswap loop && swapon loop

Gcina ukhumbula ukuthi ukusebenza kwefayela le-loop kuhlala kuphansi ngandlela thile kunokwenyama yangempela.

4-yenza okufunayo

Lezi ngezinye nje zezibonelo ezivelele, zizwe ukhululekile ukuzama ama-chroots, amasistimu wokubethela, izihibe ezihlanganisiwe… Amathuba akho awanamkhawulo. Kepha, qaphela imiyalo oyisebenzisayo, cabanga ngokucophelela ngaphambi kokucindezela ukungena.

Izixhumanisi zentshisekelo


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-11, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe.

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   I-illukki kusho

    Okuthunyelwe okuhle che !! Nginezipele ezinkulu laphaya futhi akukaze kwenzeke kimi ukuzicindezela. Ngizosebenzisa lokhu nangendlela engibethela ngayo eyangaphandle ukuyigcwalisa bese ngikhumbula ukuthi bengizoyibethela 🙁

  2.   si84 kusho

    Kuyathakazelisa ukuzama into ye-squashfs

  3.   UManuel R kusho

    Isifundo esihle, bengifunde ukuthi ngingawenza kanjani amafayela we-img nge-dd bese ngiwafaka, kepha bengingazi ukusetshenziswa kwamaSquashf nokucindezelwa kwawo; Yize ingavumeli ukuguqula okuqukethwe kwayo, ukusetshenziswa kwayo kungasiza ezimweni ezinjengalezo oziphawulayo. Siyabonga ngokwabelana, imikhonzo.

  4.   demo kusho

    Kuhle kakhulu ukwazi, ngiyabonga ngethiphu.

  5.   Joaquin kusho

    Uhlala ufunda okusha njalo. Kuhle kakhulu!

  6.   ingibhabhi kusho

    Kuyahlekisa, ngangazi ama-squashfs nokuthi enzelwe ini, kepha bekungakaze kwenzeke kimi ukucindezela izithombe zami. Siyabonga ngethiphu.

  7.   I-HO2Gi kusho

    Kuyathakazelisa, ukukuzama ukubona ukuthi yini ephezulu. Ithiphu enhle kakhulu

  8.   Robert kusho

    tuto omuhle kakhulu !!! =)… Ithiphu enhle kakhulu !!!

  9.   U-Phorious kusho

    Sawubona roader. I-athikili ethakazelisa kakhulu, ngiyabonga ngokwabelana.

  10.   U-Essaú kusho

    Ku-Gentoo udinga ukunika amandla ukwesekwa kwe-SquashFS ku-kernel ngaphambi kokuyihlanganisa, ngizoyihlola ukuze ngibone ukuthi isebenza kanjani. Ngiyabonga.

    1.    U-Essaú kusho

      ihlolwe ku-Gentoo uyihlanganisela i-kernel futhi ihle kakhulu.
      Vele ulungise i-typo encane, i-roader.

      Esibonelweni:

      izithombe ze-mksquashfs-2009 photos-2010 photos-2011 photos-2012 photos-2013 photos_2009-2013.sqsfs -comp xz -bs 1M

      gcina i-s ku "-bs" (enquma usayizi webhulokhi), kufanele ibukeke kanjena:

      izithombe ze-mksquashfs-2009 photos-2010 photos-2011 photos-2012 photos-2013 photos_2009-2013.sqsfs -comp xz -b 1M

i-bool(iqiniso)