大网数据广告活动
Windows排障命令

san

· 52CE 我爱测

Reference article for the san command that displays or sets the storage area network (SAN) policy for the operating system.

Displays or sets the storage area network (san) policy for the operating system. If used without parameters, the current san policy is displayed.

Syntax

san [policy={onlineAll | offlineAll | offlineShared}] [noerr]

Parameters

Parameter Description
policy={onlineAll|offlineAll|offlineShared}] Sets the san policy for the currently booted operating system. The san policy determines whether a newly discovered disk is brought online or remains offline, and whether it becomes read/write or remains read-only. When a disk is offline, the disk layout can be read, but no volume devices are surfaced through Plug and Play. When offline no file system can be mounted on the disk. When a disk is online, one or more volume devices are installed for the disk. The following parameter can be set:<ul><li>onlineAll. Specifies that all newly discovered disks are online and made read/write. IMPORTANT: Specifying onlineAll on a server that shares disks could lead to data corruption. Therefore, you shouldn't set this policy if disks are shared among servers unless the server is part of a cluster.</li><li>offlineAll. Specifies that all newly discovered disks except the startup disk are offline and read-only by default.</li><li>offlineShared. Specifies that all newly discovered disks that don't reside on a shared bus (such as SCSI and iSCSI) are brought online and made read-write. Disks that are left offline are read-only by default.</li></ul>For more information, see VDS_san_POLICY Enumeration.
noerr Used for scripting only. When an error is encountered, DiskPart continues to process commands as if the error didn't occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To view the current policy, type:

san

To make all newly discovered disks, except the startup disk, offline and read-only by default, type:

san policy=offlineAll

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 04/01/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。