x a

TEFiTo katoa

+

Wehewehenga Linux Kōpae me te Hōputu

Taumu'a o te Tuhinga:

Ka mahi tēnei tuhinga hei ārahi hoki wawahi i te puku kōpae mārō piri ki te pūnaha linux. Te whakahōputu i ngā pātaki linux, me te whakapuru i runga i te pūnaha.

Tuhipoka: kuputuhi Blue i roto i tenei tuhinga te māngai whakahau hoatu i papatohu pūnaha. Kuputuhi Orange Kei te māngai whakahau putanga. Kuputuhi Black Kei te māngai arata'iraa whānui mō whakahau me te mōhiohio e pā ana te putanga o whakahau.

OS: OS whakamahia hoki tenei tauira ko te Ubuntu12.04. Ka taea e kitea e koe i tenei e whai i whakahau.

pakiaka @ Ubuntu-12: ~ # ngeru / etc / take

Ubuntu 12.04.4 Tēneta

Hanganga Wehewehenga:

Hei tiro hanganga tataitia nāianei i runga i te pūnaha tomo e whai ake whakahau.

pakiaka @ Ubuntu-12: ~ # DF -h

Rahi Pūnahakōnae Whakamahia he pai Whakamahia% eke ia ki runga
/ dev / sda1 15G 2.4G 12G 18% /
udev 239M 4.0K 239M 1% / dev
tmpfs 99m 772K 99m 1% / rere
tetahi 5.0M 0 5.0M 0% / oma / maukati
tetahi 248M 148K 248M 1% / oma / oroōrua

Kōpae i runga i Tūmau:

Hei taki te tini o ngā kōpae e hono i runga i te pūnaha tomo e whai ake whakahau.

pakiaka @ Ubuntu-12: ~ # fdisk -l | grep ^ Kōpae

16.1 GB, 16106127360 bytes: Kōpae / dev / SDA
pūtāutu Kōpae: 0x000d2cfb

I ia ki runga ake putanga, i tēnei wā i reira he kōpae 1 anake "/ dev / SDA" piri ki tenei pūnaha.

Wawahi i te kōpae hou mā te whakamahi i whakahau fdisk

Na kua tapiritia e ahau he kōpae hou ki tenei tūmau mō te hanga tauira e te hōputu kōpae te whakamahi i fdisk.

E nehenehe tatou e taki mēnā kitea he kōpae hou te tāpiri i runga i te pūnaha mā te whakamahi i whakahau fdisk rite e whai ake nei.

pakiaka @ Ubuntu-12: ~ # fdisk -l | grep '^ Kōpae / dev'

E kore e Kōpae / dev / sdb roto i te tepu tataitia whaimana
Kōpae / dev / SDA: 16.1 GB, 16106127360 paita
Kōpae / dev / sdb: 8589 MB, 8589934592 paita

Na kei te whakaatu i te reira e kitea he kōpae hou ki te tapanga "/ dev / sdb" o 8589MB rahi i runga i te pūnaha, me te wā e kore e te reira i te tepu tataitia whai mana i roto.

Ki te wawahi i te kōpae "/ dev / sdb", tomo tēnā whakahau rite e whai ake nei:

pakiaka @ Ubuntu-12: ~ # fdisk / dev / sdb

Kei Pūrere e kore ano te tepu whaimana DOS arai, e kore te ra, SGI ranei OSF disklabel
Te paturaa i te disklabel hou DOS ki kōpae pūtāutu 0xc0074826.
ka noho Huringa roto i te mahara anake, tae noa whakatau koe ki te tuhituhi a ratou.
I muri i taua, o te akoranga, te Won ihirangi mua 'hei t whakahoki.

Whakatūpato: ka muhu 0x0000 kara o te arai tepu 4 te papaki w (rite)

Whakahaua (m no te tauturu):

Tuhia m rite wāhi a ka whiwhi koutou whakahau katoa e wātea ana i konei:

Whakahaua (m no te tauturu): m

Mahi Tono

d muku i te arai
rārangi l momo arai mohiotia
m tā tenei tahua
n tāpiri i te arai hou
o te waihanga i te DOS tepu arai hou kau
p tā te tepu tataitia
q whakatane te kore e tiaki huringa
huri t pūnaha id te arai o te
v manatoko i te tepu tataitia
w tepu Tuhituhi ki te kōpae me te putanga

Hei waihanga i tētahi arai hou i runga i kōpae hou tāpiri, whiriwhiri ahau "n" i runga whakakā e wātea ana.

Whakahaua (m no te tauturu): n

Momo Wehewehenga:

p Tuatahi (0 Tuatahi, atu 0, 4 free)
ī atu

Na ka taea e hoatu e koe rānei "p" "e" rānei e hiahia ana ki a koe ki te waihanga i tētahi arai tuatahi he arai atu ranei.

Tīpakohia (taunoa p): p
tau Wehewehenga (1-4, taunoa 1): 1
rängai Tuatahi (2048-16777215, taunoa 2048): 2048
rängai Last, + rāngai + rahi ranei {K, M, G} (2048-16777215 , taunoa 16777215): 10000

Hei tā tepu e arai ana i runga i kōpae hoatu "p" rite whakahau tāuru.

Whakahaua (m no te tauturu): p

Kōpae / dev / sdb: 8589 MB, 8589934592 bytes
255 upoko, 63 rāngai / te ara, 1044 ipurau, katoa 16777216 rāngai
Units = rāngai o 1 * 512 = 512 paita
rahi (arorau / tinana) Rängai: 512 paita / 512 paita
ahau / e te rahi (itinga / tino pai): 512 paita / 512 paita
pūtāutu Kōpae: 0xc0074826
Pūrere Whakaara Tīmata Whakamutunga Poraka Id Pūnaha
/ dev / sdb1 2048 10000 3976+ 83 Linux

