如何将数据直接写入Linux中的已安装卷?
我在云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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您以错误的方式安装它。
您的绑定安装应来自 /datadrive /opt
as as as as as as as as as as as as:
You are mounting it the wrong way around.
Your bind mount should be from /datadrive to /opt
So like this: