Share via


CreateFileSystem method of the MSFT_SMPool class

Creates a file system.

Syntax

UInt32 CreateFileSystem(
  [in]            String                Name,
  [in]            UInt64                Size,
  [in]            MSFT_SMFileServer REF FileServer,
  [in]            Boolean               RunAsJob,
  [out]           MSFT_SMFileSystem REF CreatedFileSystem,
  [out]           MSFT_SMJob        REF CreatedStorageJob,
  [out, optional] MSFT_SMExtendedStatus ExtendedStatus
);

Parameters

Name [in]

A human-readable string used to identify a file share. This name must be unique within the scope of the owning file server.

Size [in]

File system size

FileServer [in]

The file server to mount the file system to.

RunAsJob [in]

If True, start a job to create the file system asynchronously.

CreatedFileSystem [out]

The MSFT_SMFileSystem object created by calling this method.

CreatedStorageJob [out]

Reference to the MSFT_SMJob instance. May be NULL if the job is completed.

ExtendedStatus [out, optional]

An MSFT_SMExtendedStatus object containing the results of calling this method.

Return value

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

Method Parameters Checked - Job Started (4096)

Size Not Supported (4097)

Access denied (40001)

There are not enough resources to complete the operation. (40002)

An unexpected I/O error has occurred (42002)

The requested access path is already in use. (42007)

The access path is not valid. (42008)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\Microsoft\Windows\Storage\SM
MOF
MsftStrgMan.mof
DLL
StorageService.dll

See also

MSFT_SMPool