LVM: Unganidza akaomarara madhiraivha sekunge aingova one chete

LVM mienzaniso yekushandisa

GNU Linux yakanyanyisa kuita basa, hapana munhu anofungidzira izvozvo. Asi pamwe vamwe vashandisi havazive zvishandiso kana mikana yazvinotipa uye izvo zvinogona kufambisa zuva redu zuva nezuva kana kuita zvisingaite zvinhu. Muchikamu chino isu tichataura nezve LVM (Logical Vhorumu Manager), chishandiso icho, kunyangwe pakutanga chisina kugadzirirwa Linux, gare gare chakaendeswa uye zvino vashandisi veLinux vanogona kunakidzwa nemikana yayo.

LVM inonzwisisika vhoriyamu maneja sezita zvarinoratidzira, pakutanga yaive cYakagadzirwa naHeinz Mauelshagen muna 1998 yeiyo HP-UX inoshanda sisitimu, HP's UNIX. Asi gare gare yaizoitwa muLinux kernel. Nayo unogona kudzora mapoka anonzwisisika, pamwe nemavhoriyamu ane musoro, kuverenga-chete mapikicha, maneja RAID, nezvimwe. Asi chinhu chinotinakidza pachikamu chino ndechekubatanidza akati wandei madhiraivha akaomarara.

LVM inogona "kuona" madhisiki mapoka uye zvikamu zvacho zvizere pachinzvimbo chekubata nzvimbo zhinji dzakazvimirira. Ndosaka tichigona kujoina akati wandei zvikamu sezvimwe, kuwedzeredza zvimwe zvikamu kune mamwe akasiyana ma disks epanyama, tamba nemadhisiki akati wandei muRAID modhi, wedzera "kupisa" kana "kupisa swap" madhiraivha akaomarara, pasina kukanganwa iyo "snapshot" basa rekugadzira backups ..

Ungaita sei izvi? Zvakanaka, chaizvo nekuda kwekubata kwematanho matatu:

  • PV (Panyama Vhoriyamu): ndiwo mavhoriyamu epanyama, ndokuti, madhiraivha akaomarara kana zvikamu zvecomputer.
  • VG (Vhoriyamu Boka): vhoriyamu boka, inzvimbo inosangana maPVs nemaVL.
  • LV (Inonzwisisika Vhoriyamu): zvine musoro mavhoriyamu kana zvishandiso uko mafaera masystem kana FS anogona kugadzirwa.

Kushanda neLVM, tinogona kushanda kubva kuchipatara nemidziyo mitatu mikuru:

  • pvcreate: Iwe unogona kugadzira mavhoriyamu epanyama nekujoinha akati wandei madhiraivha akaomarara kana zvikamu. Semuenzaniso, ngatibatanidzei chikamu / dev / sda3 uye / dev / sdb1:
pvcreate /dev/sda3 /dev/sdb1

  • vgcreate: Iwe unogona kugadzira mavhoriyamu mapoka, ndokuti, zvikamu kana disks zvepanyama ndezveboka. Semuenzaniso, kugadzira boka rakanzi "data":
vgcreate datos /dev/sdb1

  • lvcreate: inotsanangura zviyero zvine musoro zvichave mukati meboka. Semuenzaniso, fungidzira kuti iwe unoda kugadzira vhoriyamu inonzi "nyowani" mukati meboka "data" uye 8GB muhukuru:
lvcreate --name nuevo --size 8G datos

Ngatione muenzaniso unoshandaFungidzira kuti une komputa ine x GB hard drive uye iwe wafunga kuwedzera iwo masimba nekuisanganisira imwe hard drive. Muchiitiko ichocho, iyo inoshanda sisitimu inoibata sekudaro, imwe nyowani hard drive maunofanirwa kugadzira imwe kana akawanda zvikamu pairi kuti uishandise. Ndiri kuzonyanya kutaura, fungidzira kuti yako hard drive iri 120GB kutanga uye kuti iwe une akateedzana ezvikamu, kusanganisira / imba inobata 80GB yeavo 120 uye inonzi / dev / sda3, kupi / dev / sda1 iri iyo midzi yekuparadzanisa / uye / dev / sda2 iyo SWAP ...

