砍敺 IT_man 2017-3-21 22:08 蝺刻摩
' k. W9 e6 e9 \8 w m( e+ u* x0 i% h# N. `7 V4 z5 N3 i9 Y5 S
: http://linux.vbird.org/linux_basic/0230filesystem.php#parted http://blog.yam.com/wesley1981/article/16596463 賊隞 fstab, findfs, mount blkid3 O+ W8 k3 K7 y
fdisk 隢 :http://blogger.gtwang.org/2012/02/linux.html- m( X/ C7 b3 x. X+ T
format 憭扳 16TB 蝖祉(>16TB銝摰閬冽迨隞) : http://www.unix-ninja.com/p/Formatting_Ext4_volumes_beyond_the_16TB_limit/http://blog.yourdream.cc/2014/11/19/morethan16t.html
) i/ h n8 l# ]( V0 Q* P# _/ r' l. X# P1 m' v; ^- g2 I( R& N
啣蝖祉,璈芸mount(銝隞孑ount芣舀急,璈銝芸mount) :/etc/fstab 乩銝銵:" _( y* O) q: Z) {
/dev/sdb1 /home2 ext4 defaults 1 1. `. Q1 v w: ~# c3 O
/ L5 }6 P1 V9 X I$ B8 w
parted 閰喟敦隞:https://blog.gtwang.org/linux/pa ... -disk-partitions/2/( X3 R: E: d2 y, |" U- p Y2 H& ~! J
K5 N P; N9 b( F* e& B, b$ Efdisk 隞文芣舀 MBR 銝舀 GPT ,閬 GPT蝖祉雿輻 parted 游隞文脩′蝣,隞乩撠隞蝝 parted冽/ A* \: y: G& G% Z( F
4 b) v# e1 y+ r% l: s' S+ D
( s8 Z6 B( X2 |/ v9 |) Bparted 臭誑湔亙其銵隞文撠勗莎臭撣詨末函隞歹摰撣貊函隤瘜憒銝嚗( G9 _# e' z/ ]& g& G/ G
4 O! n/ E" t* F
parted [鋆蝵孫 [隞 [窟]
0 {4 F, }. m. a8 n# M0 M賊賂& l: k* e; a7 F( V
隞文踝
7 F. [2 I7 S& K. B/ A4 U; D1 Z 啣莎mkpart [primary|logical|extended] [ext4|vfat|xfs] 憪 蝯
3 t! h0 \' u% i# J ?( V: Z 憿舐內莎print
8 X( t* |! x3 @ J. V' o0 W' \ 芷文莎rm [partition], |* E% |7 W' l1 q, g
靘憒:
/ M/ g- | \ R) R& ]
6 B# h/ z/ `6 H, }7 F( t, ~" y+ c寞銝:. i E2 u, e: e& Y6 J- U ?& ^- u
(parted) mkpart primary 0 100% (primary皰artition name)
! {& b @6 S" J# ]+ e! c
) K* F- m1 O# r( }) B寞鈭:* I! a4 X/ ]1 m6 E1 e
Partition name? []? 30T_part
* P$ T% s; m' t6 T3 T: uFile system type? [ext2]? ext2 (ext4銝霅血)
) Q$ d& q) R6 [* o& e: lStart? 0B or 0%
- k( y2 C. A4 D6 c: F, QEnd? 30TB or 100%
) y" o9 r& T- s' B @Warning: You requested a partition from 0.00B to 30.0TB.8 B: x6 l, l) A1 i2 {- ^
The closest location we can manage is 17.4kB to 30.0TB.
) Y4 y3 A* _; ~! U0 o! cIs this still acceptable to you?
! ] d- t0 r) V3 ]8 A1 U" BYes/No? Yes9 h5 R/ Q& t4 `; L
Warning: The resulting partition is not properly aligned for best performance.
: w$ Y3 d1 Z4 P* i% jIgnore/Cancel?# r0 g' H0 Y/ d& G- w
雿輻牠xt2撠曹銝餈啗郎2 G! d7 A$ E$ Q
mkfs -t ext4 /dev/sdb1 ===> format
2 r2 d3 J1 m+ c( _ERROR:$ L2 f5 V/ n; @. {5 _% _
mkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits0 C9 i1 q# Q/ Z0 W
using a blocksize of 4096
# \9 z: L7 I( r+ r4 p' BSOL:
3 s; b' A0 m$ p: m, J0 wformat > 16TB see https://www.unix-ninja.com/p/For ... yond_the_16TB_limit
6 @: \5 b! G) W- V0 e/usr/local/src/wget -Oe2fsprogs-1.42.7.tar.gz http://downloads.sourceforge.net ... _mirror=superb-dca3. q% i) Z6 E& H' `3 `: N
/usr/local/src/tar -zxvf e2fsprogs-1.42.7.tar.gz% w# p U+ m) l/ d0 N" F
cd /usr/local/src/e2fsprogs-1.42.7
+ E% M& u L+ j7 j* t+ pmkdir build
3 {5 D. m8 B: }4 k5 o, wcd build
5 E7 C' [9 w3 {3 N' Z7 |, B/ V ../configure
+ ^) U% ?5 h% I/ Q# U( r make) T3 v9 Y1 G) ~
make install
" c* j; ^4 c0 U( P. U1 C" l0 S# rmke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb1
. M/ d C; A9 d. t' s6 e1 S) Q4 y( ]憿舐內銝:
. k& O& X& Z, w% ]0 sThis filesystem will be automatically checked every 27 mounts or* G0 U# c9 ^/ k. z2 T; h( x
180 days, whichever comes first. Use tune2fs -c or -i to override.6 m& s, N7 b: {& b
/etc/fstab銝剖乩 : (fstab隞蝝:http://horace1123.pixnet.net/blo ... b%E8%AA%AA%E6%98%8E)
0 |$ U% D0 s! O* |* k1 H/dev/sdb1 /home2 ext4 defaults 1 0(蝚砌詨1:瘥亙隞,蝚砌詨0:蝟餌絞銝甇撣豢fsck銝瑼X)+ H( g1 `6 o" C( C9 |$ X p
mount /home2: Q* ]+ P5 Q# F
' M+ c5 M" Y" ~: n/ n% G) t* [
# n0 i5 G+ t, U9 o3 ]& `( S" {
======================================================================= U1 q9 K, g" A5 W0 T
$ g- Y t. g3 l9 p2 y& Q {
[蝖祉皜祈岫]1.( S, f! F" r+ |% W
Linux蝖祉撖怠仿摨行葫閰衣隞:2 m* u0 R% q y( U' Q1 S
#time dd if=/dev/zero of=/home2/test bs=2k count=1000000 // /home2 痂ount raid0 33TB 蝖祉, 11*3TB銋SCSI蝖祉8 ]8 O+ H% f1 n
1000000+0 records in
( S" u' l$ x" w1 @1000000+0 records out
+ |# V2 z; R& r+ r" V$ N2048000000 bytes (2.0 GB) copied, 3.58735 s, 571 MB/s
& k. f) s( b* Y% |, o) s1 b6 H- q; g" A
real 0m3.590s
# H( b: Y4 P! l9 H5 j1 ]user 0m0.130s9 f5 F, r! I+ U/ T G( H
sys 0m3.455s+ l# T6 T6 c, v4 X3 W
& f/ b: F; n9 O2 ^1 i2 l3 |
4 ]0 e0 K C* PLinux蝖祉霈摨行葫閰衣隞:! _3 q- g, J+ Y( u) u5 }9 u- m" O
#time dd if=/home2/test of=/dev/null bs=2k
' Q7 y: h- n6 g9 Z0 O; ]1000000+0 records in
# P8 ?! E \( |* S9 M1000000+0 records out
X9 K/ L4 K' k7 E, U/ x2048000000 bytes (2.0 GB) copied, 0.952334 s, 2.2 GB/s# p8 y" ? w* {; M, n D7 r
3 x. n* U1 x) W$ }
real 0m0.954s
1 | D2 e. m5 `# e n1 buser 0m0.083s
8 w% r5 m% W7 i7 ]( A+ l. Gsys 0m0.868s
) ?" f5 {5 W# n# V' y$ \; E9 W* v, w, {* _1 L' g1 @+ T) U
閫嚗. \( V1 F7 s' Q0 R& N. H7 a
time 其閮3 m c {( m1 O2 g
dd 其銴鋆踝敺if OF2 h9 j: I2 t6 N v% }
if=/dev/zero銝YIO嚗隞亙臭誑其皜祈岫蝝蝎孵神摨;璅 of=/dev/null 銝YIO嚗臭誑其皜祈岫蝝蝎寡摨
# ]) w8 G! |5 A. B0 G6 f: ibs 舀甈⊥葫閰血桐憭批嚗count航撖怎嚗訾撠望航憭批.
. v% e1 v- L" |0 f! s0 r鞈頞憭扯皞蝣綽憭皜祈岫靘撟喳潦
7 V, s' i7 h1 W6 f5 j; ~豢頞憭扯蝖殷憭甈⊥葫閰血撟喳. t2 }2 P9 @4 v' d9 y
望葫閰衣敺啁豢憿舐內摨衣貊嗅翰鈭
9 {7 _- ]- E' S3 y/ _( ?. w* ]) ?) f; E
皜祈岫摰閮敺芷 /home2/test. N( h, l B+ e U d6 e3 f# w' ~) Z! e! Z
2.1 Z" h, v) ~( N. C( `% a
虫蝔格寞:, f& | o' l" B. ^/ q
9 f% M$ w4 n7 M: e2 h2 l4 V9 k
皜祈岫蝖祉霈摨:
& Z3 C1 C9 y1 K5 Lhdparm -t /dev/sdb
7 Y( b) r1 r- V3 U( `! o) |- a/ p$ F, }3 t# n9 N$ z$ k
/dev/sdb: (雿輻禿aid0摨血翰); m! Q! L2 R. C; C2 k
Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.98 MB/sec1 h l8 q3 Z2 X
# w4 s! }. {: x& ^7 C! H
/dev/sdb: (敺靘寞LVM摨行); v& q% t9 S7 h8 Q" j3 ]7 l5 F
/dev/sdb:) O- V4 A' L9 Q$ j# \
Timing buffered disk reads: 546 MB in 3.01 seconds = 181.43 MB/sec
: k+ {) Y' f/ r$ q* c# ^( c皜祈岫蝖祉撖怠仿摨:
) X1 X: n2 G* ^ R" F; J( K8 E8 p- m hdparm -t --direct /dev/sdb
, F, F0 T( K9 r- y# g) L3 E
, E6 X0 R3 F, Z _! i& p9 A/dev/sdb: (雿輻禿aid0摨血翰)
2 p) l5 i/ h% d4 y Timing O_DIRECT disk reads: 1326 MB in 3.29 seconds = 402.57 MB/sec
2 q2 j) ?/ I) N, m6 G5 a r: H4 J
& Y7 ~, Q' Z; ]: F$ e) ?. O; z7 u+ y/dev/sdb: (敺靘寞LVM摨行) U- Z4 m# [# g9 p8 F- Y
Timing O_DIRECT disk reads: 560 MB in 3.00 seconds = 186.36 MB/sec+ x8 R& q0 ], T1 M
! G: g. t+ v0 X
' q' j7 n1 ~9 L血皜祈岫 /dev/sda SSD蝖祉 摨血芣 raid0 scsi 蝖祉銝
1 R( j. `& L/ `7 N; ? R4 ]' J5 {9 ^' S
/ x) ?. V/ R: ?3 l- i+ X) Y7 `. u: c j* Q& b
2 @1 F2 T b: e/ \$ S! O
6 c4 ]- }- {2 V- ]! H/ {- w! w4 k& |* o6 V8 ~5 s' L
|
|