3

When I run the command df -h on my new Ubuntu linux vServer I get the following:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdv1             466G   33G  434G   7% /
none                   16M     0   16M   0% /tmp

Running du -sh gives

# du -sh 
du: cannot access `./proc/13624/task/13624/fd/4': No such file or directory
du: cannot access `./proc/13624/task/13624/fdinfo/4': No such file or directory
du: cannot access `./proc/13624/fd/4': No such file or directory
du: cannot access `./proc/13624/fdinfo/4': No such file or directory
952M    .

The VPS should only have 5Gb of disk space but df reports 466Gb. How can I view the correct amount of disk space?

Rincewind42
  • 133
  • 5
  • Did you fsck this FS?Are you sure is not dirty and consistent? –  Sep 22 '12 at 05:37
  • What does du -h report? – Tola Odejayi Sep 22 '12 at 05:44
  • 1
    5gig of disk is nothing.. maybe they have a typo on their pricing page and left off two 0's – Mike Sep 22 '12 at 05:57
  • @Mike, 5Gb should more than enough to run the services I plan to run. Why pay for more? – Rincewind42 Sep 22 '12 at 14:27
  • what you probably have then is a shell access to a chroot environment not a real vps. Most modern linux distro's are going to install to around 4-5gigs which leaves you with no space – Mike Sep 22 '12 at 16:00
  • @Mike You'd be surprised, based on the answer below I have an Ubuntu Linux install with a LAMP set-up and three websites running in less than 1Gb. Much of the 5Gb of a regular linux install is for the GUI and other stuff which I don't. – Rincewind42 Sep 23 '12 at 14:02

2 Answers2

2

Isn't /dev/hdv1 a tip that your VPS is actually just a Linux vServer container?

If that's the case, the df output is very much correct. Your VPS is actually just a group of processes isolated from other users processes, think it is similar to FreeBSD jails or Solaris Zones. One kernel, one underlying operating system, different 'OS instances' running in their own silos. Because of that, df returns the host OS free disk, not your guest instance; your guest instance is just another directory under the host OS, not a disk image.

This sure is not true virtualization or even para-virtualization, but a very light-weight and effective solution from the hosting company point of view. Back in the day I had 30 different 'operating systems' running under one 1 GHz P4 Xeon + 1 GB RAM + 140 GB HD, mimicing the production environment I was administering then. No sweat, though no huge processes either, relatively small MySQL instance and an OpenLDAP instance being the biggest hogs.

EDIT: Whoops, forgot to answer your question! :D Just use du -sm and see the total amount of used space. It seems that you have 952 MB in use, so about 4 GB free. I think there's no other way to see how much you still can use, unless quota reports you something.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
  • You are correct, the website does call the service a Linux vServer. It is efficient for the host and that of course passes on to the customer as it is cheap for me to buy. However, you haven't really answered the question at all. How do I measure how much space is available to use? – Rincewind42 Sep 22 '12 at 14:22
0

what does fdisk -l show? I seem to recall some bug like this in VMware ESXi that was fixed by a patch, but I'm not able to find it now. Would you know what the host OS is, and are you able to reboot that? If you're not the admin of the host, maybe someone gave you more storage by mistake?

user16081-JoeT
  • 1,948
  • 11
  • 18