砍敺 IT_man 2017-3-21 22:08 蝺刻摩 0 G+ C+ `) h5 z' _
, \2 C. b6 c: Z' \! [6 @0 a
: http://linux.vbird.org/linux_basic/0230filesystem.php#parted http://blog.yam.com/wesley1981/article/16596463 賊隞 fstab, findfs, mount blkid
2 }+ ]: `9 S- L8 [: P7 vfdisk 隢 :http://blogger.gtwang.org/2012/02/linux.html
$ J p& i2 J# p+ @" u- x. E+ wformat 憭扳 16TB 蝖祉(>16TB銝摰閬冽迨隞) : http://www.unix-ninja.com/p/Formatting_Ext4_volumes_beyond_the_16TB_limit/http://blog.yourdream.cc/2014/11/19/morethan16t.html) d, u5 U( j2 O2 P
- P# X, \+ ?( e啣蝖祉,璈芸mount(銝隞孑ount芣舀急,璈銝芸mount) :/etc/fstab 乩銝銵:
+ W' |% ^' a' V" l9 @/dev/sdb1 /home2 ext4 defaults 1 1
' E/ R7 D+ Z/ b* C$ k* W$ Y6 P1 K( O7 P# [0 t1 f
parted 閰喟敦隞:https://blog.gtwang.org/linux/pa ... -disk-partitions/2/
) p1 ~) k4 t0 y! v, G1 h/ d3 y% ^ 8 m5 E# q9 \* }' N& J, D' O
fdisk 隞文芣舀 MBR 銝舀 GPT ,閬 GPT蝖祉雿輻 parted 游隞文脩′蝣,隞乩撠隞蝝 parted冽4 E [- C1 u* H' A
# Y( m$ I ~* H
' U+ P1 ~+ P3 F7 A' s2 qparted 臭誑湔亙其銵隞文撠勗莎臭撣詨末函隞歹摰撣貊函隤瘜憒銝嚗+ v1 ~( S% z {7 N$ @6 @8 u+ X
, G9 Y2 ]( `/ x
parted [鋆蝵孫 [隞 [窟]
( N) J8 Z! x5 _ K- K3 S$ A& @賊賂
( D8 Q* a8 Z) a$ X1 k4 x% H隞文踝. M& ]" T3 J# d% q5 b
啣莎mkpart [primary|logical|extended] [ext4|vfat|xfs] 憪 蝯* n1 A+ S: U, Z+ w0 C, R( d: [9 {
憿舐內莎print2 I3 L/ `$ J! x) _( y5 u8 Y
芷文莎rm [partition]. H2 x; i, [7 c! S9 {" b
靘憒:, _& X- B, K6 P
H4 H8 N, n/ P/ Y, R( w7 f寞銝:
. U* a% ]/ f+ T6 M(parted) mkpart primary 0 100% (primary皰artition name)
" @" l( i L- E1 { R# {6 g; P' P$ k1 g( t- d
寞鈭:
2 o3 f- {2 o, X! ]! _: [& r a% LPartition name? []? 30T_part
7 O, J5 i+ N. C9 S" n. UFile system type? [ext2]? ext2 (ext4銝霅血)
Y2 n( G- D2 m) YStart? 0B or 0%& E; G* [8 r' Y$ J2 E. Y0 e& b: l
End? 30TB or 100%/ N. Q- s0 q1 S% I$ ~* U1 U
Warning: You requested a partition from 0.00B to 30.0TB.
. [ J7 Y% Z9 v0 q+ m! [The closest location we can manage is 17.4kB to 30.0TB.
9 n) P/ k, d9 g8 [" r8 m" I/ S; [8 wIs this still acceptable to you?
6 \7 T. @! q# R) _Yes/No? Yes) n; V0 w4 j* Z: k+ Y% l: C7 _' J# k- o
Warning: The resulting partition is not properly aligned for best performance.
9 a% S* M8 B: D: O' |Ignore/Cancel?
S! D3 @# z+ \: _# f5 o$ L. v4 H雿輻牠xt2撠曹銝餈啗郎
( q# b& d/ E# m$ G7 Bmkfs -t ext4 /dev/sdb1 ===> format
* O# d+ E5 ~! N9 e; rERROR:2 q: v- ^( T/ ^% V. J
mkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits$ @5 c5 Z/ o9 C& A% s: G& H, s
using a blocksize of 4096
, u; J. [. t7 N$ ~# _8 v& rSOL:
9 \- X( j& X6 [, H0 |( Oformat > 16TB see https://www.unix-ninja.com/p/For ... yond_the_16TB_limit
- B' P8 s' C2 H/usr/local/src/wget -Oe2fsprogs-1.42.7.tar.gz http://downloads.sourceforge.net ... _mirror=superb-dca3
; ^; g& ?4 w4 P1 I/usr/local/src/tar -zxvf e2fsprogs-1.42.7.tar.gz
7 z2 C6 ~ p' xcd /usr/local/src/e2fsprogs-1.42.7
6 B8 j: p' ^5 |, H6 pmkdir build; m) X4 l5 Y# t" [4 i
cd build- r8 V& h2 E$ o% N7 [" j" x; b
../configure0 O z3 R/ |3 S
make
: C3 t% q! }/ \9 E. u9 _ make install
2 V9 N/ n, A- g8 omke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb1
* X& g& D" v0 E4 X; n1 u憿舐內銝:
7 {2 N) w* e- N% ]This filesystem will be automatically checked every 27 mounts or
6 g/ V* L+ X4 Z$ n2 w+ y; p180 days, whichever comes first. Use tune2fs -c or -i to override.3 G0 B( f1 r- m, D# S P
/etc/fstab銝剖乩 : (fstab隞蝝:http://horace1123.pixnet.net/blo ... b%E8%AA%AA%E6%98%8E)) _. a- Q3 l$ b5 ]4 U0 W/ ~" E
/dev/sdb1 /home2 ext4 defaults 1 0(蝚砌詨1:瘥亙隞,蝚砌詨0:蝟餌絞銝甇撣豢fsck銝瑼X)
1 O2 w3 _3 L) mmount /home21 X! N+ d& d* ~3 I3 W4 \4 @
+ d( {/ L3 j! w3 {" t, L7 I7 n7 K' n( z2 u% L6 K
=======================================================================* [7 a' W0 U- l9 c4 p2 P
0 m' \# H5 I J# f
[蝖祉皜祈岫]1.
- M4 z, |, D" s$ s! q/ J lLinux蝖祉撖怠仿摨行葫閰衣隞:
# T8 W! D) ~( i* `" t: r+ ^. k#time dd if=/dev/zero of=/home2/test bs=2k count=1000000 // /home2 痂ount raid0 33TB 蝖祉, 11*3TB銋SCSI蝖祉1 u7 j. @ r w: x
1000000+0 records in
% \' h; A3 f2 P6 T: ^2 s1000000+0 records out1 N7 h5 Z8 E# q" n1 c4 U/ t
2048000000 bytes (2.0 GB) copied, 3.58735 s, 571 MB/s4 d; S& M( ~2 ]/ t$ e% z
8 a8 W- Q2 _3 xreal 0m3.590s
2 {* ~" z# ?9 Y' \$ Zuser 0m0.130s
: n* f% h9 I7 s) E: Bsys 0m3.455s7 [6 A9 |# y+ A, s6 I
5 x2 x2 T8 ?, y! a1 f
. p! W" M0 ?* {' M5 |
Linux蝖祉霈摨行葫閰衣隞:( p! g5 s' e) V" w7 G
#time dd if=/home2/test of=/dev/null bs=2k7 w. a- U |7 o, @$ B
1000000+0 records in
1 a+ T% i6 j, j$ W# k0 x( D1000000+0 records out
! v- A) L& S9 p) L, Z7 Z0 p2048000000 bytes (2.0 GB) copied, 0.952334 s, 2.2 GB/s, M% p& t- ^9 y2 N& e% m, L
5 e" W: @3 |& e9 lreal 0m0.954s
$ P8 [9 { @& ^7 Quser 0m0.083s
: c8 A- y0 m7 q. {! g- B4 gsys 0m0.868s4 U% o' P8 Y( ^/ K& n
; n' w6 a1 U! k閫嚗5 W8 U: h( @6 |" j
time 其閮
# O9 H) c" ~+ P Ddd 其銴鋆踝敺if OF
+ j' r; I; \* z5 s6 Wif=/dev/zero銝YIO嚗隞亙臭誑其皜祈岫蝝蝎孵神摨;璅 of=/dev/null 銝YIO嚗臭誑其皜祈岫蝝蝎寡摨
! x4 @, }3 p) K' y4 y% S0 N: g/ q+ |3 ~bs 舀甈⊥葫閰血桐憭批嚗count航撖怎嚗訾撠望航憭批.4 L. w% _' }4 g' c, T3 `
鞈頞憭扯皞蝣綽憭皜祈岫靘撟喳潦6 |( @6 j7 B+ [% o. M
豢頞憭扯蝖殷憭甈⊥葫閰血撟喳& h u; y. p( w7 w+ Y9 s1 ?$ R* c
望葫閰衣敺啁豢憿舐內摨衣貊嗅翰鈭
% b: g0 Z, {# N$ ~, F \# i' a; X: ~( }" j5 ` s6 ^
皜祈岫摰閮敺芷 /home2/test
: {! v+ E6 r% J2.3 _; J. u L+ f1 n! \4 a# }
虫蝔格寞:3 z3 \+ a* V% B4 ]
7 ~3 D- Z C$ s/ B8 I$ U皜祈岫蝖祉霈摨:
4 R) {; S1 E j2 B4 i! {hdparm -t /dev/sdb
7 x6 y( W- Q7 D; D: k3 ^6 N
8 m" V2 ]8 B9 U, n/dev/sdb: (雿輻禿aid0摨血翰)
3 @9 s4 u$ \* u Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.98 MB/sec
# X' S/ t5 J9 ^! M9 k* z$ X6 X
2 ?# }0 u: L0 i* ?/dev/sdb: (敺靘寞LVM摨行)
- I K8 G( ]' J/dev/sdb:0 j* A. M6 b+ D' |# ?6 y0 b- S0 o. Y8 h
Timing buffered disk reads: 546 MB in 3.01 seconds = 181.43 MB/sec7 F) L1 B6 c) ~
皜祈岫蝖祉撖怠仿摨:2 k9 I9 w( Q+ U
hdparm -t --direct /dev/sdb; @; e9 u" W6 A* C4 ], G
/ R% u: E. E( t4 C. b
/dev/sdb: (雿輻禿aid0摨血翰)5 p% L& z- X3 ]% F
Timing O_DIRECT disk reads: 1326 MB in 3.29 seconds = 402.57 MB/sec
9 d- v: Z8 D/ q$ [8 O/ ]* S3 Q9 P0 a
/dev/sdb: (敺靘寞LVM摨行)
- Y8 K k& H" _! M Timing O_DIRECT disk reads: 560 MB in 3.00 seconds = 186.36 MB/sec
& p$ X/ P" z( ^3 g$ |
! j/ N. E- ~/ q6 i0 W8 |3 j
7 Z( u0 T2 c6 v5 J1 T& i血皜祈岫 /dev/sda SSD蝖祉 摨血芣 raid0 scsi 蝖祉銝
/ J% @" P: Z/ v0 a) C& b- C; w5 a
; P( M- I" w% j' X, d
: L$ D( p3 d& c. t( |( A& e' r& `! H8 \( {
! }2 W: a v2 G% h/ I3 h% p' H
+ s5 a/ r3 X O' e* G
7 ?7 G1 g" ^/ D |
|