1,磁盘物理结构及大小计算

2,分区 MBR GPT知识

3,fdisk分区 挂载 自动挂载

4,格式化文件系统

5,inode block

6,软硬链接

 

查看磁盘:

[root@moban dev]# ls sda

sda sda1 sda2 sda3

二 MBR分区机制

[svc][op]磁盘MBR分区机制- inode/Block深入实战

[svc][op]磁盘MBR分区机制- inode/Block深入实战

 

512

446

66

-----

64

 

分区模式

[svc][op]磁盘MBR分区机制- inode/Block深入实战

注意: 分区编号,1-4只能给主分区或扩展分区使用,逻辑分区是基于扩展分区来搞的,编号从5开始.

[svc][op]磁盘MBR分区机制- inode/Block深入实战

[svc][op]磁盘MBR分区机制- inode/Block深入实战

[svc][op]磁盘MBR分区机制- inode/Block深入实战

不能对已挂载的磁盘,进行操作.

只能读写数据.

如果想重新更改文件系统,--先卸载—然后修改fs

 三 mount umount

[svc][op]磁盘MBR分区机制- inode/Block深入实战

[svc][op]磁盘MBR分区机制- inode/Block深入实战

[svc][op]磁盘MBR分区机制- inode/Block深入实战

四 inode block

分区被格式化后分为两部分:

1,inode 存放文件属性(不含文件名) ,还有个指针 block存放文件内容

[root@moban ~]# ls -il 1.txt

1050322 -rw-r--r-- 1 root root 51 Mar 27 23:25 1.txt

 

2,备份inode

dd - convert and copy a file #做一个虚拟的文件系统

 

[root@moban ~]# dd if=/dev/sda of=mbr.bin bs=512 count=1

1+0 records in

1+0 records out

512 bytes (512 B) copied, 0.000364539 s, 1.4 MB/s

 

解析:

dd if=/dev/sda of=mbr.bin bs=512 count=1

if源 of目标 bs blocksize count 1个block

 

[root@moban ~]# od -xa mbr.bin

0000000 48eb 1090 d08e 00bc b8b0 0000 d88e c08e

k H dle dle so P < nul 0 8 nul nul so X so @

0000020 befb 7c00 00bf b906 0200 a4f3 21ea 0006

{ > nul | ? nul ack 9 nul stx s $ j ! ack nul

0000040 be00 07be 0438 0b75 c683 8110 fefe 7507

nul > > bel 8 eot u vt etx F dle soh ~ ~ bel u

0000060 ebf3 b416 b002 bb01 7c00 80b2 748a 0203

s k syn 4 stx 0 soh ; nul | 2 nul nl t etx stx

0000100 0080 8000 6224 0000 0800 90fa f690 80c2

nul nul nul nul $ b nul nul nul bs z dle dle v B nul

0000120 0275 80b2 59ea 007c 3100 8ec0 8ed8 bcd0

u stx 2 nul j Y | nul nul 1 @ so X so P <

0000140 2000 a0fb 7c40 ff3c 0274 c288 f652 80c2

nul sp { sp @ | < del t stx bs B R v B nul

0000160 5474 41b4 aabb cd55 5a13 7252 8149 55fb

t T 4 A ; * U M dc3 Z R r I soh { U

0000200 75aa a043 7c41 c084 0575 e183 7401 6637

* u C sp A | eot @ u enq etx a soh t 7 f

0000220 4c8b be10 7c05 44c6 01ff 8b66 441e c77c

vt L dle > enq | F D del soh f vt rs D | G

0000240 1004 c700 0244 0001 8966 085c 44c7 0006

eot dle nul G D stx soh nul f ht \ bs G D ack nul

0000260 6670 c031 4489 6604 4489 b40c cd42 7213

p f 1 @ ht D eot f ht D ff 4 B M dc3 r

0000300 bb05 7000 7deb 08b4 13cd 0a73 c2f6 0f80

enq ; nul p k } 4 bs M dc3 s nl v B nul si

0000320 f084 e900 008d 05be c67c ff44 6600 c031

eot p nul i cr nul > enq | F D del nul f 1 @

0000340 f088 6640 4489 3104 88d2 c1ca 02e2 e888

bs p @ f ht D eot 1 R bs J A b stx bs h

0000360 f488 8940 0844 c031 d088 e8c0 6602 0489

bs t @ ht D bs 1 @ bs P @ h stx f ht eot

0000400 a166 7c44 3166 66d2 34f7 5488 660a d231

f ! D | f 1 R f w 4 bs T nl f 1 R

0000420 f766 0474 5488 890b 0c44 443b 7d08 8a3c

f w t eot bs T vt ht D ff ; D bs } < nl

0000440 0d54 e2c0 8a06 0a4c c1fe d108 6c8a 5a0c

T cr @ b ack nl L nl ~ A bs Q nl l ff Z

0000460 748a bb0b 7000 c38e db31 01b8 cd02 7213

nl t vt ; nul p so C 1 [ 8 soh stx M dc3 r

0000500 8c2a 8ec3 4806 607c b91e 0100 db8e f631

* ff C so ack H | ` rs 9 nul soh so [ 1 v

0000520 ff31 f3fc 1fa5 ff61 4226 be7c 7d7f 40e8

1 del | s % us a del & B | > del } h @

0000540 eb00 be0e 7d84 38e8 eb00 be06 7d8e 30e8

nul k so > eot } h 8 nul k ack > so } h 0

0000560 be00 7d93 2ae8 eb00 47fe 5552 2042 4700

nul > dc3 } h * nul k ~ G R U B sp nul G

0000600 6f65 006d 6148 6472 4420 7369 006b 6552

e o m nul H a r d sp D i s k nul R e

0000620 6461 2000 7245 6f72 0072 01bb b400 cd0e

a d nul sp E r r o r nul ; soh nul 4 so M

0000640 ac10 003c f475 00c3 0000 0000 0000 0000

dle , < nul u t C nul nul nul nul nul nul nul nul nul

0000660 0000 0000 0000 0000 6686 0009 0000 2080

nul nul nul nul nul nul nul nul ack f ht nul nul nul nul sp

0000700 0021 9f83 1906 0800 0000 4000 0006 9f00

! nul etx us ack em nul bs nul nul nul @ ack nul nul us

0000720 1907 2a82 9c0e 4800 0006 0000 0020 2a00

bel em stx * so fs nul H ack nul nul nul sp nul nul *

0000740 9c0f fe83 ffff 4800 0026 b800 0259 0000

si fs etx ~ del del nul H & nul nul 8 Y stx nul nul

0000760 0000 0000 0000 0000 0000 0000 0000 aa55

nul nul nul nul nul nul nul nul nul nul nul nul nul nul U *
View Code

相关文章:

  • 2021-10-17
  • 2021-08-26
  • 2021-09-19
  • 2021-05-31
  • 2021-06-07
  • 2021-04-15
  • 2021-07-30
  • 2022-12-23
猜你喜欢
  • 2021-12-09
  • 2022-03-13
  • 2022-02-01
  • 2021-11-29
  • 2022-12-23
  • 2021-11-30
  • 2021-08-27
相关资源
相似解决方案