砍敺 IT_man 2017-3-21 22:08 蝺刻摩 ) _4 ^$ U4 G4 d6 {' ~
6 u; f5 K% [- C
: http://linux.vbird.org/linux_basic/0230filesystem.php#parted http://blog.yam.com/wesley1981/article/16596463 賊隞 fstab, findfs, mount blkid
, \9 G' O4 m4 t$ {, Tfdisk 隢 :http://blogger.gtwang.org/2012/02/linux.html0 p: g8 ?, H, e1 {+ {1 x) ?
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
# f; F2 W2 x2 V/ F; h8 D( X8 {; Y2 i$ B. _/ A
啣蝖祉,璈芸mount(銝隞孑ount芣舀急,璈銝芸mount) :/etc/fstab 乩銝銵:! a! r; b1 _/ L* f1 i
/dev/sdb1 /home2 ext4 defaults 1 1
8 J: M. P3 v# m. Z. j9 M2 F7 o% R' D/ b: m+ J' {) A% N
parted 閰喟敦隞:https://blog.gtwang.org/linux/pa ... -disk-partitions/2/# U, f0 x7 p) x- @/ R, n3 B
# C- v1 |& p0 @
fdisk 隞文芣舀 MBR 銝舀 GPT ,閬 GPT蝖祉雿輻 parted 游隞文脩′蝣,隞乩撠隞蝝 parted冽' |- Z w3 Q( D0 E
( e2 ^3 Y$ H. }3 Z
% R' L2 [4 ?, a5 q" c' L* m$ P5 aparted 臭誑湔亙其銵隞文撠勗莎臭撣詨末函隞歹摰撣貊函隤瘜憒銝嚗
: I# W1 T. g1 A# w* d4 Q) K5 j* ^: R$ z [+ H7 H- l' s7 r* s% K
parted [鋆蝵孫 [隞 [窟]) ]2 I" c2 k- {# x
賊賂- B& e+ G( c+ U( X9 V; [4 X
隞文踝
6 K& A/ q7 T8 a+ S8 r+ b8 n 啣莎mkpart [primary|logical|extended] [ext4|vfat|xfs] 憪 蝯
- O$ d9 r% u. `! a- l- S 憿舐內莎print1 q7 M! [ O. v' g
芷文莎rm [partition]8 r. Z% O U' ]
靘憒:
' ]& j9 }2 E. k$ d! \. d% x3 G& a5 X9 N
寞銝:4 B- I4 V+ X' c; [% r, O4 a5 y
(parted) mkpart primary 0 100% (primary皰artition name)
% q/ J; l$ k* a/ M: z: ?& ^; Z& z- ?; C3 O2 L. J
寞鈭:
7 T$ t- ~& ]9 U/ {; h% U9 H3 D) }Partition name? []? 30T_part3 F6 H! m- m3 |$ \/ B6 \
File system type? [ext2]? ext2 (ext4銝霅血)* X5 L5 J& h6 ^( r
Start? 0B or 0%
: D4 [4 ~( `& ^# f- Y; D* gEnd? 30TB or 100%/ j+ }1 |5 a! L, f i T
Warning: You requested a partition from 0.00B to 30.0TB./ a8 R! |3 H' `- \5 u
The closest location we can manage is 17.4kB to 30.0TB.
% h3 z1 B; D* J: _# w$ Z$ {Is this still acceptable to you?
. T8 f: _# t% _6 S! p, lYes/No? Yes2 W9 r3 \6 d. Y* e
Warning: The resulting partition is not properly aligned for best performance.4 q4 ^& y: }5 w |
Ignore/Cancel?
; D( w! G5 e! U- v" ?雿輻牠xt2撠曹銝餈啗郎, N% ^0 E% S& L9 c/ [7 S
mkfs -t ext4 /dev/sdb1 ===> format
9 W4 L# C9 R EERROR:
e6 z( Z" d( K$ z! Umkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits; x7 g% y4 I6 y/ K
using a blocksize of 4096' ]0 D0 u7 m8 j* M
SOL:
( f( M- `2 _' o+ H iformat > 16TB see https://www.unix-ninja.com/p/For ... yond_the_16TB_limit) T2 j9 M' m. t$ U5 k
/usr/local/src/wget -Oe2fsprogs-1.42.7.tar.gz http://downloads.sourceforge.net ... _mirror=superb-dca3
* y- P9 f' f' {- Y& t; Z/usr/local/src/tar -zxvf e2fsprogs-1.42.7.tar.gz: x) e2 t2 c+ W/ z j5 x c
cd /usr/local/src/e2fsprogs-1.42.7
$ c. W( B/ X+ T& w ^mkdir build
! e* w. @+ E6 V0 T9 m4 Ncd build. W! g8 M# U4 Y+ l
../configure
4 B" X: P" h7 b4 o, @. ^2 X# H" ~- ^ make
4 n9 k- w5 w( o make install k' @ ^0 Z3 N/ i/ @
mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb19 S8 y q) |9 R. F
憿舐內銝:$ Z2 E# R1 v' i' Y- O3 j! e2 v
This filesystem will be automatically checked every 27 mounts or, c' o: y$ Z5 ]' o
180 days, whichever comes first. Use tune2fs -c or -i to override.
2 p5 B' z# G5 k1 k i2 J/etc/fstab銝剖乩 : (fstab隞蝝:http://horace1123.pixnet.net/blo ... b%E8%AA%AA%E6%98%8E)+ t; H$ `( B: b! L- o4 c+ e
/dev/sdb1 /home2 ext4 defaults 1 0(蝚砌詨1:瘥亙隞,蝚砌詨0:蝟餌絞銝甇撣豢fsck銝瑼X). g$ [/ L4 q5 ~3 }4 z1 y
mount /home27 V$ w( }" u& |" p, Q7 m
, ^9 t7 {& S% a- A; ~* b) x" M2 ^3 X C- s! ], ?
=======================================================================
! r8 a8 E) E" t7 F
i) ?7 r( j4 v[蝖祉皜祈岫]1.- i- G. v+ L6 k; I, y; w
Linux蝖祉撖怠仿摨行葫閰衣隞:
" K( x5 G* v+ f! K4 I2 o" I#time dd if=/dev/zero of=/home2/test bs=2k count=1000000 // /home2 痂ount raid0 33TB 蝖祉, 11*3TB銋SCSI蝖祉4 m7 P" K5 @1 d; m
1000000+0 records in
; `* ]* z5 _0 p1 u1 {9 F& G1000000+0 records out
3 `9 ^( k9 ]' w! S$ K, n4 q2048000000 bytes (2.0 GB) copied, 3.58735 s, 571 MB/s
- _, L' v- S; V9 q- z# c1 s5 a' t+ y: o* P, O4 ~4 G3 m9 V
real 0m3.590s
4 K5 x8 o; K; N' L! w" D/ N; D3 auser 0m0.130s" L/ e1 T3 l& h: Y& w
sys 0m3.455s. U% l2 S+ t, l/ f! o: k
+ f, |+ G0 P0 y3 q, g% |
8 E# d$ e' v+ R: m
Linux蝖祉霈摨行葫閰衣隞:
; T6 v+ I9 O; E7 c#time dd if=/home2/test of=/dev/null bs=2k4 F3 W9 U- b3 s E
1000000+0 records in! v- I7 G' t1 @2 [8 C6 P
1000000+0 records out
' ~9 A0 ~( C7 Q: O4 Z( T2048000000 bytes (2.0 GB) copied, 0.952334 s, 2.2 GB/s2 g+ O8 v5 A! _/ k! j1 d
8 v+ I3 v2 E- j+ G& Y- |" q/ [, Ireal 0m0.954s- X2 w, f0 y- _& d
user 0m0.083s8 a& C( \0 S% _8 q. s
sys 0m0.868s" k! |- v. P h. h
' ^% q$ { y4 D( d9 ?, S- E1 ^
閫嚗
1 T; c) `$ R: G, J2 z% ?% U- ctime 其閮
) }8 L3 B9 ^; [( Y6 z1 q e/ ~dd 其銴鋆踝敺if OF# Y. |# r; n" A
if=/dev/zero銝YIO嚗隞亙臭誑其皜祈岫蝝蝎孵神摨;璅 of=/dev/null 銝YIO嚗臭誑其皜祈岫蝝蝎寡摨
! O1 f5 M5 O) Z% Tbs 舀甈⊥葫閰血桐憭批嚗count航撖怎嚗訾撠望航憭批./ Q4 A! `( P9 i
鞈頞憭扯皞蝣綽憭皜祈岫靘撟喳潦
: ~% H p# \0 C+ G) C& s$ s' V豢頞憭扯蝖殷憭甈⊥葫閰血撟喳
$ M& Y$ M$ _# A$ a望葫閰衣敺啁豢憿舐內摨衣貊嗅翰鈭( g& c+ b! [9 t0 L* Q f
4 \$ g6 |8 I8 T
皜祈岫摰閮敺芷 /home2/test- i% b& I! v. l& E: P2 d
2.
( z; e0 S3 F4 Z, s1 f# h虫蝔格寞:
: s0 A$ Q) R: }2 B( i
# [4 ^1 F+ Y# t皜祈岫蝖祉霈摨:- }5 e* S9 U$ W, P+ W
hdparm -t /dev/sdb
e% V3 m/ x- K* w4 t: e! A1 i
( f' h$ G$ U( z" p' T, b/dev/sdb: (雿輻禿aid0摨血翰)
1 C; C% _ r+ W# U7 x Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.98 MB/sec0 ?' s/ u9 W8 c. c7 Q
# @7 z, f. w _) ] q/ Q/dev/sdb: (敺靘寞LVM摨行)
2 H% d. A* }% a: g/dev/sdb:; R6 A! {6 D0 i; J
Timing buffered disk reads: 546 MB in 3.01 seconds = 181.43 MB/sec2 h2 z$ s$ B0 b& I
皜祈岫蝖祉撖怠仿摨:- w( ~6 G& T0 T
hdparm -t --direct /dev/sdb `& Q- v5 m/ e2 w q- ~9 _3 p
2 u0 A# N# R+ K7 k' v4 B
/dev/sdb: (雿輻禿aid0摨血翰)
' J% y5 F+ J, X- x8 `+ p Timing O_DIRECT disk reads: 1326 MB in 3.29 seconds = 402.57 MB/sec( R5 q r1 N* H' G, h7 V0 T6 J
& Z8 N5 h4 Q+ c1 h4 J4 R) y
/dev/sdb: (敺靘寞LVM摨行)
8 @8 ?- o" T# Q9 Z; O Timing O_DIRECT disk reads: 560 MB in 3.00 seconds = 186.36 MB/sec! F1 M$ r4 h: w# _3 q
' |! z" h: | a
$ d8 G$ E4 I, x6 y! V
血皜祈岫 /dev/sda SSD蝖祉 摨血芣 raid0 scsi 蝖祉銝" E: R) W) I" r
+ d& Y4 n0 f' J7 b
# v* W) i8 e' t: k1 C: @& P4 U) I# H( P* H- E f9 E
" u5 Q* k5 a; L6 K; z5 J
8 `, { f) g9 Y' H: e* y" K7 O$ \$ P0 J- J* h1 F' Y) @( B
|
|