砍敺 IT_man 2017-3-21 22:08 蝺刻摩
* s. B h7 \8 ]+ H8 J4 T
8 d+ a, q, z4 A% r : http://linux.vbird.org/linux_basic/0230filesystem.php#parted http://blog.yam.com/wesley1981/article/16596463 賊隞 fstab, findfs, mount blkid
& s' I; Y4 F" J0 J7 \fdisk 隢 :http://blogger.gtwang.org/2012/02/linux.html
2 I, K$ j r/ l. d* Y2 h9 nformat 憭扳 16TB 蝖祉(>16TB銝摰閬冽迨隞) : http://www.unix-ninja.com/p/Formatting_Ext4_volumes_beyond_the_16TB_limit/http://blog.yourdream.cc/2014/11/19/morethan16t.html
+ _, N7 T5 f. M- l2 i8 Q1 C
0 V1 F6 @2 w6 L0 y4 [1 D) T啣蝖祉,璈芸mount(銝隞孑ount芣舀急,璈銝芸mount) :/etc/fstab 乩銝銵:; U8 V& k4 i1 J* w& B( a
/dev/sdb1 /home2 ext4 defaults 1 1
" E0 z7 {9 Y! N6 g. s2 M
4 R Z s: o0 q& \; Eparted 閰喟敦隞:https://blog.gtwang.org/linux/pa ... -disk-partitions/2/3 A7 v1 I- |9 x& R( t% @% k
0 [7 K( y3 g$ V* ?6 h# G* Yfdisk 隞文芣舀 MBR 銝舀 GPT ,閬 GPT蝖祉雿輻 parted 游隞文脩′蝣,隞乩撠隞蝝 parted冽' p+ J% l# x* A) V5 ]9 `
: t4 g t2 b- t9 n0 ~6 D
1 |6 U- I9 ]9 @3 ]1 D! Q* T
parted 臭誑湔亙其銵隞文撠勗莎臭撣詨末函隞歹摰撣貊函隤瘜憒銝嚗* \6 U1 G7 a, w {
5 P5 a$ t( Z$ z$ `- yparted [鋆蝵孫 [隞 [窟]
; U% ^; {. M4 Y賊賂
J& L5 S9 c4 Z, f* k! ^1 O3 J隞文踝" ?! q& m# b, y! }+ ^5 p- Z$ z
啣莎mkpart [primary|logical|extended] [ext4|vfat|xfs] 憪 蝯( n. X7 Z5 O3 a. \
憿舐內莎print
8 W7 J+ B0 J5 x; q; v% q: l* { 芷文莎rm [partition]
. z- [+ p6 T4 h$ v o) U- I靘憒:4 t; g7 w `! H- y
, e5 a) u3 V/ m8 k
寞銝:
. [0 o- q% N z. M( J+ r9 T(parted) mkpart primary 0 100% (primary皰artition name)/ y* H& x% {) Q: ~4 P) B
& X! r5 P) r& g) a# N. }
寞鈭:
$ s( b Z8 z% v# q t7 q' h$ w! \Partition name? []? 30T_part2 \3 [- j( b' x7 G3 a' {
File system type? [ext2]? ext2 (ext4銝霅血)- y# G) {0 a' B5 ?: h2 C9 v8 z( g
Start? 0B or 0%) s- n) A! E/ |) f$ K# \6 ?
End? 30TB or 100%
+ a3 ]1 c/ c* o+ Z9 t2 NWarning: You requested a partition from 0.00B to 30.0TB.' I8 R, P7 M' C! K! H8 n
The closest location we can manage is 17.4kB to 30.0TB.& X% m+ n2 o, x5 O. N
Is this still acceptable to you?
% c3 T: i" X5 S9 N J" qYes/No? Yes& j8 M# `* ]/ L/ _. K5 A; U
Warning: The resulting partition is not properly aligned for best performance.
+ {- D2 D# D6 A. c# yIgnore/Cancel?
; ?1 w8 i; s/ o, V雿輻牠xt2撠曹銝餈啗郎; b* U& v( D) Y6 y# q; @/ i4 A
mkfs -t ext4 /dev/sdb1 ===> format% D0 |+ I: I6 O
ERROR:
$ m4 v4 E& m! {: kmkfs.ext4: Size of device /dev/sdb1 too big to be expressed in 32 bits
- d# X( W) ?8 ?/ ? t- W, H( V: g using a blocksize of 4096
5 [7 c7 L1 _& B& M, j; CSOL:
: j( Q# x' W4 g% |: h0 ~$ S; bformat > 16TB see https://www.unix-ninja.com/p/For ... yond_the_16TB_limit. B4 }" z ?5 A: ?
/usr/local/src/wget -Oe2fsprogs-1.42.7.tar.gz http://downloads.sourceforge.net ... _mirror=superb-dca3
& x0 m% E8 ]/ o5 S1 I% P/usr/local/src/tar -zxvf e2fsprogs-1.42.7.tar.gz( m x- |5 T. T& k, F& R5 b! v4 y
cd /usr/local/src/e2fsprogs-1.42.7+ C( V' K- p, |
mkdir build
6 c) A; R5 w) R; zcd build
$ N0 T, L$ D! Y. M! _& H ../configure
]; s! B$ S, q' `. M, O& A make% N; L# h Z4 c3 Q' L& w
make install+ ]! M' H7 M4 `4 _9 _
mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb1) F" V0 ^* A! m6 [' x3 P
憿舐內銝:
, o. K! \, q8 w( |. _# V4 PThis filesystem will be automatically checked every 27 mounts or3 n6 ^( C6 L+ [3 h: a! P3 m
180 days, whichever comes first. Use tune2fs -c or -i to override.+ ]8 P) y# r& Y0 q, Q
/etc/fstab銝剖乩 : (fstab隞蝝:http://horace1123.pixnet.net/blo ... b%E8%AA%AA%E6%98%8E)5 T1 ^* M, y- M D q
/dev/sdb1 /home2 ext4 defaults 1 0(蝚砌詨1:瘥亙隞,蝚砌詨0:蝟餌絞銝甇撣豢fsck銝瑼X)
: G% ~$ P2 }$ w* d Dmount /home2! `6 M1 G- J2 E( ~! B
% Y- q7 S/ ^/ g& M' W% v
8 J6 O3 U- s d! |
=======================================================================) S x+ z1 |5 N* Y! H# [ U
+ S& t" E4 l3 w" ]1 H[蝖祉皜祈岫]1.$ ^: i* Q8 H; \1 H; k% S
Linux蝖祉撖怠仿摨行葫閰衣隞:8 Q+ |" [2 P- [3 F4 q* Y
#time dd if=/dev/zero of=/home2/test bs=2k count=1000000 // /home2 痂ount raid0 33TB 蝖祉, 11*3TB銋SCSI蝖祉
p R7 Z3 H- X6 V7 t- k1000000+0 records in
) m2 E" j% s9 W$ P" n1000000+0 records out
+ n; C0 q2 \" K, w" z$ ?2048000000 bytes (2.0 GB) copied, 3.58735 s, 571 MB/s
; U) |) j1 ~1 s8 h( I7 T ~: O4 o, Y8 p; O2 {* E2 R
real 0m3.590s: W# T& W0 q! m3 [, }
user 0m0.130s
7 {6 i9 I0 w% Ssys 0m3.455s
3 ^+ h0 ]7 v8 ?9 x6 ^5 F3 I
+ n. y: X# V6 I* Z: E- L% s
! K9 _# I8 A9 F5 V% G. qLinux蝖祉霈摨行葫閰衣隞:
% e" G2 }1 x6 U#time dd if=/home2/test of=/dev/null bs=2k
5 M" k5 S2 d. u1000000+0 records in/ ~2 \1 D6 y; H+ x' ^
1000000+0 records out
# E% i! Z) S8 }0 D2048000000 bytes (2.0 GB) copied, 0.952334 s, 2.2 GB/s3 U* f* c1 G! _& I. g
3 ?) u4 C7 B; K2 v% L3 U) M3 H
real 0m0.954s
4 X1 |. M( _5 m. |9 i8 B& Quser 0m0.083s- @9 j) }6 Y0 z2 A
sys 0m0.868s
6 j4 A$ W, {% A' z
, F- w+ R0 T( f閫嚗# q! t! C1 V9 l
time 其閮$ v4 Y* r' C t; F! o& ?! K; S
dd 其銴鋆踝敺if OF
l6 b' s ~; E. yif=/dev/zero銝YIO嚗隞亙臭誑其皜祈岫蝝蝎孵神摨;璅 of=/dev/null 銝YIO嚗臭誑其皜祈岫蝝蝎寡摨' X$ s8 @' g, C( D1 n) M; N
bs 舀甈⊥葫閰血桐憭批嚗count航撖怎嚗訾撠望航憭批.
6 m. r0 F \# q% y! u7 U鞈頞憭扯皞蝣綽憭皜祈岫靘撟喳潦& J7 J4 V) @& `( \
豢頞憭扯蝖殷憭甈⊥葫閰血撟喳' h+ H3 L4 J+ p! }! o" t) p
望葫閰衣敺啁豢憿舐內摨衣貊嗅翰鈭
' j% c9 E i4 I, [1 T
3 X# J7 k3 i; \* ~皜祈岫摰閮敺芷 /home2/test; D! X1 y1 c* a. O. L7 F8 _0 F
2.1 ^7 L6 _- S7 m' |2 @/ b
虫蝔格寞:$ C1 m9 a, G9 q0 h! P
, O# }: c% W. F# z& l
皜祈岫蝖祉霈摨:; [; K% S) o- |/ U
hdparm -t /dev/sdb
- O( n; O6 b% Q- Y& {/ e X5 i" h, ]4 T
/dev/sdb: (雿輻禿aid0摨血翰)# l2 g8 e4 B' f2 s& M
Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.98 MB/sec
9 X7 O+ R! M) S! V% T5 k) ?% [0 ^
; m* O# y$ L& y! |4 [& h/dev/sdb: (敺靘寞LVM摨行), r/ R2 E' Q+ W% c
/dev/sdb:
' q3 F% A! s" R# KTiming buffered disk reads: 546 MB in 3.01 seconds = 181.43 MB/sec
, W7 P- Q8 m9 U E皜祈岫蝖祉撖怠仿摨:/ l6 o4 p" A" k L
hdparm -t --direct /dev/sdb# L& n4 h( [- Q0 M$ ]
0 `; \0 P, p: D# k' f" F8 ~
/dev/sdb: (雿輻禿aid0摨血翰)& X& E0 f3 m' s$ P/ d
Timing O_DIRECT disk reads: 1326 MB in 3.29 seconds = 402.57 MB/sec
, t2 S* v. l8 ]1 u' y1 `
, v5 |; L ]7 e( t. m) u. z5 X3 Y/dev/sdb: (敺靘寞LVM摨行)
( |* z# \; Y l- n Timing O_DIRECT disk reads: 560 MB in 3.00 seconds = 186.36 MB/sec
0 _/ H" T7 h: g: p+ [
) \, V. p" r- J6 `) Z% d0 }2 u+ C2 x, h! x4 B( r
血皜祈岫 /dev/sda SSD蝖祉 摨血芣 raid0 scsi 蝖祉銝, h- q% I5 N8 W3 S
& y3 M7 Z6 h2 |
. p W: ? @; B' S) g* j
( t( N3 p2 w7 |' F4 T
6 V0 E* S5 k" h: {6 R- l( B# Y U
/ G- V' t0 c# R5 R. O9 @# U) z9 Y
: C0 h" a6 Q$ {( D |
|