diff --git a/agent/app/dto/request/disk.go b/agent/app/dto/request/disk.go index 3fb7cceea701..6232a93d0d5e 100644 --- a/agent/app/dto/request/disk.go +++ b/agent/app/dto/request/disk.go @@ -13,6 +13,7 @@ type DiskMountRequest struct { MountPoint string `json:"mountPoint" validate:"required"` Filesystem string `json:"filesystem" validate:"required,oneof=ext4 xfs"` AutoMount bool `json:"autoMount"` + NoFail bool `json:"noFail"` } type DiskUnmountRequest struct { diff --git a/agent/app/service/disk.go b/agent/app/service/disk.go index eebab157d40d..2a6b9d185c96 100644 --- a/agent/app/service/disk.go +++ b/agent/app/service/disk.go @@ -131,7 +131,11 @@ func (s *DiskService) MountDisk(req request.DiskMountRequest) error { return buserr.WithErr("MountDiskErr", err) } if req.AutoMount { - if err := addToFstabWithOptions(req.Device, req.MountPoint, req.Filesystem, ""); err != nil { + options := "" + if req.NoFail { + options = "defaults,nofail" + } + if err := addToFstabWithOptions(req.Device, req.MountPoint, req.Filesystem, options); err != nil { return buserr.WithErr("MountDiskErr", err) } } diff --git a/frontend/src/api/interface/host.ts b/frontend/src/api/interface/host.ts index e075ea7a4fb6..be8fb2520b6a 100644 --- a/frontend/src/api/interface/host.ts +++ b/frontend/src/api/interface/host.ts @@ -291,6 +291,7 @@ export namespace Host { label: string; autoMount: boolean; mountPoint: string; + noFail: boolean; } export interface DiskMount { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 85af4f084c3f..556ae230fdaf 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -3189,6 +3189,7 @@ const message = { model: 'Device Model', diskType: 'Disk Type', serial: 'Serial Number', + noFail: 'Mount failure does not affect system startup', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts index 41685435a993..29341d2f0904 100644 --- a/frontend/src/lang/modules/es-es.ts +++ b/frontend/src/lang/modules/es-es.ts @@ -3176,6 +3176,7 @@ const message = { model: 'Modelo del dispositivo', diskType: 'Tipo de disco', serial: 'Núm. de serie', + noFail: 'El fallo de montaje no afecta al inicio del sistema', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 7910bd62bd85..b09fabf3b94e 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -3090,6 +3090,7 @@ const message = { model: 'デバイスモデル', diskType: 'ディスクタイプ', serial: 'シリアルナンバー', + noFail: 'マウント失敗はシステム起動に影響しません', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 9d7026469234..e2ea09792a5e 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -3035,6 +3035,7 @@ const message = { model: '장치 모델', diskType: '디스크 유형', serial: '시리얼 번호', + noFail: '마운트 실패는 시스템 시작에 영향을 미치지 않습니다', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 039e57784f27..dcd1acb2eb99 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -3147,6 +3147,7 @@ const message = { model: 'Model Peranti', diskType: 'Jenis Cakera', serial: 'Nombor Siri', + noFail: 'Kegagalan pemasangan tidak menjejaskan permulaan sistem', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index cac1b80acffb..dddaaa5ed7fe 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -3161,6 +3161,7 @@ const message = { model: 'Modelo do Dispositivo', diskType: 'Tipo de Disco', serial: 'Número de Série', + noFail: 'Falha na montagem não afeta a inicialização do sistema', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 019c03e3ae55..42bc02bea839 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -3150,6 +3150,7 @@ const message = { model: 'Модель устройства', diskType: 'Тип диска', serial: 'Серийный номер', + noFail: 'Сбой монтирования не влияет на запуск системы', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index 7e7385d8b7a2..d9879b40c7cb 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -3231,6 +3231,7 @@ const message = { model: 'Cihaz Modeli', diskType: 'Disk Türü', serial: 'Seri Numarası', + noFail: 'Bağlama hatası sistem başlangıcını etkilemez', }, xpack: { expiresTrialAlert: diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index 36279f04963c..ca743eee7790 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -2962,6 +2962,7 @@ const message = { model: '裝置型號', diskType: '磁碟類型', serial: '序號', + noFail: '掛載失敗不影響系統啟動', }, xpack: { expiresAlert: '溫馨提醒:您的專業版許可證將在 {0} 天後到期,屆時所有專業版功能將無法繼續使用。', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 0d86660c0e59..92fd7869a5a9 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -2962,6 +2962,7 @@ const message = { model: '设备型号', diskType: '磁盘类型', serial: '序列号', + noFail: '挂载失败不影响系统启动', }, xpack: { expiresAlert: '温馨提醒:专业版试用将于 [{0}] 天后到期,届时将停止使用所有专业版功能。', diff --git a/frontend/src/views/host/disk-management/partition/index.vue b/frontend/src/views/host/disk-management/partition/index.vue index 2849f5ed3265..1b30c865077e 100644 --- a/frontend/src/views/host/disk-management/partition/index.vue +++ b/frontend/src/views/host/disk-management/partition/index.vue @@ -14,7 +14,7 @@ /> + + +