On 07/12/2011 01:05 AM, Patrick wrote:
Keep in mind that, this being unix, there's no "drives" so if you will probably be checking the amount of space on root if you don't think about it.
There most certainly are drives in unix. Not drive letters, though. The drives are normally denoted either by their device special file, such as /dev/md127, or by their mount points, such as /u0.
Here is a list of everything mounted on one particular system. vagn@nika:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 28G 9.3G 17G 36% / tmpfs 7.9G 0 7.9G 0% /lib/init/rw udev 7.9G 324K 7.9G 1% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm /dev/md127 2.7T 846G 1.8T 33% /u0 /dev/mapper/udisks-luks-uuid-3bb2bdd5-1b84-49b4-abe8-4a107f174702-uid1000 15G 7.9G 6.2G 56% /u0/home/vagn/s5 /dev/mapper/udisks-luks-uuid-d5ff5dbd-053b-48a7-b3ee-4f71a2e5c2fb-uid1000 2.7T 855G 1.8T 33% /bu02 /dev/sr0 6.8G 6.8G 0 100% /media/cdrom0 And here is the listing of one drive by device: vagn@nika:~$ df -h /dev/md127 Filesystem Size Used Avail Use% Mounted on /dev/md127 2.7T 846G 1.8T 33% /u0 vagn@nika:~$ And the same by mount point: vagn@nika:~$ df -h /u0 Filesystem Size Used Avail Use% Mounted on /dev/md127 2.7T 846G 1.8T 33% /u0 See man pages for stat, statvfs or statfs for details. Also, the stat command is interesting: vagn@nika:~$ stat -f -c "freeblocks on /u0 = %a" /u0 freeblocks on /u0 = 462905880 vagn@nika:~$ bc <<. 462905880 * 4 . 1851623520 vagn@nika:~$ df /u0 Filesystem 1K-blocks Used Available Use% Mounted on /dev/md127 2884294872 886157536 1851623520 33% /u0 -- vagn -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.