make a filesystem
This function creates a filesystem on device
. The filesystem type is fstype
, for example ext3
.
The optional arguments are:
blocksize
The filesystem block size. Supported block sizes depend on the filesystem type, but typically they are @1024,
@2048 or @4096 for Linux ext2/3 filesystems.
For VFAT and NTFS the blocksize
parameter is treated as the requested cluster size.
For UFS block sizes, please see mkfs.ufs(8).
features
This passes the *-O* parameter to the external mkfs program.
For certain filesystem types, this allows extra filesystem features to be selected. See mke2fs(8) and mkfs.ufs(8) for more details.
You cannot use this optional parameter with the gfs
or gfs2
filesystem type.
inode
This passes the *-I* parameter to the external mke2fs(8) program which sets the inode size (only for ext2/3/4
filesystems at present).
sectorsize
This passes the *-S* parameter to external mkfs.ufs(8) program, which sets sector size for ufs filesystem.
this |
A GuestfsSession object |
optargs |
a GuestfsMkfs containing optional arguments |
true on success, false on error |