m

Duk batutuwa

+

Linux Disk bangare kuma Format

Dalilin da Document:

Wannan daftarin aiki za su bauta wa shiryar ga partitioning wuya faifai drive a haɗe zuwa wani Linux tsarin. Tsara Linux partitions da hawa a kan tsarin.

Note: Blue rubutu a cikin wannan daftarin aiki ne wakiltar dokokin da aka ba a tsarin na'ura wasan bidiyo. Orange rubutu ne wakiltar dokokin fitarwa. Black rubutu ne wakiltar general shiriya ga dokokin da bayani game da fitarwa daga dokokin.

OS: OS amfani da wannan misali ne Ubuntu12.04. Za ka iya samun wannan ta bin umurnin.

tushen @ Ubuntu-12: ~ # cat / sauransu / batun

Ubuntu 12.04.4 LTS

Tsarin bangare:

Don duba halin yanzu bangare tsarin a kan tsarin shigar da bin umurnin.

tushen @ Ubuntu-12: ~ # DF -H

Filesystem Size Used wadãtar Amfani% saka a
/ Aman / sda1 15G 2.4G 12G 18% /
udev 239M 4.0K 239M 1% / Aman
tmpfs 99M 772K 99M 1% / gudu
babu wani 5.0M 0 0% 5.0M / gudu / kulle
babu wani 248M 148K 248M 1% / gudu / shm

Faifai a kan Server:

Don duba da yawa DISKs suna da alaka a kan tsarin ku shiga bin umurnin.

tushen @ Ubuntu-12: ~ # fdisk -L | grep ^ Disk

Faifai / Aman / sda: 16.1 GB, 16106127360 bytes
faifai ganowa: 0x000d2cfb

Kamar yadda ta sama fitarwa, a halin yanzu akwai kawai 1 faifai "/ Aman / sda" a haɗe zuwa wannan tsarin.

Bangare da sabon faifai ta yin amfani da umurnin fdisk

Yanzu na kara wani sabon faifai da wannan uwar garke domin yin labari na faifai Tsarin amfani da fdisk.

Za mu iya duba ko da wani sabon faifai kara da cewa an gano a tsarin ta amfani da fdisk umurnin kamar wadannan.

tushen @ Ubuntu-12: ~ # fdisk -L | grep '^ Disk / Aman'

Faifai / Aman / sdb ba ya dauke da mai aiki bangare tebur
faifai / Aman / sda: 16.1 GB, 16106127360 bytes
faifai / Aman / sdb: 8589 MB, 8589934592 bytes

Yanzu an nuna cewa wani sabon faifai da lakabin "/ Aman / sdb" na size 8589MB aka gano a tsarin da a halin yanzu shi ba ya dauke da mai aiki bangare tebur.

Don bangare da faifai "/ Aman / sdb", don Allah shiga umurnin kamar haka:

tushen @ Ubuntu-12: ~ # fdisk / Aman / sdb

Na'ura yana dauke da bã mai aiki DOS bangare tebur, kuma bã Sun, SGI ko OSF disklabel
Gina sabon DOS disklabel da faifai ganowa 0xc0074826.
Canje-canje zai zauna a ƙwaƙwalwar kawai, har ka shawarta zaka rubuta su.
Bayan haka, ba shakka, baya abun ciki Won 't zama recoverable.

Gargaɗi: nakasasshe flag 0x0000 na bangare tebur 4 za a gyara ta hanyar w (yanka)

UmurninSa (m taimako):

Rubuta m kamar yadda labari kuma za ka samu duk samuwa dokokin nan:

UmurninSa (m taimako): m

UmurninSa mataki

d share bangare
l jerin san bangare daban
m Buga wannan menu
n ƙara sabon bangare
o ƙirƙirar sabuwar komai DOS bangare tebur
p Buga bangare tebur
q sallama ba tare da ceton canje-canje
t canja wani bangare na tsarin id
v tabbatar da bangare tebur
w rubuta tebur to faifai da fita

Don ƙirƙirar sabon bangare a kan sabon kara da cewa faifai, na zabi "n" daga sama samuwa sauya.

UmurninSa (m taimako): n

Shãmaki irin:

p firamare (0 firamare, 0 mika, 4 free)
e mika

Yanzu za ka iya ba ko dai "p" ko "e" dangane gare ka ke so ka ƙirƙiri wani bangare na farko ko kuma wani bangare mika.

Zaži (tsoho p): p
bangare lamba (1-4, tsoho 1): 1
Na farko kansu (2048-16777215, tsoho 2048): 2048
Last kansu, + sassa ko + size {K, M, G} (2048-16777215 , tsoho 16777215): 10000

Don fitar da bangare Tables a faifai ba "p" kamar yadda labari umurnin.

UmurninSa (m taimako): p

