Auto-mount bangarori tare da fstab

Wani lokaci muna buƙatar a bangare se hawa ta atomatik lokacin da ake tayar da tsarin. Hanyar madaidaiciya don magance wannan matsalar shine amfani da fayil ɗin fstab wanda yake cikin / sauransu / fstab.

Luis López na ɗaya daga cikin waɗanda suka yi nasara a gasarmu ta mako-mako: «Raba abin da ka sani game da Linux«. Taya murna Luis!

Wajibi ne a sami ɗan ma'anar wasu ma'anoni kafin a fara:

FileSystem: Duk kafofin watsa labarai na zahiri waɗanda zasu iya adana fayiloli dole ne su sami tsarin fayiloli don samun damar cika wannan aikin (misali: bangare na diski mai wuya). Tsarin fayil shine tsarin da ake amfani dashi don tsara fayiloli akan matsakaicin matsakaicin ajiya, amma muna iya ganin shi azaman matsakaicin ajiya kanta (a matakin mai amfani). Ya zama dole a fayyace cewa wannan ba ma'ana ce ta yau da kullun ba, amma zai kawo mu kusa da manufar ...

Nau'in fayiloli: Kamar yadda muka riga muka gani, tsarin fayil shine tsarin ƙungiya kuma yana da kyau cewa akwai tsarin daban daban don tsara fayiloli, kowannensu yana da fa'idodi da rashin nasara. Misali: FAT, NTFS, EXT2, EXT3, EXT4, da sauransu.

Hawan dutse: Matsayin dutsen babban fayil ne ko shugabanci. Bayan hawa tsarin fayil a cikin kundin adireshi za mu sami damar samun damar fayiloli ta hanyar shi (directory).

Zaɓuɓɓukan hawa: Suna ba ka damar tantance wasu sigogi don haka idan aka ɗora fayilolin tsarin ana yin su ta hanya ta musamman, misali: ro (karanta-kawai) wannan yana nufin cewa ba za a iya ƙirƙirar fayiloli ba, gyaggyara su ko share su a cikin wannan tsarin fayil ɗin. Wani misalin: kurakurai = remount-ro (cirewa azaman karanta-kawai) idan akwai kuskure mai tsanani, tsarin fayil ɗin yana cikin yanayin karantawa kawai.

Rage: Dump kayan aiki ne na ajiya kuma zan ambace shi saboda har yanzu ban fahimce shi sosai ba, kuma ban kuma so su zauna tsawon yini suna tunanin abin da wannan zai kasance. Lokacin da lambar da ke cikin wannan shafi 0 (sifili), juji zai yi watsi da wannan tsarin fayil ɗin.

Pass: Zamu fara da bayanin menene fschk. fschk kayan aiki ne don bincika tsarin fayiloli don kurakurai, da dai sauransu. Wannan wani shafi ne wanda kawai nake so in saka sunan shi dai dai da dalilin da ke sama. Lokacin da lambar da ke cikin wannan shafi ta kasance 0 (sifili), fschk zai yi watsi da wannan tsarin fayil ɗin.

Idan kana son ci gaba da zurfafa ilimin ka na fstab, ƙila kana sha'awar karanta waɗannan tsofaffin abubuwa daga blog.

Aiki tare da fayil din fstab

Da farko zamu ga tsarin wannan fayil ɗin:

A cikin wannan fayil ɗin, kowane layi yana nufin tsarin fayil (filesystem) kuma kowane layi yana mutunta tsarin mai zuwa:


Bari mu dubi misali:

UUID = d4f1ec7e-f3d3-4bd4-becf-4f6da208237f / ext3 kurakurai = remount-ro 0 1 / dev / sda5 / ƙararraki na gida 3
Kun riga kun lura cewa a layin farko da UUID (Unique Universal Identifier, don ƙarancinta a Turanci) na fayilolin fayiloli kuma a karo na biyu hanyar iri ɗaya (Ba ina nufin batun dutsen ba). Idan muka yi amfani da UUID, hanyarmu za ta fi ƙarfi.

Yadda ake samun UUID madaidaiciya ga kowane bangare?

Don wannan dole ne su aiwatar da tushe (ko amfani da sudo kamar yadda yake a misali) layin da ke gaba:

sudo blkid

Kuma zamu ga wani abu kamar haka:

/dev/sda1: UUID="B6F0C97EF0C94579" TYPE="ntfs"
/dev/sda5: UUID="d4f1ec7e-f3d3-4bd4-becf-4f6da208237f" TYPE="ext3"
/dev/sda6: UUID="b8146e8f-77aa-44b8-9b37-5a2a90706eea" TYPE="ext3"
/dev/sda7: UUID="57cfda85-b5ce-4288-b42e-c19dc57a65d9" TYPE="swap"/dev/sdb1: LABEL="Backup" UUID="5D9A907246C7446B" TYPE="ntfs"
Na gode Luis López!
Shin kana son shiga cikin gasar mu ta wata-wata kuma bayar da gudummawa ga al'umma?
Yakamata ku turo mana mail gami da dabaru ko karamin koyawa naka.

Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

6 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

  1.   Anonymous m

    Mutane suna magana da kansu daga motsa jiki cikin sauƙin, kuma akasin haka na iya zama da sauƙi.
    'Hoton yana da matukar damuwa ga matasa - kafin 2010, an yi hasashen kashi 22 na' yan mata
    kuma kashi 19 cikin 15 na yara maza masu shekaru daga biyu zuwa XNUMX zasu
    yi kiba, tare da 'yan mata' yan kasa da shekara 11 cikin hadari.
    Yin aiki cikin jiki na iya inganta lafiyar ƙwaƙwalwa mai kyau da kuma taimaka maka don magance damuwa, damuwa da damuwa.

    Ziyarci gidan yanar gizo na: kawai danna gidan yanar gizo mai zuwa

  2.   Pache Ko Morrison m

    kyakkyawan bayani na gode, da farko ya kasance min wuyar gane wasu hanyoyin, yanzu sauki ne, amma an bayyana shi anan sosai ..

  3.   Rariya m

    don ƙarin cikakkun bayanai tuntuɓi: https://wiki.archlinux.org/index.php/Fstab_(Espa%C3%B1ol)

  4.   lionskb4 m

    Na gode, Ban tuna yadda aka yi ba 😛

    kuma ina bukatan shi don wayata ... ba don amfani da aikace-aikace ba

  5.   Schluckauf m

    Labarin bai cika ba ... kawai yana zuwa har zuwa samo UUID 🙁

  6.   zafi m

    Kuma ... ta yaya kuke hawa rabe-raben?