2 0 1 0 - 0 1 - 0 6 2 3 : 4 1
B e f o r e d o i n g a n y t h i n g : b a c k u p y o u r s e n s i b l e d a t a !
T o e x t e n d a p a r t i t i o n a n d i t ’ s f i l e s y s t e m , y o u h a v e t o :
(一) E x t e n d t h e p a r t i t i o n
(二) E x t e n d t h e f i l e s y s t e m
T o s h r i n k a p a r t i t i o n a n d i t ’ s f i l e s y s t e m , y o u h a v e t o :
(一) S h r i n k t h e f i l e s y s t e m
(二) S h r i n k t h e p a r t i t i o n
F o r a n e x t 3 p a r t i t i o n , s i m p l y u s e p a r t e d :
parted /dev/sdx
print
resize N
P a r t e d d o e s n ’ t s u p p o r t e x t 4 ( y e t ? ) . F o r a n e x t 4 p a r t i t i o n o r i f p a r t e d r e f u s e s t o r e s i z e y o u r e x t 3 p a r t i t i o n ( E r r o r : F i l e s y s t e m
h a s a n i n c o m p a t i b l e f e a t u r e e n a
b l e d .
) , u s e r e s i z e 2 f s :
T o e x t e n d :
cfdisk /dev/sdx
# delete the partition and create it again with the desired size
resize2fs /dev/sdxY
W i t h o u t g i v i n g a n y s i z e , r e s i z e 2 f s e x t e n d s t h e f i l e s y s t e m t o t h e p a r t i t i o n ’ s s i z e .
T o s h r i n k , i t ’ s a l m o s t a s s i m p l e :
# example if you want a 10G partition
# resize filesystem with a size smaller than the desired size
resize2fs /dev/sdxY 9G
cfdisk /dev/sdx
# delete the partition and create it again with the desired size
# (a little bigger than the filesystem!!)
# then launch resize2fs again
resize2fs /dev/sdxY
D o i n g s o w e g e t t h e g o o d p a r t i t i o n s i z e w i t h o u t l o o s i n g a n y s p a c e .
N o t e s :
● I f y o u r p a r t i t i o n i s o v e r L V M , y o u c a n u s e t h e l v r e s i z e
or l v e x t e
n d
or l v r e d u c e
c o m m a n d s t o r e s i z e t h e p a r t i t i o n , i n s t e a d o f d e l e t i n g / c r e a t i n g t h e p a r t i t i o n w i t h c f d i s k .
● T h e m e t h o d a l s o w o r k s f o r o t h e r f i l e s y s t e m s l i k e N T F S . F o r N T F S , y o u w i l l u s e t h e n t f s r e s i z e c o m m a n d , o r p a r t e d i f i t w o r k s .
L i n k s :
● m a n r e s i z e 2 f s
● h t t p : / / w w w . g n u . o r g / s o f t w a r e / p a r t e d / m a n u a l / p a r t e d . h t m l
● h t t p : / / e x t 4 . w i k i . k e r n e l . o r g /
● h t t p : / / e x t 4 . w i k i . k e r n e l . o r g / i n d e x . p h p / F r e q u e n t l y _ A s k e d _ Q u e s t i o n s # H o w _ t o _ o n l i n e _ r e s i z e _ t h e _ E x t 4 _ f i l e s y s t e m . 3 F
2 0 1 0 - 0 1 - 0 6 2 3 : 4 1 · T a g s : c f d i s k , e x t 3 , e x t 4 , f i l e s y s t e m , L V M , N T F S , P a r t e d , p a r t i t i o n , r e s i z e 2 f s
1 1 C o m m e n t s
m i c
2 0 1 2 - 0 5 - 0 5 a t 0 0 : 1 5
T h a n k s f o r t h e a r t i c l e , i t s h e d s o m e l i g h t m u c h b e t t e r t h a n o t h e r p o s t s I f o u n d o n t h e n e t . I w a s a b l e t o r e s i z e m y p a r t i t i o n w i t h n o e r r o r ! I w i l l b e b a c k f o r m o r e …
R e p l y
d a v i d s u
2 0 1 2 - 0 8 - 1 9 a t 0 6 : 4 8
d e a r s i r ,
i n u b u n t u s e r v e r , t o r e d u c e t h e e x t 4 f i l e s y t e m s i z e f r o m 1 T , i r u n t h e “ r e s i z e 2 f s / d e v / m a p p e r / i s p c o n f i g - r o o t 5 0 0 G ” a n d g o t t h e b e l o w o u t p u t t o t h e c o n s o l e :
F i l e s y s t e m a t / d e v / m a p p e r / i s p c o n f i g - r o o t i s m o u n t e d o n / ; o n - l i n e r e s i z i n g r e q u i r e d
O n - l i n e s h r i n k i n g f r o m 2 6 7 8 0 9 7 9 2 t o 1 3 1 0 7 2 0 0 0 n o t s u p p o r t e d .
i t i s m u c h a p p r e c i a t e d i f y o u c a n h e l p t o e m a i l t h e r e s o l u t i o n t o m y e m a i l a d d r e s s q i u b o s u @ g m a i l . c o m .
t h a n k s .
R e p l y
K c s w a l t e r
2 0 1 2 - 0 9 - 3 0 a t 1 6 : 5 1
D e a r D a v i d s u , a s k i n g f o r a P M j u s t m e a n s l e a v i n g o t h e r s w i t h y o u r s a m e p r o b l e m i n t h e d a r k . S i n c e t h i s i s n o t a p r i v a t e m a t t e r ( n o t h i n g c o n f i d e n t i a l i s p a s s e d o n ) w o u l d n ’ t i t b e b e t t e r t o l e t e v e r y o n e k n o w ?
W h a t t h e s y s t e m i s s a y i n g i s t h a t y o u h a v e t o d o t h e r e s i z e o n a n u n m o u n t e d p a r t i t i o n . F i l e s y s t e m o p e r a t i o n s l i k e r e s i z i n g , c h e c k i n g a n d s o o n s h o u l d a l w a y s b e d o n e o f f l i n e .
Y o u j u s t h a v e t o k e e p a l i v e c d a t h a n d .
R e p l y
A n t o n e l l o
2 0 1 3 - 0 4 - 0 9 a t 1 1 : 3 8
W i l l t h i s L O O S E m y d a t a ? I n e e d t o r e s i s e a n e x t 4 / h o m e p a r t i t i o n ( / d e v / s d a 9 ) t o m a k e s p a c e f o r s o m e t h i n g e l s e b u t I d o n ’ t w a n t t o l o o s e t h e d a t a I h a v e i n s i d e i t .
I c a n b o o t a n d g o d i r e c t l y t o c o n s o l e a s r o o t s o I c a n u n m o u n t / h o m e , b u t t h e n h o w c a n I r e s i z e i t w i t h o u t l o o s i n g d a t a i n s i d e ? F o r s o m e r e a s o n s I c a n ’ t g o t o t h e g u i w i t h n o / h o m e s o I c a n ’ t u s e g p a r t e d .
R e p l y
R i c k
2 0 1 3 - 0 4 - 2 2 a t 1 0 : 0 0
t o A n t o n e l l o ,
I t s h o u l d n o t l o o s e y o u r d a t a . O f c o u r s e , i t ’ s * a l w a y s * a s m a r t i d e a t o h a v e a c u r r e n t b a c k u p b e f o r e y o u s t a r t ! ( - ;
R i c k
R e p l y
T i m M i l l e r D y c k
2 0 1 3 - 0 6 - 1 2 a t 1 5 : 4 9
H i , a n o t e t o c h e c k t h e s t a r t i n g s e c t o r b e f o r e r e c r e a t i n g t h e p a r t i t i o n a n d e n s u r e t h e n e w p a r t i t i o n s t a r t s a t t h e s a m e s e c t o r . W h e n I u s e d c f d i s k , i t c r e a t e d t h e p a r t i t i o n s t a r t i n g a t s e c t o r 3 4 . I h a d u s e d f d i s k t o c r e a t e t h e o r i g i n a l p a r t i t i o n a n d i t c r e a t e d t h e p a r t i t i o n s t a r t i n g a t s e c t o r 2 0 4 8 . S t a r t i n g t h e p a r t i t i o n a t a d i f f e r e n t d i s k l o c a t i o n t h a n b e f o r e , o f c o u r s e , r e s u l t e d i n a p a r t i t i o n w i t h n o v a l i d f i l e s y s t e m . I u s e d f d i s k a g a i n t o c r e a t e t h e n e w ( l a r g e r ) p a r t i t i o n a n d a l l w a s f i n e .
R e p l y
M a r c
2 0 1 3 - 0 6 - 1 3 a t 1 3 : 4 8
H i T i m ,
Y e s , y o u ’ r e r i g h t : i t ’ s b e t t e r t o u s e f d i s k t o b e s u r e t h a t t h e p a r t i t i o n k e e p s t h e s a m e s t a r t .
R e p l y
P i n g b a c k : L i n u x b o o t w i t h b r o k e n p a r t i t i o n | Q u e s t i o n a n d A n s w e r
P i n g b a c k : U n i x : H o w t o e x t e n d C e n t O S 5 p a r t i t i o n o n V M w a r e ? – U n i x Q u e s t i o n s
O l u d a r i o
2 0 1 6 - 1 1 - 2 8 a t 2 1 : 0 6
I j u s t a d d e d a d d i t i o n a l 1 0 0 g b t o / d e v / s d a o n v S p h e r e c l i e n t . H o w w o u l d y o u s u g g e s t I a d d t h e n e w s p a c e t o / d e v / s d a 2 s h o w n b e l o w ?
# f d i s k - l / d e v / s d a
D i s k / d e v / s d a : 2 2 1 . 2 G B , 1 1 3 8 1 6 6 3 3 3 4 4 b y t e s
2 5 5 h e a d s , 6 3 s e c t o r s / t r a c k , 1 3 8 3 7 c y l i n d e r s
U n i t s = c y l i n d e r s o f 1 6 0 6 5 * 5 1 2 = 8 2 2 5 2 8 0 b y t e s
S e c t o r s i z e ( l o g i c a l / p h y s i c a l ) : 5 1 2 b y t e s / 5 1 2 b y t e s
I / O s i z e ( m i n i m u m / o p t i m a l ) : 5 1 2 b y t e s / 5 1 2 b y t e s
D i s k i d e n t i f i e r : 0 x 0 0 0 9 c 9 1 5
D e v i c e B o o t S t a r t E n d B l o c k s I d S y s t e m
/ d e v / s d a 1 * 1 2 6 2 0 4 8 0 0 8 3 L i n u x
P a r t i t i o n 1 d o e s n o t e n d o n c y l i n d e r b o u n d a r y .
/ d e v / s d a 2 2 6 5 6 9 0 4 5 4 9 3 2 4 8 8 3 L i n u x
/ d e v / s d a 3 5 6 9 0 9 2 2 9 2 8 4 3 2 3 8 4 8 3 L i n u x
/ d e v / s d a 4 9 2 2 9 1 3 8 3 8 3 7 0 1 7 6 0 0 5 E x t e n d e d
/ d e v / s d a 5 9 2 3 0 1 0 6 4 5 1 1 3 7 2 5 4 4 8 3 L i n u x
/ d e v / s d a 6 1 0 6 4 6 1 1 4 9 5 6 8 2 3 9 3 6 8 3 L i n u x
/ d e v / s d a 7 1 1 4 9 5 1 2 2 0 3 5 6 8 6 2 7 2 8 3 L i n u x
/ d e v / s d a 8 1 2 2 0 3 1 3 2 7 2 8 5 8 4 1 9 2 8 2 L i n u x s w a p / S o l a r i s
/ d e v / s d a 9 1 3 2 7 2 1 3 5 5 5 2 2 7 4 3 0 4 8 3 L i n u x
/ d e v / s d a 1 0 1 3 5 5 5 1 3 8 3 8 2 2 7 0 2 0 8 8 3 L i n u x
R e p l y
D r T e b i
2 0 1 8 - 0 2 - 1 3 a t 0 8 : 1 1
S h r i n k i n g e x t 4 w o r k e d e x a c t l y a s d e s c r i b e d , u s i n g r e s i z e 2 f s , c f d i s k , r e s i z e 2 f s a g a i n .
T h a n k s a l o t f o r p o s t i n g , c h e e r s !
R e p l y
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
● B s y n c
● B i z o u ( f r e n c h K I S S p h p i m a g e g a l l e r y )
● P o r t q u i z . n e t O u t g o i n g P o r t T e s t e r
● m a r c m a u r i c e . f r
● L e s r e c e t t e s d e M a t h i l d e
● M i x i m u m
● P a l s a m b l e u !
● O b j e c t i f L i b r e
● s y s a d m i n . s m i l e . f r
● N o t e s d u P e t i t c h e v a l r o u x
A r c h L i n u x
b a c k u p
b a s h
B I O S
B r a s e r o
b s y n c
C d r d a o
c d r o m
C h e c k I n s t a l l
D e b i a n
e m a i l
E x i m
f i n d
g i t
G i t H u b
g p a r t e d
G r u b
i n o t i f y
K a r m i c
L i n u x
L u c i d
M P D
N a u t i l u s
R a s p b e r r y P i
r s y n c
S F T P
S p a m
S S H
T h i n k p a d
U b u n t u
u m a s k
U S B
U S p l a s h
X F C E
X S p l a s h
© 2 0 2 4 L i b r e T h i n g s . A l l r i g h t s r e s e r v e d .
D e s i g n b y p i c o m o l . P o w e r e d b y W o r d P r e s s .