Faifai / Aman / sdb: 8589 MB, 8589934592 bytes
255 kawunansu, 63 sassa / waƙa, 1044 cylinders, jimlar 16777216 sassa
raka'a = sassa na 1 * 512 = 512 bytes
Kansu size (ma'ana / jiki): 512 bytes / 512 bytes
I / Ya size (m / mafi kyau duka): 512 bytes / 512 bytes
Disk ganowa: 0xc0074826
Na'ura Boot Fara End Tubalan Id System
/ Aman / sdb1 2048 10000 3976+ 83 Linux

Yanzu zan halitta wata bangare wanda za a mika kawai misali.

UmurninSa (m taimako): n

Shãmaki irin:

p farko (1 firamare, 0 mika, 3 free)
e mika

Zaži (tsoho p): e
bangare lamba (1-4, tsoho 2): 2
Na farko kansu (10001-16777215, tsoho 10001): 10001
Last kansu, + sassa ko + size {K, M, G} (10001-16777215 , tsoho 16777215): 16777215

Don fitar da bangare tebur sake ba "p" kamar yadda labari. Yanzu za ka samu 2 partitions / Aman / sdb1 da / Aman / sdb2 a faifai.

UmurninSa (m taimako): p

Faifai / Aman / sdb: 8589 MB, 8589934592 bytes
255 kawunansu, 63 sassa / waƙa, 1044 cylinders, jimlar 16777216 sassa
raka'a = sassa na 1 * 512 = 512 bytes
Kansu size (ma'ana / jiki): 512 bytes / 512 bytes
I / Ya size (m / mafi kyau duka): 512 bytes / 512 bytes
Disk ganowa: 0xc0074826
Na'ura Boot Fara End Tubalan Id System
/ Aman / sdb1 2048 10000 3976+ 83 Linux
/ Aman / sdb2 10001 16777215 8383607+ 5 Extended

Yanzu wannan wata lokaci idan an yarda da partitions halitta, sa'an nan kuma rubuta su zuwa faifai (cece su faifai).

Ka ba "w" kamar yadda labari rubuta canje-canje ga faifai.

UmurninSa (m taimako): w

A bangare tebur na yanzu bata!
Kira ioctl () a sake karanta bangare tebur.
Ana daidaita aiki DISKs.

Yanzu ƙirƙirar Dutsen batu (directory) zuwa Dutsen wani bangare kamar yadda wadannan.

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

Yanzu Bayani faifai saboda haka zai dauke da wasu fayil da tsarin. Ina tsara tare da ext3 fayil tsarin. Yi amfani a kasa umurnin.

Tsara wani Disk:

tushen @ Ubuntu-12: ~ # mkfs.ext3 / Aman / sdb1

mke2fs 1.42 (29-Nov-2011)
Filesystem lakabin =
OS irin: Linux
Block size = 1024 (shiga = 0)
guntu size = 1024 (shiga = 0)
stride = 0 tubalan, stripe nisa = 0 tubalan
1000 inodes, 3976 tubalan
198 tubalan (4.98%) tanada cikin super mai amfani
Na farko data block = 1
Maximum filesystem tubalan = 4194304
1 block kungiyar
8192 tubalan da kungiyar, 8192, niƙaƙƙun gaɓãɓuwa ​​da kungiyar
1000 inodes da kungiyar
allocating kungiyar Tables: aikata
ake rubuta inode Tables: yi
Samar da mujallar (1024 tubalan): aikata
ake rubuta superblocks da filesystem lissafin bayanai: yi

Duk abin da game da wani faifai halitta, Tsarin, fayil tsarin shi ne saitin. Yanzu za ka iya Dutsen ka bangare zuwa wani Dutsen batu halitta a baya. Ina nuna muku zuwa Dutsen / Aman / sdb1 bangare halitta a kan Dutsen batu / disk2.

Hawa wani shãmaki:

tushen @ Ubuntu-12: ~ # Dutsen / Aman / sdb1 / disk2 /

Yanzu zan nemi wani bangare makirci na tsarin da za ka ga sabon bangare da shi.

tushen @ Ubuntu-12: ~ # DF -H

Filesystem Size Used wadãtar Amfani% saka a
/ Aman / sda1 15G 2.4G 12G 18% /
udev 239M 4.0K 239M 1% / Aman
tmpfs 99M 780K 99M 1% / gudu
babu wani 5.0M 0 0% 5.0M / gudu / kulle
babu wani 248M 148K 248M 1% / gudu / shm
/ Aman / sdb1 3.8M 1.1M 2.6M 30% / disk2

Ta karshe / sauransu / fstab fayil:

Ina so in yi wannan saka bangare na dindindin bangare na tsarin. Don yin wannan Ina da yin m shigarwa cikin fayil / sauransu / fstab. Don Allah bi umurnin a kasa da kuma kara shigarwa a fayil.

tushen @ Ubuntu-12: ~ # vi / sauransu / fstab

kuma ƙara a kasa line a file:

/ Aman / sdb1 / disk1 ext3 Predefinicións 1 2

Ajiye da kuma rufe fayil.

Label bangare:

Za ka iya lalata bangare ta yin amfani da e2label. Alal misali, idan kana so ka lalata da sabon bangare / madadin, shiga

tushen @ Ubuntu-12: ~ # e2label / Aman / sdb1 / backup1

Yanzu za ka iya amfani da lakabin "/ backup1" ko ina a maimakon "/ Aman / sdb1". watau a / sauransu / fstab fayil kamar haka.

Lakabin = / backup1 / disk1 ext3 Predefinicións 1 2

Top