VMware Cloud Community
lucheman
Enthusiast
Enthusiast

simple linux question

(please excuse my windows admin background!)

On an ESX 3.0.2 server, how can I find the size of a filesystem or partition like root or var or whatever the default ones are that exist when you install ESX 3.0.2 with the default selections? Also, how can I find the used space and free space in them? I am just looking for the commands to run from the service console. What is the difference between a filesystem and a partition in Linux? (sorry again!)

Reply
0 Kudos
4 Replies
BigHug
Enthusiast
Enthusiast

Try df or vdf. man df to get the manual pages. Filesystem and partiion in linux are the same as in Windows. Filesystems are ext2/ext3 vs ntfs/fat. Partition is just part or slice of disk.

lucheman
Enthusiast
Enthusiast

Thanks!

Is there also a command to change the size of a filesystem or partition?

Reply
0 Kudos
esiebert7625
Immortal
Immortal

Here's a few useful commands to use on the Service Console related to disk and file info...

• "df -h" will show drive and space information (no vmfs volumes though). The -h will tell it to show the disk information in human-readable format, e.g. 1.9G instead of 1967156

• "fdisk -l" will display information about disk partitions

• "cat /proc/scsi/scsi" will show SCSI device information

• "vdf -h" is a VMware specific command and will show vmfs volumes and space. The -h will tell it to show the disk information in human-readable format, e.g. 1.9G instead of 1967156

• "ls -l" will show detailed file information including size, permissions, owner, last modified

• "ls -sh" will show basic file and size information

• "du -h" to show total disk usage for a directory

• Finding text inside a file, ie. search for the string tool.syncTime in all the vmx files:

o find -name '*.vmx' -type f -print0 | xargs -0 grep "tools.syncTime" /

• Finding files, ie. search for all virtual disk files that have -flat.vmdk in the filename:

o find -iname "*-flat.vmdk" -ls

Also good Linux resources for Windows Admins:

Windows to Linux roadmap - http://www-128.ibm.com/developerworks/linux/library/l-roadmap.html

From DOS/Windows to Linux HowTo - http://www.tldp.org/HOWTO/DOS-Win-to-Linux-HOWTO.html

Universal Command Guide for Operating Systems - http://www.allcommands.com/

CTDP Linux User's Guide - http://www.comptechdoc.org/os/linux/usersguide/

Linux Resource Guide - http://www.comptechdoc.org/os/linux/

Alphabetical Directory of Linux Commands - http://www.oreillynet.com/linux/cmd/

Unix/Linux Help - http://www.computerhope.com/unix.htm

Reply
0 Kudos
BigHug
Enthusiast
Enthusiast

Same as Windows. You have to blow it away and recreate it. However, you can't do it on c: drive or root (or other system directories.) You can use a live cd such as gparted. For esx, just re-install it. It will be faster to rebuild it than download/burn a live cd and learn how to use it.

Reply
0 Kudos