砍敺 IT_man 2017-3-21 22:08 蝺刻摩 4 u# c! \; H' o) g1 u7 A- W0 }) l
/ q' c$ d& ~! I( J. X
: http://linux.vbird.org/linux_basic/0230filesystem.php#parted http://blog.yam.com/wesley1981/article/16596463 賊隞 fstab, findfs, mount blkid
* K7 Q$ w# O; Y) dfdisk 隢 :http://blogger.gtwang.org/2012/02/linux.html* k# P( x( W8 Z& \: y2 e: ]$ p& m( S
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
' K7 B' h4 S0 V4 r, T3 F# ~) J+ Y) k4 J* { {4 A
啣蝖祉,璈芸mount(銝隞孑ount芣舀急,璈銝芸mount) :/etc/fstab 乩銝銵:
% E- \' l; `9 m/dev/sdb1 /home2 ext4 defaults 1 1# N9 I! t( b: e2 `
1 n% w$ e8 a, ]/ r* i" S) W" qparted 閰喟敦隞:https://blog.gtwang.org/linux/pa ... -disk-partitions/2/$ C/ D7 r, x8 F: P7 m+ m
2 k3 Q; J& m* [1 W Lfdisk 隞文芣舀 MBR 銝舀 GPT ,閬 GPT蝖祉雿輻 parted 游隞文脩′蝣,隞乩撠隞蝝 parted冽
; ^& \1 ?* O* b/ P% _; @1 B) d9 P5 r$ g# F, O/ S
( T; ~* E% i5 C8 E( p1 Yparted 臭誑湔亙其銵隞文撠勗莎臭撣詨末函隞歹摰撣貊函隤瘜憒銝嚗: @ t! P" l# D: n
6 N5 M& o- o" {0 K/ v4 \0 Zparted [鋆蝵孫 [隞 [窟]8 }9 n- ^) l* N0 b/ q6 x
賊賂
7 t" a. E; U, }6 G) j9 B隞文踝. L4 R8 H% ]- \
啣莎mkpart [primary|logical|extended] [ext4|vfat|xfs] 憪 蝯1 ?1 p: M# ~- q! g
憿舐內莎print5 C1 e9 P2 @. J. M+ M |
芷文莎rm [partition]+ N( q& w8 c7 B% ?5 A
靘憒:9 [) L8 N% O9 @& Y7 T, u
* n$ x5 V* Q& I寞銝:
) I5 | @) K( c- y- _/ i(parted) mkpart primary 0 100% (primary皰artition name)4 m3 v$ s$ j3 Z
9 l$ l7 _1 c2 ~' t寞鈭:5 \8 {$ i( C$ X
Partition name? []? 30T_part
! ?+ E! ^- L. f; @3 u/ d4 K: tFile system type? [ext2]? ext2 (ext4銝霅血)
) U* W" q( v5 {$ E _- AStart? 0B or 0%# P1 o+ E) T# o. K3 a5 B
End? 30TB or 100%
" w9 x6 _ M' L4 YWarning: You requested a partition from 0.00B to 30.0TB.+ f6 C; Y' Y( t, d
The closest location we can manage is 17.4kB to 30.0TB.# @2 B7 s; A% u9 N
Is this still acceptable to you?
& b3 k( Q7 i7 h# w4 ~" aYes/No? Yes
) h5 w/ N u; F, P! dWarning: The resulting partition is not properly aligned for best performance.0 l7 t b7 h$ R+ |; V
Ignore/Cancel?
" a7 I; w' p) `; H雿輻牠xt2撠曹銝餈啗郎& v: V1 }( X; Z# a
mkfs -t ext4 /dev/sdb1 ===> format
7 O3 p& u8 g! [3 ~5 d* d2 d' ^ERROR:8 z$ s4 ^, s+ w2 `
mkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits
4 d1 @4 z4 D2 E) n0 h3 l0 Z; N using a blocksize of 4096' o1 W4 r7 }* `5 s# X- D/ ]
SOL: 9 z, ^1 a* Y) }6 I6 |
format > 16TB see https://www.unix-ninja.com/p/For ... yond_the_16TB_limit9 f8 q- _" v$ r0 |( C2 v/ x
/usr/local/src/wget -Oe2fsprogs-1.42.7.tar.gz http://downloads.sourceforge.net ... _mirror=superb-dca3
: A- X* v; b8 P5 _0 I! w6 S1 d/usr/local/src/tar -zxvf e2fsprogs-1.42.7.tar.gz, t. s* d% e, H! Q0 {- G2 N
cd /usr/local/src/e2fsprogs-1.42.7
# B" T {* J& K* E. _mkdir build7 ~' E$ w6 h$ d/ b$ v4 r t
cd build
9 s+ | ^8 v" q3 E" D6 U- y# H& U ../configure
, Y" w( m- o, J/ V' x% { make- k/ e7 j) c4 A) M, w
make install% b& g/ F6 x5 \
mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb13 U0 X- K K4 y' i& V
憿舐內銝:
- `% l8 ~5 K/ H8 |4 H9 OThis filesystem will be automatically checked every 27 mounts or) L5 D7 E6 f5 P; r& J
180 days, whichever comes first. Use tune2fs -c or -i to override.
7 Z$ E' L) |( F+ K8 S2 m& U& b/etc/fstab銝剖乩 : (fstab隞蝝:http://horace1123.pixnet.net/blo ... b%E8%AA%AA%E6%98%8E)3 U% `$ O+ z4 M- A0 M$ e- L/ |% v3 @6 v
/dev/sdb1 /home2 ext4 defaults 1 0(蝚砌詨1:瘥亙隞,蝚砌詨0:蝟餌絞銝甇撣豢fsck銝瑼X)
/ g; |8 ~! O- Omount /home28 D- h, N8 C$ u5 @, u
. t+ W5 J% }: O1 e+ ~# A4 f: l
' X% W/ D, K+ E" o6 E& J=======================================================================
H7 ~( K2 F+ m2 L+ n% u' f" X8 l3 }$ `
[蝖祉皜祈岫]1.# ~: q+ J- h" c6 m& U
Linux蝖祉撖怠仿摨行葫閰衣隞:
& d+ I3 }, ]) `#time dd if=/dev/zero of=/home2/test bs=2k count=1000000 // /home2 痂ount raid0 33TB 蝖祉, 11*3TB銋SCSI蝖祉
9 |4 N& q% e5 W) z% f( [, m1000000+0 records in, a7 `" v" y+ \, ]* ] y; C
1000000+0 records out
) a* v$ s& E% N4 I2048000000 bytes (2.0 GB) copied, 3.58735 s, 571 MB/s" O$ J- O0 \! O
8 w7 D+ `8 v X) T
real 0m3.590s
8 ]* j. L/ a& @6 o7 g9 ruser 0m0.130s
) c0 o5 _6 i- E# J6 {, J% Dsys 0m3.455s2 L0 m( f" w3 S% B
% ^- d+ C: _- [3 B
0 q: ~/ }/ k2 w% X4 f# ?Linux蝖祉霈摨行葫閰衣隞:+ z! L( o! U4 a1 m4 A
#time dd if=/home2/test of=/dev/null bs=2k
6 e& H) @. h# { J$ t$ p$ r1000000+0 records in
0 l9 u3 H6 \4 p6 }/ I8 A+ }, l, r1000000+0 records out( E5 C3 M% `6 g. {
2048000000 bytes (2.0 GB) copied, 0.952334 s, 2.2 GB/s/ b* o7 L5 X3 [
+ l( j5 x9 R' D* }
real 0m0.954s. X7 ]/ l+ T' A! K, M6 `! P, T
user 0m0.083s
6 |" {3 T) _. [. b6 ~. t. Bsys 0m0.868s! k& _1 J4 t/ v0 Q- y6 Y
4 v0 f, g3 v- {, G1 @
閫嚗
, j, f0 y. q. k# \time 其閮
. f4 e4 |! u; K! g# @5 Odd 其銴鋆踝敺if OF
/ R u! x5 J8 G3 W# B9 uif=/dev/zero銝YIO嚗隞亙臭誑其皜祈岫蝝蝎孵神摨;璅 of=/dev/null 銝YIO嚗臭誑其皜祈岫蝝蝎寡摨
/ f) z5 a; ]7 r4 m+ o9 Y' @bs 舀甈⊥葫閰血桐憭批嚗count航撖怎嚗訾撠望航憭批.
) S, W% k6 y6 C9 w5 D. i$ w e# v鞈頞憭扯皞蝣綽憭皜祈岫靘撟喳潦
; }" w! h5 x, R+ R豢頞憭扯蝖殷憭甈⊥葫閰血撟喳
+ J6 D# {. S0 G1 s! |3 w望葫閰衣敺啁豢憿舐內摨衣貊嗅翰鈭
; O4 a# ~% u/ P! B4 O }7 P0 V' J4 L6 l' T* P& B- `5 o7 T
皜祈岫摰閮敺芷 /home2/test) O. A9 O" J- r. u7 C: [
2.
- w: ?, l% k' T) _4 `4 q, L虫蝔格寞:
, q) ~ }1 I" g+ x- z2 g; d
& L( x: A# F$ G; D皜祈岫蝖祉霈摨:
9 C9 M+ W2 m6 U4 Fhdparm -t /dev/sdb% t5 [$ O: q3 ?1 U1 e% \2 w; [3 k% ?
. N0 c. {3 H# u! X( M' u
/dev/sdb: (雿輻禿aid0摨血翰)& }& K* [# l) ?( b; {8 r5 X, ^1 f
Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.98 MB/sec% X0 V' I; o) r% h) T" @3 I
; g3 p7 {4 P5 x: u+ U/dev/sdb: (敺靘寞LVM摨行): R- W& K' a- ]! H. V
/dev/sdb:, B% v6 ]8 Q2 q! T: k- X2 y
Timing buffered disk reads: 546 MB in 3.01 seconds = 181.43 MB/sec* w [/ Q0 l F
皜祈岫蝖祉撖怠仿摨:4 e8 R7 \7 u! ~( a3 C9 J* ]1 a7 Y
hdparm -t --direct /dev/sdb
% i+ r6 o: Z+ [1 b
1 r" a# t+ l# ?' |% u3 M" [2 @/dev/sdb: (雿輻禿aid0摨血翰)5 v' W% O/ W& y, N6 B
Timing O_DIRECT disk reads: 1326 MB in 3.29 seconds = 402.57 MB/sec6 ?# B8 C" ^% C- J' f
% }/ D S! ?9 H3 T, D/dev/sdb: (敺靘寞LVM摨行)
6 a. \5 t5 e( G: H7 {( o Timing O_DIRECT disk reads: 560 MB in 3.00 seconds = 186.36 MB/sec
3 ?- F/ Z+ k! t" i8 y! [# [/ K. t: N/ I) s
: r& N! V; r, a$ W. p1 [: I
血皜祈岫 /dev/sda SSD蝖祉 摨血芣 raid0 scsi 蝖祉銝
0 b+ z( m, s: k0 K$ N" H
* E* W, d4 [! n) ^' g
, _* U p( p) v% U( d; b- o3 @+ Q
; M5 f$ e% T# P9 f( N7 }/ Z; W- \& f1 H0 S% R% R
6 N) P6 q, a8 m% D3 b$ h- F
$ ]8 m' N3 z. E$ D \# ? |
|