summaryrefslogtreecommitdiff
path: root/man/fsadm.8_main
blob: dfff5bb97021e20f321491720c2e1dc823675476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH "NAME"
.
fsadm \(em utility to resize or check filesystem on a device
.
.SH SYNOPSIS
.
.PD 0
.ad l
.TP 6
.B fsadm
.RI [ options ]
.BR check
.IR device
.
.TP
.B fsadm
.RI [ options ]
.BR resize
.IR device
.RI [ new_size ]
.ad b
.PD
.
.SH DESCRIPTION
.
fsadm utility checks or resizes the filesystem on a device (can be
also dm-crypt encrypted device).
It tries to use the same API for
.BR ext2 ,
.BR ext3 ,
.BR ext4 ,
.BR ReiserFS
and
.BR XFS
filesystem.
.
.SH OPTIONS
.
.TP
.BR -e | --ext-offline
Unmount ext2/ext3/ext4 filesystem before doing resize.
.
.TP
.BR -f | --force
Bypass some sanity checks.
.
.TP
.BR -h | --help
Display the help text.
.
.TP
.BR -l | --lvresize
Resize also given lvm2 logical volume. More volume management
functionality is provided with complementary \fBlvresize\fP(8) and the option
.BR -r | --resizefs.
.
.TP
.BR -n | --dry-run
Print commands without running them.
.
.TP
.BR -v | --verbose
Be more verbose.
.
.TP
.BR -y | --yes
Answer "yes" at any prompts.
.
.TP
.BR -c | --cryptresize
Resize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by cryptsetup(8).
.
.TP
.BR \fInew_size [ B | K | M | G | T | P | E ]
Absolute number of filesystem blocks to be in the filesystem,
or an absolute size using a suffix (in powers of 1024).
If new_size is not supplied, the whole device is used.
.
.SH DIAGNOSTICS
.
On successful completion, the status code is 0.
A status code of 2 indicates the operation was interrupted by the user.
A status code of 3 indicates the requested check operation could not be performed
because the filesystem is mounted and does not support an online
.BR fsck (8).
A status code of 1 is used for other failures.
.
.SH EXAMPLES
.
Resize the filesystem on logical volume \fI/dev/vg/test\fP to 1000 megabytes.
If \fI/dev/vg/test\fP contains ext2/ext3/ext4
filesystem it will be unmounted prior the resize.
All [y/n] questions will be answered 'y'.
.P
#
.B fsadm -e -y resize /dev/vg/test 1000M
.
.SH ENVIRONMENT VARIABLES
.
.TP
.B TMPDIR
The temporary directory name for mount points. Defaults to "\fI/tmp\fP".
.TP
.B DM_DEV_DIR
The device directory name.
Defaults to "\fI/dev\fP" and must be an absolute path.
.
.SH SEE ALSO
.
.nh
.ad l
.BR lvm (8),
.BR lvresize (8),
.BR lvm.conf (5),
.P
.BR fsck (8),
.BR tune2fs (8),
.BR resize2fs (8),
.P
.BR reiserfstune (8),
.BR resize_reiserfs (8),
.P
.BR xfs_info (8),
.BR xfs_growfs (8),
.BR xfs_check (8),
.P
.BR cryptsetup (8)