砍敺 IT_man 2017-3-21 22:08 蝺刻摩 % m- w' Z2 A& D' C' S! h
& g E! Z P1 j( H9 V) j- @6 O5 ^
: http://linux.vbird.org/linux_basic/0230filesystem.php#parted http://blog.yam.com/wesley1981/article/16596463 賊隞 fstab, findfs, mount blkid
# Y& [1 x/ U. x" _# X6 ?fdisk 隢 :http://blogger.gtwang.org/2012/02/linux.html
1 e! R B9 x% Pformat 憭扳 16TB 蝖祉(>16TB銝摰閬冽迨隞) : http://www.unix-ninja.com/p/Formatting_Ext4_volumes_beyond_the_16TB_limit/http://blog.yourdream.cc/2014/11/19/morethan16t.html4 m6 i/ E, r+ ]* b" b* R1 o) k3 S
9 Q6 o, T: b/ q! R啣蝖祉,璈芸mount(銝隞孑ount芣舀急,璈銝芸mount) :/etc/fstab 乩銝銵:% e: y* U" [8 m! M' E( [1 G
/dev/sdb1 /home2 ext4 defaults 1 18 G- [1 h- j/ `
3 P9 P3 T& x/ U* c. y
parted 閰喟敦隞:https://blog.gtwang.org/linux/pa ... -disk-partitions/2/
) A1 ^. u3 Z+ ]# i+ F
: W' y) [. G; v9 vfdisk 隞文芣舀 MBR 銝舀 GPT ,閬 GPT蝖祉雿輻 parted 游隞文脩′蝣,隞乩撠隞蝝 parted冽
1 I2 X" D- S2 }( M' I
* Z. |! C; L; n ^" V4 e( \
; w, `& I) Y4 Y8 D( iparted 臭誑湔亙其銵隞文撠勗莎臭撣詨末函隞歹摰撣貊函隤瘜憒銝嚗
4 u2 W4 @8 Z3 i9 l- Y0 a$ c7 v
parted [鋆蝵孫 [隞 [窟]
2 u% A. b! `. S0 q. z! f7 a) t賊賂
/ m: V2 w- o. g7 t% k隞文踝2 H3 b% c) R% I# ]& F
啣莎mkpart [primary|logical|extended] [ext4|vfat|xfs] 憪 蝯
) x5 ]" t' I& `8 W0 Y( R 憿舐內莎print. w$ H1 W6 U! K+ ?) _# Y# V% H3 A
芷文莎rm [partition]$ ]$ a A$ J1 q5 y/ D
靘憒:
2 K6 f4 a; ?" `# A6 m. \. x& Q2 S. R/ R
寞銝:
% p X% k5 Z6 N3 I* y(parted) mkpart primary 0 100% (primary皰artition name)" `8 e. Y5 U0 |8 K& O" ^
, }% F. i+ M& z- Q) X6 [" N寞鈭:
! @9 L5 [5 _9 E' V: qPartition name? []? 30T_part
# a+ ]: I2 X! u' j, O- `# e) r; wFile system type? [ext2]? ext2 (ext4銝霅血)
0 S) f) A! }) y* e: Y3 L/ nStart? 0B or 0%0 p1 _7 F+ Q. V/ Q/ p* V
End? 30TB or 100%& m) l6 q# o4 \/ {& b# ?7 t7 _4 d
Warning: You requested a partition from 0.00B to 30.0TB.9 a6 B* w0 V8 M8 o) k& G, [. u
The closest location we can manage is 17.4kB to 30.0TB.& k' e; o* z- Y. S
Is this still acceptable to you?
) v" |1 C% {3 z( tYes/No? Yes# c0 x7 [! C5 d. ^
Warning: The resulting partition is not properly aligned for best performance.
; I% |6 x0 t4 Y; Y% I9 oIgnore/Cancel?
9 P5 Q* Z( C) X( K: O& G雿輻牠xt2撠曹銝餈啗郎
( V! M+ x1 {! g& X/ x- A7 imkfs -t ext4 /dev/sdb1 ===> format/ c6 d$ y9 ?- D9 P3 q
ERROR:9 ^1 x0 I8 s3 _' t, O% y# ]
mkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits
3 b' z4 a4 T- _( F using a blocksize of 4096
; C$ ^8 {; g7 b4 KSOL: / x% \! U& |; B( K. y
format > 16TB see https://www.unix-ninja.com/p/For ... yond_the_16TB_limit
6 g: O& X9 z: T/usr/local/src/wget -Oe2fsprogs-1.42.7.tar.gz http://downloads.sourceforge.net ... _mirror=superb-dca3
' ^1 H3 i( F. Y/usr/local/src/tar -zxvf e2fsprogs-1.42.7.tar.gz$ |5 T8 D5 Z8 E' f- S
cd /usr/local/src/e2fsprogs-1.42.7
: P6 q M5 L% @0 E- }2 Ymkdir build
; y* w( D4 C) X) I& v8 @* R/ y ncd build
) X0 y1 r9 E7 P0 y5 o( Q ../configure: D5 k5 S5 |7 V
make* M- E0 M, u9 c
make install7 j$ P9 K/ c+ O, U! c! B3 Q0 y
mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb1
! ^ O5 C" O& Z憿舐內銝:6 l" _- q! o. d' X/ \/ @/ b
This filesystem will be automatically checked every 27 mounts or
7 m' t/ |2 k3 V- B180 days, whichever comes first. Use tune2fs -c or -i to override.
& P n5 q7 h4 N* Y% K/etc/fstab銝剖乩 : (fstab隞蝝:http://horace1123.pixnet.net/blo ... b%E8%AA%AA%E6%98%8E)
( I" e2 e; C' v- v6 J8 d/ J9 o; O/dev/sdb1 /home2 ext4 defaults 1 0(蝚砌詨1:瘥亙隞,蝚砌詨0:蝟餌絞銝甇撣豢fsck銝瑼X)
+ u" X/ c3 a7 |( Q2 |2 ]: h# pmount /home2
3 U I0 e( r/ k$ d6 E# y7 T) m0 v+ L/ g: y
/ l1 R2 O& d' I# z
=======================================================================& V* |# _6 l4 s0 s5 m
& w& n4 s' C/ g% W9 A# }# r& A% N7 \
[蝖祉皜祈岫]1. |( ^% W. a: Z/ ~1 I
Linux蝖祉撖怠仿摨行葫閰衣隞:
* a, k& M/ v2 w#time dd if=/dev/zero of=/home2/test bs=2k count=1000000 // /home2 痂ount raid0 33TB 蝖祉, 11*3TB銋SCSI蝖祉 \4 K/ M% c( H6 M5 T; ]
1000000+0 records in
! r6 @% f( f5 m& p4 e7 i1000000+0 records out
" M W9 i4 u) k2048000000 bytes (2.0 GB) copied, 3.58735 s, 571 MB/s. A. F, l4 {5 p3 c
0 K( D" J" i7 a7 W) {% ^real 0m3.590s2 V8 D% ^9 c7 w( p' R9 L
user 0m0.130s# f) n- y" p2 P- D" S r9 Q
sys 0m3.455s6 i- w. r& B1 y% J$ O$ I. ^' `
7 O7 ^) V/ Y7 X, a3 n1 k
b4 h/ z3 \7 ?) w: k8 HLinux蝖祉霈摨行葫閰衣隞:% k2 D5 W {7 |
#time dd if=/home2/test of=/dev/null bs=2k8 J' e* J; g8 ~: x$ {% Y/ Z \$ J
1000000+0 records in& Q6 \/ Q. {+ A9 G5 F
1000000+0 records out
" t) J1 }. j+ Z, B& |2 A2048000000 bytes (2.0 GB) copied, 0.952334 s, 2.2 GB/s) j+ E' L' j) X8 D
3 r8 j/ z3 z% @- k; \7 rreal 0m0.954s" t# O5 K! x& x" j" }
user 0m0.083s0 m/ O" w- I8 y$ n7 L* u2 [
sys 0m0.868s, L; ^1 y+ S: m1 U+ Q1 `4 t
K1 V+ y T; {; u8 `1 z
閫嚗, _) ~5 v, G2 W
time 其閮 f' f" ^- r- H. C
dd 其銴鋆踝敺if OF
( S4 o+ V6 M7 i7 l) |0 q" Y( M) yif=/dev/zero銝YIO嚗隞亙臭誑其皜祈岫蝝蝎孵神摨;璅 of=/dev/null 銝YIO嚗臭誑其皜祈岫蝝蝎寡摨
" I) q' M! e5 u. k$ j* h; c( D; {bs 舀甈⊥葫閰血桐憭批嚗count航撖怎嚗訾撠望航憭批.! C& j! \* b5 q" @
鞈頞憭扯皞蝣綽憭皜祈岫靘撟喳潦* z( t: r& C: K, L6 r
豢頞憭扯蝖殷憭甈⊥葫閰血撟喳
$ w- G+ e0 Z) d$ D% V2 M望葫閰衣敺啁豢憿舐內摨衣貊嗅翰鈭/ ]) H0 C8 t# l
4 }6 G! Z3 e' W$ h2 p" l
皜祈岫摰閮敺芷 /home2/test2 {% N# j! {" z) T
2.
9 y+ S" V5 m0 L1 d2 s1 q虫蝔格寞:4 }9 r/ d' x* j& k6 i& }$ K8 c
7 x+ |% h9 q, f3 Q0 w+ ?8 H3 L
皜祈岫蝖祉霈摨:5 A; B, M7 i0 W4 c: p
hdparm -t /dev/sdb; [ |1 a, x4 C. d- N
3 r' ?7 w5 i5 \( H( `/ ?7 n/dev/sdb: (雿輻禿aid0摨血翰)
4 i6 [! s9 B [* h- P Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.98 MB/sec
8 s$ M _# K* O$ l3 T8 T* a
7 D: ~) @1 H5 l0 \# O/dev/sdb: (敺靘寞LVM摨行)$ I) B% y3 n; P0 M7 d
/dev/sdb:5 P- v3 _: m6 s. `5 p
Timing buffered disk reads: 546 MB in 3.01 seconds = 181.43 MB/sec
/ u$ }" [! Q1 ]" `% H4 n皜祈岫蝖祉撖怠仿摨:2 }! G, }: T# @% a* B$ w
hdparm -t --direct /dev/sdb, \! `: J* \) J/ w0 l$ E' h
: t, b0 I: e+ a$ g/dev/sdb: (雿輻禿aid0摨血翰)3 G* c9 T0 d1 `& G
Timing O_DIRECT disk reads: 1326 MB in 3.29 seconds = 402.57 MB/sec. s- R! D* d$ m' ~
8 s6 v, y: C0 u* w
/dev/sdb: (敺靘寞LVM摨行)8 b4 l/ V+ N3 A
Timing O_DIRECT disk reads: 560 MB in 3.00 seconds = 186.36 MB/sec. u. f! V" _ o2 w% N
6 l* `$ _8 n, c' D* k
; m. u$ T" U% y' N" |3 g9 t3 F
血皜祈岫 /dev/sda SSD蝖祉 摨血芣 raid0 scsi 蝖祉銝. z( r' V# x$ G) ?% O
1 a* W( x( w5 J! j+ ]* a
: h1 v( y5 c* }9 u+ K' e$ z
# o4 m+ f8 g1 J: i& I! v
, P# v- h! D' n; B
/ N( {7 E+ Y1 ?) O
. A. ~ C4 O/ E c |
|