Bug #4495
el6: ceph-disk-prepare failure when calling mkfs
0%
Description
This is a el6 oddity.
mkfs does not read the --type option and falls back to mkfs.ext2.
However it does interpret the '-t <fs>' option.
ceph-disk-prepare should change its option to '-t'.
# ceph-disk-prepare /dev/sdc
INFO:ceph-disk-prepare:Will colocate journal with data on /dev/sdc
Creating new GPT entries.
Information: Moved requested sector from 8437726 to 8435712 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
Information: Moved requested sector from 34 to 2048 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
mkfs.ext2: invalid option -- '-'
Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G meta group size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
ceph-disk-prepare: OSD preparation error: Command '['mkfs', '--type=xfs', '-f', '-i', 'size=2048', '--', '/dev/sdc1']' returned non-zero exit status 1
@# mkfs -t xfs -f /dev/sdc1
meta-data=/dev/sdc1 isize=256 agcount=4, agsize=263552 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=1054208, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0@
Associated revisions
ceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type='
Older mkfs (el6) doesn't like --type=.
Fixes: #4495
Reported-by: Alexandre Maragone <alexandre.maragone@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type='
Older mkfs (el6) doesn't like --type=.
Fixes: #4495
Reported-by: Alexandre Maragone <alexandre.maragone@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d47759429a6e2fdd392265e90b67046302c97644)
History
#1 Updated by Sage Weil about 11 years ago
- Status changed from New to Resolved