如何将数据直接写入Linux中的已安装卷?

发布于 2025-02-07 19:59:04 字数 474 浏览 2 评论 0原文

我在云VM的 /系统中运行了一个应用程序。 (DEV/SDA) 我无法调整root“/”分区大小以扩展存储大小,并且该应用程序没有将报告写入其他位置的选项。

因此,我创建了另一个硬盘 /DEV /SDB,并将其附加到VM。

我已经创建了一个FSTAB条目,如下所示... 但 现在的问题是,该应用程序仍在将数据写入 /dev /sda而不是 /dev /sdb。

如何解决这个问题?我希望能够将数据直接写入 /datadrive on /dev /sdb而不是 /dev /sda

UUID=exxxxxx-fxxx-4xxx-bxxx-7xxxxxxxxxxx      /datadrive xfs  defaults,nofail 1 2
/opt/application/var/users/user1/reports/  /datadrive/application-reports/user1/reports/ none bind

I have an application running in the / system of a cloud vm. (dev/sda)
I can't resize the root "/ "partition to extend the storage size and the application does not have an option to write the reports to a different location.

So I have created another hard disk /dev/sdb and attached it to the vm.

I have created an fstab entry like the one below...
but
the issue now is that the application is still writing data to /dev/sda instead of /dev/sdb.

How to fix this? I want to be able to write data directly to the mount point which is /datadrive on /dev/sdb instead of /dev/sda

UUID=exxxxxx-fxxx-4xxx-bxxx-7xxxxxxxxxxx      /datadrive xfs  defaults,nofail 1 2
/opt/application/var/users/user1/reports/  /datadrive/application-reports/user1/reports/ none bind

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

_畞蕅 2025-02-14 19:59:04

您以错误的方式安装它。

您的绑定安装应来自 /datadrive /opt

as as as as as as as as as as as as:

UUID=xxx-xxx-xxx-xxx-xxx     /datadrive xfs  defaults,nofail 1 2
/datadrive/application-reports/user1/reports/ /opt/application/var/users/user1/reports  none bind

You are mounting it the wrong way around.

Your bind mount should be from /datadrive to /opt

So like this:

UUID=xxx-xxx-xxx-xxx-xxx     /datadrive xfs  defaults,nofail 1 2
/datadrive/application-reports/user1/reports/ /opt/application/var/users/user1/reports  none bind
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文