对专用服务器硬盘进行分区有意义吗?

发布于 2024-07-14 12:47:23 字数 469 浏览 8 评论 0原文

我将在我们新的专用服务器上安装 Debian,并且我有机会设置硬盘分区。

该服务器有两个配置为 RAID 1 的 750GB 驱动器。我们将有 10 个 Postgresql 数据库,其中每个数据库约为 2 GB。 当然,该服务器上也会有 Apache/PHP。 我们将仅将该服务器用于我们自己的 Web 应用程序。

托管公司强烈建议创建单独的两个分区。 第一个小的代表“/”,第二个很大的代表“/home”。 但我对此有一些疑问。 我感觉“/”目录划分一个大分区就可以了。 对此的回答 问题还表明将磁盘划分为多个分区是没有意义的。

在这种情况下磁盘分区仍然相关吗?

I am going to install Debian on our new dedicated server and I have a chance to set up hard drive partitions.

The server has two 750GB drives configured as RAID 1. We are going to have 10 Postgresql databases, where each database will be about 2 GB. There will be of course Apache/PHP on this server too. We'll use the server for only our own web applications.

The hosting company strongly recommends to create separate two partitions. First small one for "/" and second very big for the "/home". But I have some doubts about this. I have a feeling that one big partition for "/" directory is just fine. Answers to this question suggest also that it doesn't make sense to divide the disk into several partitions.

Is disk partitioning still relevant in such cases?

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

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

发布评论

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

评论(4

尛丟丟 2024-07-21 12:47:24

如果您有一个地方的数据可能会填满分区并阻止其他程序运行,那么它是相关的; 应用程序日志文件可能会填满一个分区,并且没有留下临时空间供其他应用程序写入或操作系统写入,所以是的,仍然有相关的分区原因。 只需看看您需要什么,并确定是否有任何因素会阻止系统其余部分的使用。 如果是这样,您需要将其分区,这样如果它确实超出了空间,则只会损害自身。

It is relevant if you have a place where data may fill up the partition and prevent something else from running; application log files may fill up a partition and leave no tmp space for other apps to write to, or the OS to write to, so yes, there are still relevant reasons to partition. Just look at what you need and decide if anything could prevent the rest of the system from being used. If so, you want to partition that off so if it does max out space, it only harms itself.

空心空情空意 2024-07-21 12:47:24

正如您指出的线程中所述,多个分区的唯一好处是能够擦除和重建操作系统而不会弄乱您的数据。 但是您在远程服务器上运行 Debian,因此您不太可能这样做。

转储整个分区时,有时也会有基于备份磁带容量的原因,但那是上个世纪的事了。

底线:不要分区。

As stated in the thread you pointed to, about the only gain from multiple partitions is the ability to wipe and rebuild the OS without messing with your data. But you're running Debian on a remote server, so it is unlikely you would ever do that.

There also use to be reasons based on backup tape capacity when dumping entire partitions, but that is sooo last century.

Bottom line: don't partition.

旧时浪漫 2024-07-21 12:47:24

我认为它在性能或任何实际原因方面不再相关。

请注意,RAID1 只能在出现硬件故障时拯救您。 这不是一个备份解决方案。

I don't think it's relevant anymore in terms of performance or for any practical reason.

Just be aware that RAID1 may only save you in case of a hardware fault. It's not a backup solution.

请帮我爱他 2024-07-21 12:47:24

我同意您的托管公司的观点。

总是使用分区来将“我的东西”与操作系统分开。 我认为最糟糕的是操作系统会被搞砸,我必须格式化并重新安装它,而且我不想丢失任何数据。 我通常格式化留下一个分区,以便我可以安装第二个操作系统。

我在 LINUX 和 Windows 系统上都这样做,尽管事实证明它在 Windows 上比在 Linux 上更有价值。 (我总是准备一个重复的 Windows 操作系统安装来整理主操作系统!)。

顺便说一句,如果您想充分利用磁盘的性能,那么应该意识到数据存储的位置会影响读/写时间 - 最多可达 2 倍。您可以利用这一点,例如,通过将磁盘格式化为 3 个分区。 “第一”的速度会比“第三”快

I agree with your hosting company.

I always use partitioning to separate "my stuff" from the operating system. I assume the worst which is that the operating system will get screwed up to the point I will have to format and reinstall it and I dont want to lose any of my data. I usuaal format leaving a partition so that I can install a second operating system.

I do this on both LINUX and Windows systems although it has proved to be valuable on Windows many more times than for Linux. (I always have a duplicate Windows OS installation ready to sort out the main one!).

BTW if you are trying to get the most performance out of your disks then should realize that the place that data gets stored effects the read/write times -- by up to factor of 2. You can take advantage of this, for example, by formatting a disk into 3 partitions. The speed of the "first" will be faster than the "third"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文