Проверка серверного пространства в CentOS 6.5; это добавлено в папку или всю систему?

1062
testermaster

У меня есть сервер CentOS 6.5. На этом сервере был жесткий диск с «Х» ГБ пространства. Затем системный администратор добавил больше пространства через vSphere . Это дополнительное пространство доступно в любой папке или только в определенной папке? Могу ли я проверить это? У меня есть доступ по SSH.

Например, на ПК с Windows, если у меня есть два жестких диска, 1-й диск C:(10 ГБ), 2-й диск D:(10 ГБ), я не могу поместить файл размером 15 ГБ в папку на диске C:. Это возможная ситуация на сервере?

0

1 ответ на вопрос

1
JakeGould

I have a CentOS 6.5 server. This server had an hard disk with “X” GB of space. Then the system administrator added more space via vSphere. Is this additional space is available in any folder or only in a specific folder?

Generally, when more space is added to a virtual machine—which is what vSphere manages—that space is not per directory or on a new device, but rather the whole primary volume connected to that virtual machine is expanded. So unless there is something really idiosyncratically different about the way your vSphere virtual machine is setup, I am pretty confident that the primary volume of the virtual machine was expanded.

Is there anyway I can check this? I have SSH access.

Sure. Just SSH into the server and run df with the -h flag like this:

df -h 

The output will show you all of the free disk space in human readable form; that is what the -h flag is for. For example, on an Ubuntu system I have access to df -h shows me this info:

Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.8G 2.4G 5.0G 33% / udev 269M 12K 269M 1% /dev tmpfs 59M 184K 59M 1% /run none 5.0M 0 5.0M 0% /run/lock none 295M 0 295M 0% /run/shm 
  • Filesystem: The actual partition/filesystem. Not what you would access directly. That would be via “Mounted on” see below.
  • Size: The size of the volume.
  • Used: How much space is used on the volume.
  • Avail: How much space is available (free) on the volume.
  • Mounted on: The actual path where the filesystem is mounted on.

And in this example, the only area a basic, non-systems administrator user would need to really care about is the root space mounted on /; the items mounted to /dev, /run and /run/shm are mount points used by the core Linux system which are not really the concern of the casual system user.

For example, on a Windows PC if I have two hard disks, 1st disk C: (10GB), 2nd disk D: (10GB), I can’t put a file of 15GB in a folder in disk C:. Is this a possible situation on a server?

Well, the scenario you are talking about there is adding another hard drive to a Windows system. Which in many cases is the way Windows system administrators like to expand space on volumes simply because that’s part of—for lack of a better term—“Windows mindset.”

Technically speaking one can add an additional volume to a Linux system or any system including Mac OS X. But that’s not really standard operating procedure for expanding space on a Linux server; that is simply attaching another volume to an existing server. System administrators might attach a new volume to an existing device if they deem it a more sane/stable way to deal with system issues but if they did that they would very clearly tell you where the mount point is and even explain why they did that.

Прежде всего, спасибо за ответ. В нем говорится, что у меня есть X ГБ пространства, смонтированного в `/`, а затем новый ГБ пространства, смонтированного в `/ DATA`. Это означает, что я могу использовать только эту папку для нового пространства? У меня также есть две другие строки размером менее 1 ГБ, смонтированные в `/ dev / shm` и` / boot`, но я не уверен, что это что-то полезное для этой ситуации. Что означает колонка «файловая система»? testermaster 9 лет назад 1
@testermaster Я отредактировал свой ответ, чтобы показать пример вывода `df -h` и предоставить рекламное объяснение информации, которую вы увидите из него. «Файловая система» - это не то, на что вы бы обратили внимание. Для пользователя важна точка монтирования, указанная в разделе «Установлено». Так что, если системный администратор дал вам больше места в `/ DATA`, это, скорее всего, новый том, который системный администратор подключил к системе CentOS; мои правки до конца объясняют концепцию. Поэтому, если вы хотите воспользоваться этим новым пространством, вам нужно записать свои файлы в `/ DATA`. Что касается `/ dev /` и `/ boot /`, не беспокойтесь об этом. JakeGould 9 лет назад 0

Похожие вопросы