Na ka hanga e ahau tetahi atu tataitia e e taupe tika hei tauira.

Whakahaua (m no te tauturu): n

Momo Wehewehenga:

p Tuatahi (1 tuatahi, atu 0, 3 free)
ī atu

Tīpakohia (taunoa p): e
tau Wehewehenga (1-4, taunoa 2): 2
rängai Tuatahi (10001-16777215, taunoa 10001): 10001
rängai Last, + rāngai ranei + rahi {K, M, G} (10001-16777215 , taunoa 16777215): 16777215

Hei tā hoatu ano te tepu tataitia "p" rite tāuru. Na ka whiwhi koutou 2 pātaki / dev / sdb1 me / dev / sdb2 i runga i kōpae.

Whakahaua (m no te tauturu): p

Kōpae / dev / sdb: 8589 MB, 8589934592 bytes
255 upoko, 63 rāngai / te ara, 1044 ipurau, katoa 16777216 rāngai
Units = rāngai o 1 * 512 = 512 paita
rahi (arorau / tinana) Rängai: 512 paita / 512 paita
ahau / e te rahi (itinga / tino pai): 512 paita / 512 paita
pūtāutu Kōpae: 0xc0074826
Pūrere Whakaara Tīmata Whakamutunga Poraka Id Pūnaha
/ dev / sdb1 2048 10000 3976+ 83 Linux
/ dev / sdb2 10001 16777215 8383607+ 5 Toronga

Na ko te wa tenei ki te e whakaae koutou ki te pātaki hanga, ka tuhituhi ratou ki kōpae (tiaki ki te kōpae).

Homai "w" rite ki te tāuru tuhituhi huringa ki te kōpae.

Whakahaua (m no te tauturu): w

Kua te tepu tataitia kua puta ke!
karangatia ioctl () ki te anō-pānui i arai tepu.
kōpae tukutahi.

Na te hanga i tētahi maunga pūwāhi (whaiaronga) ki Maunga tataitia he rite e whai ake nei.

pakiaka @ Ubuntu-12: ~ # mkdir / disk2
pakiaka @ Ubuntu-12: ~ # mkdir / disk3

Na whakahōputu kōpae kia ka roto i te reira te tahi mau pūnaha kōnae. Kua hōputu ahau ki te pūnaha kōnae ext3. Whakamahia raro whakahau.

Te whakahōputu i te kōpae:

pakiaka @ Ubuntu-12: ~ # mkfs.ext3 / dev / sdb1

mke2fs 1.42 (29-Nov-2011)
Pūnahakōnae tapanga =
momo OS: Linux
Poraka rahi = (takiuru = 0) 1024
Kongakonga rahi = 1024 (takiuru = 0)
tāwhana = 0 poraka, Tāhei whanui = 0 poraka
1000 inodes, 3976 poraka
198 poraka (4.98%) i rongoa mo te kaiwhakamahi super
poraka raraunga Tuatahi = 1
pūnaha poraka mōrahi = 4194304
rōpū 1 poraka
8192 poraka ia rōpū, 8192 whatiwhatinga ia rōpū
1000 inodes ia rōpū
Mā tepu rōpū: mahi
Writing tepu inode: mahi
Te hanga hautaka (1024 poraka): mahi
Writing superblocks me ngā mōhiohio mahi kaute pūnaha: mahi

Mea katoa e pā ana ki te mea hanga kōpae, hōputu, pūnaha kōnae he tatūnga. Na ka taea e koe Maunga tou arai ki te maunga wāhi i hanga mua. Kua whakaatu e ahau ki a koutou Maunga / dev / sdb1 arai i hanga i runga i Maunga wāhi / disk2.

Whakapuru tataitia he:

pakiaka @ Ubuntu-12: ~ # Maunga / dev / sdb1 / disk2 /

Na ka titiro ahau mo te kaupapa wehewehe o te pūnaha, me te ka kitea arai hou i roto i te reira.

pakiaka @ Ubuntu-12: ~ # DF -h

Rahi Pūnahakōnae Whakamahia he pai Whakamahia% eke ia ki runga
/ dev / sda1 15G 2.4G 12G 18% /
udev 239M 4.0K 239M 1% / dev
tmpfs 99m 780K 99m 1% / rere
tetahi 5.0M 0 5.0M 0% / oma / maukati
tetahi 248M 148K 248M 1% / oma / oroōrua
/ dev / sdb1 3.8M 1.1mi 2.6M 30% / disk2

Whakahōu / etc / kōnae fstab:

E hiahia ana ahau ki te hanga i tenei arai eke te arai tūturu o toku pūnaha. Ki te mahi i tenei i ahau ki te hanga i te urunga i roto i te pūmau te kōnae / etc / fstab. Tēnā te whai i te whakahau i raro nei, me te tāpiri i te urunga i roto i te kōnae.

pakiaka @ Ubuntu-12: ~ # vi / etc / fstab

me te tāpiri i raro aho i roto i te kōnae:

/ Dev / sdb1 / disk1 ext3 taunoa 1 2

Whakaorangia ka kati i te kōnae.

Tapaina te arai:

Ka taea e koe te tapa i te arai te whakamahi i e2label. No te tauira, ki te hiahia koe ki te tapa i te arai / pūrua hou, tomo

pakiaka @ Ubuntu-12: ~ # e2label / dev / sdb1 / backup1

Na ka taea e koe te whakamahi i tapanga "/ backup1" hea hei utu mo o "/ dev / sdb1". arā, i roto i / etc kōnae / fstab e whai ake.

Taunoa Tapanga = / backup1 / disk1 ext3 1 2

Top