mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 18:50:36 +00:00
pveceph: allow to specify fs-type
This commit is contained in:
parent
740895591f
commit
43d85563a7
@ -1123,7 +1123,14 @@ __PACKAGE__->register_method ({
|
|||||||
dev => {
|
dev => {
|
||||||
description => "Block device name.",
|
description => "Block device name.",
|
||||||
type => 'string',
|
type => 'string',
|
||||||
}
|
},
|
||||||
|
fstype => {
|
||||||
|
description => "File system type.",
|
||||||
|
type => 'string',
|
||||||
|
enum => ['xfs', 'ext4', 'btrfs'],
|
||||||
|
default => 'xfs',
|
||||||
|
optional => 1,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns => { type => 'string' },
|
returns => { type => 'string' },
|
||||||
@ -1163,9 +1170,11 @@ __PACKAGE__->register_method ({
|
|||||||
my $worker = sub {
|
my $worker = sub {
|
||||||
my $upid = shift;
|
my $upid = shift;
|
||||||
|
|
||||||
print "create OSD on $param->{dev}\n";
|
my $fstype = $param->{fstype} || 'xfs';
|
||||||
|
|
||||||
run_command(['ceph-disk', 'prepare', '--zap-disk', '--fs-type', 'xfs',
|
print "create OSD on $param->{dev} ($fstype)\n";
|
||||||
|
|
||||||
|
run_command(['ceph-disk', 'prepare', '--zap-disk', '--fs-type', $fstype,
|
||||||
'--cluster', $ccname, '--cluster-uuid', $fsid,
|
'--cluster', $ccname, '--cluster-uuid', $fsid,
|
||||||
'--', $param->{dev}]);
|
'--', $param->{dev}]);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user