Checking server space in CentOS 6.5; is it added to a folder or the whole system?

0

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

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?

testermaster

Posted 2015-03-10T01:24:12.853

Reputation: 313

Answers

1

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.

JakeGould

Posted 2015-03-10T01:24:12.853

Reputation: 38 217

1First of all thanks for the reply. It says that I've the X GB of space mounted on /, then the new Y GB of space mounted on /DATA. This means that I can use only this folder for the new space? I've also other two rows of less than 1gb mounted on /dev/shm and /boot, not sure if this means something useful for this situation. What does the "filesystem" column stands for? – testermaster – 2015-03-10T02:30:36.633

@testermaster I edited my answer to show an example of the output of df -h and provide ad explanation of the info you will see from it. The “Filesystem” is not something you would pay attention to. What matters to a user is the mount point indicated on “Mounted on.” So if your system admin gave you more space in /DATA that is most likely a new volume the system admin attached to the CentOS system; my edits to the end explain the concept. So if you wanted to take advantage of that new space you need to write your files to /DATA. As for /dev/ and /boot/ don’t worry about it. – JakeGould – 2015-03-10T02:40:08.777