Iye zvino unowana yako nyowani hard drive ine 500GB (/ dev / sdb1) yekuwedzera nzvimbo, asi pachinzvimbo chekugadzira imwe chikamu, iwe unoda yako / imba ive ne580GB. Izvi zvinogoneka neLVM, kugadzira / dev / sda uye / dev / sdb be inoonekwa nehurongwa hwekushandisa sechigadzirwa chimwe chete, chikamu chimwe chete chiri panyama pane maviri akaomarara madhiraivha akaomarara. Uye uku kungori kudiki mukana wevakawanda unobvumidzwa neLVM uye zvaizoitwa seizvi:

-PAMUSORO CHENYAYA, GADZIRA BHUKU KOPI YEMAHARA / HOME, SEZVO ZVICHAITWA -

sudo -i

unmount /dev/sda3

unmount /dev/sdb1

vgcreate lvm /dev/sda3 /dev/sdb1

modprobe dm-mod

lvcreate -n home -l 100% VG lvm

mkfs.ext4 /dev/lvm/home

mount /dev/lvm/home /home

Zvese zvasara kugadzirisa iyo / etc / fstab faira Saka usakwira iyo / dev / sda3 uye / dev / sdb1 pratitions pakutanga system, uchitadza izvo, mount / dev / lvm / home / home. Kana isu tikanyora zvinotevera (shandisa gedit, nano kana chero chinyorwa chinyorwa chaunoda ...):

sudo gedit /etc/fstab

Isu tinogona kuona zvirimo kuti tiigadzirise, isu tichaona kuti pane zvirevo # uye mimwe mitsara yekumisikidza izvo zvikamu zvatiri izvozvi mune yedu distro. Ive nekuchenjerera, nzvimbo hadzisi dzakajairwa nzvimbo, kana iwe wagadzirisa, shandisa TAB kuisa izvo zvirimo! Iwe uchaona kuti iwe unogona kuisa chimwe chinhu senge UUID = XXX-XXX-XXX-XXX, asi iwe unogona kutsiva iyi gibberish ye / dev / sdx pasina matambudziko ... ndiko kuti, nezita rechikamu icho sezvachiri. Kwedu isu iwe unofanirwa kubvisa (kana zvirinani pane kudzima, isa # pakutanga kwetambo kuti utaure, saka kana paine dambudziko kana ikasashanda, tinogona kugadzirisa fstab uye nekungodzima mutsara wedu mutsva tobvisa iyo # kuti idzokere ku kumisikidzwa kwekare ...iyo mitsara miviri inoenderana ne / dev / sda3 uye / dev / sdb1 uye wedzera:

/ dev / lvm / imba / imba ext4 zvisizvo 0 1

