From ba3a3c2e4ce4b4be1429a137ed1b34c58de11d0e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 4 Sep 2023 08:43:38 +0800 Subject: [PATCH] translated --- ...end Veritas File System (VxFS) in Linux.md | 224 ------------------ ...end Veritas File System (VxFS) in Linux.md | 224 ++++++++++++++++++ 2 files changed, 224 insertions(+), 224 deletions(-) delete mode 100644 sources/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md create mode 100644 translated/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md diff --git a/sources/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md b/sources/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md deleted file mode 100644 index 915a176eb1..0000000000 --- a/sources/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md +++ /dev/null @@ -1,224 +0,0 @@ -[#]: subject: "How to Extend Veritas File System (VxFS) in Linux" -[#]: via: "https://www.2daygeek.com/extend-increase-vxvm-volume-vxfs-filesystem-linux/" -[#]: author: "Jayabal Thiyagarajan https://www.2daygeek.com/author/jayabal/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Extend Veritas File System (VxFS) in Linux -====== - -Extending the VxFX file system is a routine task for a Linux/Unix administrator and this can be done online with a few steps described in the below article: - -In this scenario, the Disk Group doesn’t have sufficient free space, so we will be adding a new disk in the existing Disk Group (DG) and then resizing it. - -**Related Articles:** - - * **[How to Create VxVM Volume and Filesystem in Linux][1]** - * **[How to Create Shared VxFS FileSystem on Linux][2]** - - - -### Step-1: Identifying Filesystem - -Check the Filesystem to be increased/extended using the **[df command][3]** and note down the Disk Group (DG) and Volume name from the below output, which will be used later while running vxdg and vxresize commands. - -``` - - df -hP /data - - Filesystem Size Used Avail Use% Mounted on - /dev/vx/dsk/testdg/testvol 9.0G 8.4G 0.6G 95% /data - -``` - -As per the above output, the VxFS filesystem size is **‘9.0 GB’** and we would like to extend additionally **‘5 GB’** and post this activity the VxFS size would be **`'14 GB'`**. - -In this case, the DG name is **‘testdg’** and Volume name is **‘testvol’**. - -### Step-2: Getting a new Disk/LUN - -The new disk must be mapped to the host by the storage team, which may require CR approval, so raise the CR and add the necessary task to the relevant teams, and also include a Rollout/Rollback plan for this activity. - -### Step-3: Scanning a Disk/LUN - -Once Storage team mapped the new LUN to the host, obtain the LUN id and keep it handy. - -Scan the LUN using the below command to discover them at OS level. - -``` - - for disk_scan in `ls /sys/class/scsi_host`; do echo "Scanning $disk_scan…Completed"; echo "- - -" > /sys/class/scsi_host/$disk_scan/scan; done - - Scanning host0...Completed - Scanning host1...Completed - . - . - Scanning host[N]...Completed - -``` - -Once the scanning is complete, use the below command to find out if the given LUN is found at the OS level. - -``` - - lsscsi --scsi | grep -i [Last_Five_Digit_of_LUN] - -``` - -### Step-4: Finding Disks in VxVM - -By default, all available disks are visible to Veritas Volume Manager (VxVM), which can be listed by using the **vxdisk** command as shown below. - -``` - - vxdisk -e list - - DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR - emc_01 auto:cdsdisk disk1 testdg online sdd - - emc_02 auto:cdsdisk disk2 testdg online sde - - emc_03 auto:none - - online invalid sdf - - sda auto:LVM - - LVM sda - - sdb auto:LVM - - LVM sdb - - -``` - -The disk **`'sdf'`** STATUS shows as **`"Online invalid"`** indicates that this disk is not under VxVM control. However, use **smartctl** command to double check the LUN id to ensure that you are picking the correct disk. - -``` - - smartctl -a /dev/sd[x]|grep -i unit - -``` - -If the disk is not populated to VxVM, execute the below command to scan the disk devices in the operating system device tree. - -``` - - vxdisk scandisks - -``` - -### Step-5: Initializing Disk in VxVM - -Once the disk is visible to VxVM at **step #4** , then initialize the disk using the **vxdisksetup** command as shown below: - -``` - - vxdisksetup -i sdf - -``` - -The above command brings the disk **‘sdf’** to the Veritas Volume Manager (VxVM) and the disk status changed to **`"online"`** now. - -![][4] - -### Step-6: Adding Disk to Disk Group (DG) in VxVM - -The **vxdg** command performs various administrative operations on disk groups. In this example, we will be using it for adding a new disk to the existing Disk Group (DG). - -``` - - Syntax: - vxdg -g [DG_Name] adddisk [Any_Name_to_Disk_as_per_Your_Wish=Device_Name] - -``` - -``` - - vxdg -g testdg adddisk disk3=emc_03 - -``` - -After ran the above command, **DISK** name is **`'disk3'`** and **GROUP** name is **`'testdg'`** were updated for **’emc_03′** device as shown below: - -``` - - vxdisk -e list - - DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR - emc_01 auto:cdsdisk disk1 testdg online sdd - - emc_02 auto:cdsdisk disk2 testdg online sde - - emc_03 auto:none disk3 testdg online sdf - - sda auto:LVM - - LVM sda - - sdb auto:LVM - - LVM sdb - - -``` - -### Step-7: Checking free space in the Disk Group (DG) - -To determine how much free space is available for a concatenated volume, run: - -``` - - vxassist -g testdg maxsize - -``` - -### Step-8: Extending VxVM Volume and VxFS Filesystem - -We have added **‘5GB’** LUN for this activity, so extending the VxVM volume and VxFS filesystem additionally **`'5GB'`** as shown below: - -``` - - Syntax: - vxresize -b -g [DG_Name] [Volume_Name] +[Size_to_be_Increased] - -``` - -``` - - vxresize -b -g testdg testvol +5g - -``` - - * **Where:** - * vxresize : Command - * -b : Perform the resize operation in the background (optional). - * -g : Limits operation of the command to the given disk group, as specified by disk group ID or disk group name. - * testdg : Our DiskGroup (DG) Name - * testvol : Our Volume Name - * +5g : This volume will be increased additionaly 5GB. - - - -### Step-9: Checking Extended VxFS Filesystem - -Finally, check the extended VxFS of **‘/data’** using the df command: - -``` - - df -hP /data - - Filesystem Size Used Avail Use% Mounted on - /dev/vx/dsk/testdg/testvol 14G 8.4G 5.6G 68% /data - -``` - -##### Conclusion - -In this tutorial, we’ve shown you how to add a new disk to the existing Disk Group (DG), and extend VxVM Volume and VxFS Filesystem in Linux with few easy steps. - -If you have any questions or feedback, feel free to comment below. - -Kindly support us by sharing this article with wider circle. - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/extend-increase-vxvm-volume-vxfs-filesystem-linux/ - -作者:[Jayabal Thiyagarajan][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/jayabal/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/create-vxvm-volume-vxfs-filesystem-linux/ -[2]: https://www.2daygeek.com/create-veritas-shared-vxfs-file-system-linux/ -[3]: https://www.2daygeek.com/linux-check-disk-space-usage-df-command/ -[4]: https://www.2daygeek.com/wp-content/uploads/2023/07/extend-increase-vxvm-volume-vxfs-filesystem-linux-1024x201.jpg diff --git a/translated/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md b/translated/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md new file mode 100644 index 0000000000..9988440256 --- /dev/null +++ b/translated/tech/20230816 How to Extend Veritas File System (VxFS) in Linux.md @@ -0,0 +1,224 @@ +[#]: subject: "How to Extend Veritas File System (VxFS) in Linux" +[#]: via: "https://www.2daygeek.com/extend-increase-vxvm-volume-vxfs-filesystem-linux/" +[#]: author: "Jayabal Thiyagarajan https://www.2daygeek.com/author/jayabal/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Linux 中扩展 Veritas 文件系统 (VxFS) +====== + +扩展 VxFX 文件系统是 Linux/Unix 管理员的一项日常任务,可以通过以下文章中描述的几个步骤在线完成此任务: + +在此,磁盘组没有足够的可用空间,因此我们将在现有磁盘组(DG)中添加新磁盘,然后调整其大小。 + +**相关文章:** + + * **[如何在 Linux 中创建 VxVM 卷和文件系统][1]** + * **[如何在 Linux 上创建共享 VxFS 文件系统][2]** + + + +### 步骤 1:识别文件系统 + +使用 **[df 命令][3]**检查要增加/扩展的文件系统,并记下以下输出中的磁盘组 (DG) 和卷名称,稍后在运行 vxdg 和 vxresize 命令时将使用这些名称。 + +``` + + df -hP /data + + Filesystem Size Used Avail Use% Mounted on + /dev/vx/dsk/testdg/testvol 9.0G 8.4G 0.6G 95% /data + +``` + +根据上面的输出,VxFS 文件系统大小为 **“9.0 GB”**,我们希望额外扩展 **“5 GB”** 并发布此活动,VxFS 大小将为 **`“14 GB”`**。 + +在本例中,DG 名称为 **“testdg”**,卷名称为 **“testvol”**。 + +### 步骤 2:获取新磁盘/LUN + +新磁盘必须由存储团队映射到主机,这可能需要 CR 批准,因此提出 CR 并向相关团队添加必要的任务,并且还包括此活动的回滚计划。 + +### 步骤 3:扫描磁盘/LUN + +存储团队将新 LUN 映射到主机后,获取 LUN id 并将其保存。 + +使用以下命令扫描 LUN 以在操作系统级别发现它们。 + +``` + + for disk_scan in `ls /sys/class/scsi_host`; do echo "Scanning $disk_scan…Completed"; echo "- - -" > /sys/class/scsi_host/$disk_scan/scan; done + + Scanning host0...Completed + Scanning host1...Completed + . + . + Scanning host[N]...Completed + +``` + +扫描完成后,使用以下命令查看是否在操作系统级别找到给定的 LUN。 + +``` + + lsscsi --scsi | grep -i [Last_Five_Digit_of_LUN] + +``` + +### 步骤 4:在 VxVM 中查找磁盘 + +默认情况下,所有可用磁盘对 Veritas Volume Manager (VxVM) 都是可见的,可以使用 **vxdisk** 命令列出这些磁盘,如下所示。 + +``` + + vxdisk -e list + + DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR + emc_01 auto:cdsdisk disk1 testdg online sdd - + emc_02 auto:cdsdisk disk2 testdg online sde - + emc_03 auto:none - - online invalid sdf - + sda auto:LVM - - LVM sda - + sdb auto:LVM - - LVM sdb - + +``` + +磁盘 **`“sdf”`** STATUS 显示为 **`“Online invalid”`** 表示该磁盘不受 VxVM 控制。但是,请使用 **smartctl** 命令仔细检查 LUN id,以确保你选择了正确的磁盘。 + +``` + + smartctl -a /dev/sd[x]|grep -i unit + +``` + +如果磁盘未填充到 VxVM,请执行以下命令扫描操作系统设备树中的磁盘设备。 + +``` + + vxdisk scandisks + +``` + +### 步骤 5:在 VxVM 中初始化磁盘 + +当磁盘在**步骤 4** 中对 VxVM 可见,那么使用 **vxdisksetup** 命令初始化磁盘,如下所示: + +``` + + vxdisksetup -i sdf + +``` + +上面的命令将磁盘 **“sdf”** 带到 Veritas Volume Manager (VxVM),并且磁盘状态现在更改为 **`“online”`**。 + +![][4] + +### 步骤 6:将磁盘添加到 VxVM 中的磁盘组 (DG) + +**vxdg** 命令对磁盘组执行各种管理操作。在此示例中,我们将使用它向现有磁盘组 (DG) 添加新磁盘。 + +``` + + Syntax: + vxdg -g [DG_Name] adddisk [Any_Name_to_Disk_as_per_Your_Wish=Device_Name] + +``` + +``` + + vxdg -g testdg adddisk disk3=emc_03 + +``` + +运行上述命令后,**DISK** 名称为 **`“disk3”`** 且 **GROUP** 名称为 **`“testdg”`** 已针对 **“emc_03”** 设备进行更新 如下所示: + +``` + + vxdisk -e list + + DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME ATTR + emc_01 auto:cdsdisk disk1 testdg online sdd - + emc_02 auto:cdsdisk disk2 testdg online sde - + emc_03 auto:none disk3 testdg online sdf - + sda auto:LVM - - LVM sda - + sdb auto:LVM - - LVM sdb - + +``` + +### 步骤 7:检查磁盘组 (DG) 中的可用空间 + +要确定连接卷有多少可用空间,请运行: + +``` + + vxassist -g testdg maxsize + +``` + +### 步骤 8:扩展 VxVM 卷和 VxFS 文件系统 + +我们为此活动添加了 **“5GB”** LUN,因此额外扩展了 VxVM 卷和 VxFS 文件系统 **`“5GB”`**,如下所示: + +``` + + Syntax: + vxresize -b -g [DG_Name] [Volume_Name] +[Size_to_be_Increased] + +``` + +``` + + vxresize -b -g testdg testvol +5g + +``` + + * **这里:** + * vxresize:命令 + * -b:在后台执行调整大小操作(可选)。 + * -g:将命令的操作限制为给定磁盘组,由磁盘组 ID 或磁盘组名称指定。 + * testdg:我们的磁盘组 (DG) 名称 + * testvol:我们的卷名称 + * +5g:此卷将额外增加 5GB。 + + + +### 步骤 9:检查扩展 VxFS 文件系统 + +最后,使用 df 命令检查 **“/data”** 的扩展 VxFS: + +``` + + df -hP /data + + Filesystem Size Used Avail Use% Mounted on + /dev/vx/dsk/testdg/testvol 14G 8.4G 5.6G 68% /data + +``` + +##### 总结 + +在本教程中,我们向你展示了如何向现有磁盘组 (DG) 添加新磁盘,以及如何通过几个简单步骤在 Linux 中扩展 VxVM 卷和 VxFS 文件系统。 + +如果你有任何问题或反馈,请随时在下面发表评论。 + +请与更广泛的圈子分享这篇文章来支持我们。 + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/extend-increase-vxvm-volume-vxfs-filesystem-linux/ + +作者:[Jayabal Thiyagarajan][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/jayabal/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/create-vxvm-volume-vxfs-filesystem-linux/ +[2]: https://www.2daygeek.com/create-veritas-shared-vxfs-file-system-linux/ +[3]: https://www.2daygeek.com/linux-check-disk-space-usage-df-command/ +[4]: https://www.2daygeek.com/wp-content/uploads/2023/07/extend-increase-vxvm-volume-vxfs-filesystem-linux-1024x201.jpg