Tangazve uye ikozvino taizove ne / imba ye580GB, tichijoinha mairi maviri madhiraivha akaomarara sekunge aingova one chete. Ehezve iwe unogona kusiyanisa ma parameter sekuda kwako, shandisa zvikamu izvo zvaunoda, iyo FS yaunoda (pano tashandisa EXT4, asi iwe unogona kushandisa chero chaunoda), nezvimwe. Ndokumbirawo musiye mameseji, mibvunzo, makomendi, nezvimwe..


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Makomendi gumi, siya zvako

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako

  1.   Jorge akadaro

    Hi!
    Yakanaka kwazvo dzidziso, asi ivo vanotenda kuti ivo havataure kuti isu tinofanirwa kuita backup yemashoko, nekuti kana uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge uchinge waenda usabvisa iyo ruzivo iwe yaunotova nayo mune yekutanga / yekuparadzanisa imba kuti uwane zvakafanana mhedzisiro?

    1.    David-G akadaro

      Izvo ndezvekuti izvo zvikamu zviviri zvakamisikidzwa, saka unofanirwa kuita backup usati waenderera mberi kuti ubatane navo (ini ndinokurudzira deja-dup / sudo snap kuisa deja-dup -classic (iyi yeshanduro yakagadzikana kuburikidza nesnap) / sudo apt kuisa mashizha -dup).
      Ndinovimba zvave zvichikubatsira.

  2.   Sauro akadaro

    Pane yangu yapamberi laptop ndaive neyakaomarara dhiraivhu ine akati wandei yakaipa mativi akapararira kwese kwese. Ini ndakakamura zvakanaka nezvakaipa zvikamu (zvakatenderedza zvikamu gumi neshanu). Izvo zvikamu zvakanaka zvandakabatana seboka vhoriyamu neLVM uye pane iyo nyowani "yekuchengetera unit" ndakaisa fedora yangu pasina chikuru kunetsekana. Ndiine LVM ndakagadzira iyo hard drive kuti ishandiswe iyo neimwe nzira kuenda kunoparadza, yakandiponesa imwe pesos.

  3.   Nestor R. Arango akadaro

    Kutenda neruzivo, chimwe chinhu chandaifanirwa kuita. Ndatenda

  4.   Juan Jose Lopez Maglione akadaro

    Ndakaedza kutevera iyi dzidziso, asi ndakaona kuti LVM haichisiri kuiswa neyakagadzika paDebian 9.5.0. Uye kana iwe uchida kuisa iyo, ne [sudo apt kuisa lvm2], iyo application yakaiswa, asi kana iwe uchida kuimisa, haina kumisikidzwa. Inopa kukanganisa kunotevera:
    $ sudo service lvm2 kutanga
    Kukundikana kutanga lvm2.service: Yuniti lvm2.service yakavharwa.

  5.   iyo - mr. supporty akadaro

    Manheru akanaka.
    chinyorwa chinonakidza.
    Ndine mubvunzo, mangani madhisiki aunogona kushandisa seyuniti imwechete? ndiko kuti, kana ndiine madhisiki mana, ndinogona kujoina iyo 4 seyuniti imwechete?

    Kutenda mberi (:

    Mr. suporty

  6.   Manuel Nevado Santos akadaro

    Hi,

    Ndiri kuzogadzira desktop nyowani nyowani. Ini ndinongoda Ubuntu 18.04 seye inoshanda system. Ndiri kuzoisa Western Dhijitari Nhema SN750 NVMe 500GB SSD M.2 PCI Express 3.0, iyo inofanirwa kunge ichikurumidza. Asi zvakare, ndine pamba Samsung 860 EVO Basic SSD 500GB SATA3, iyo yandakatenga panguva iyoyo uye pakupedzisira handina kuzoshandisa, ndichifunga nezve ino nyowani desktop nguva. Ini ndoda kuwedzera zvakare. Ndakaverenga chinyorwa chako, uye ndingade, kana risiri dambudziko rakawandisa, kana ukandiudza kuti ndezvipi zvikamu zvekugadzira uye sei, kuti uwane kuita kwakanaka. Ndatenda.

  7.   Pedro akadaro

    Mhoroi, ndatenda nemupiro wako wakakosha, ini handizive zvakawanda nezve linux, ini ndangomisa sevha ine 2 980gb solid state hard drives, ndakaita zvine musoro drive, asi ini ndinoona iyo linux yakagadzira 200gb partition iyo ini ndatova kuzadza uye kwete ini ndinoziva mashandisiro enzvimbo yasara iyo inondiudza ndeye 1.7 Tb, ndinovimba unogona kundibatsira maitiro ekuishandisa uye kuti ndikwanise kuishandisa kune odhiyo, ini ndiyo yazvino webmin interface. Kwaziso.