knowing the actual partition use (df do not answer anymore)

Hello :slight_smile:

I used to know what was the disk use by “df -h”. But right now it’s no more really informative. Specially, df do not anymore list root (/) but a virtual rootfs!

example.

I not always trust /etc/fstab (in case grub was launched manually)

thanks
jdd

  1. *df *is for showing the size of filesystems and how much of it is used. While it also shows some other information (lik the partition if that is applicable), df is not about which partition is mounted where.

  2. when you have superfluous lines in the output, you can pipe it through grep to get rid of them. In this case

df -h | grep '/dev/sd'

will give you what I think you want.

  1. when you want to now about what is mounted where and with what parameters you use
mount
  1. I do not quite understand waht you mean with “I not always trust /etc/fstab (in case grub was launched manually)”.* /etc/fstab* is mainly the configuration file about what must be mounted by the system at boot time. As configuration file it does not show you the present situation of what is mounted, but only what should be done at predefined moments in time. I fail to see how GRUB enters this story.

  2. It is still not clear to me if you want any help with anything. There is not even a ? anywhere in your post. But I hope I have given you some information on the use of the tools you mentioned (and reading their man pages is also very useful).

thanks.

I have several distros on the same disk, so fdisk -l don’t says wich one is booted.

11.1 df said (other disk):

df -h
Sys. de fich. Tail. Occ. Disp. %Occ. Monté sur
/dev/hda1 20G 2,1G 17G 12% /
udev 484M 80K 484M 1% /dev
/dev/hda6 20G 10G 8,3G 55% /home
/dev/hda7 20G 33M 19G 1% /extra
/dev/hda8 170G 24G 138G 15% /data
/dev/shm 484M 24K 484M 1% /dev/shm

11.4 one say

Filesystem Size Used Avail Use% Mounted on
rootfs 10G 4,7G 4,8G 50% /
/dev/root 10G 4,7G 4,8G 50% /
devtmpfs 983M 268K 983M 1% /dev
tmpfs 983M 0 983M 0% /dev/shm
/dev/sda2 50G 11G 37G 24% /home
/dev/sda6 838G 52G 744G 7% /data

and I don’t know what root is mounted (/home and /data are the same)

I simply wondered if there is an option to have the old display. mount gives exactly the same info.

and I just noticed that /dev/root do not exists :frowning:

finally, I have a mounted file system and it’s not listed antwhere?? (my root is /dev/sda1)

fstab is::

/dev/sda1 / ext4 errors=remount-ro 0 1
/dev/sda2 /home ext4 defaults 0 2
/dev/sda3 none swap defaults 0 0

so one can guess root is /dev/sda1, but it’s not true if the boot is not standard

thanks
jdd

On 06/09/2011 09:06 AM, jdd wrote:
>
> thanks.
>
> I have several distros on the same disk, so fdisk -l don’t says wich
> one is booted.
>
> 11.1 df said (other disk):
>
> df -h
> Sys. de fich. Tail. Occ. Disp. %Occ. Mont� sur
> /dev/hda1 20G 2,1G 17G 12% /
> udev 484M 80K 484M 1% /dev
> /dev/hda6 20G 10G 8,3G 55% /home
> /dev/hda7 20G 33M 19G 1% /extra
> /dev/hda8 170G 24G 138G 15% /data
> /dev/shm 484M 24K 484M 1% /dev/shm
>
> 11.4 one say
>
> Filesystem Size Used Avail Use% Mounted on
> rootfs 10G 4,7G 4,8G 50% /
> /dev/root 10G 4,7G 4,8G 50% /
> devtmpfs 983M 268K 983M 1% /dev
> tmpfs 983M 0 983M 0% /dev/shm
> /dev/sda2 50G 11G 37G 24% /home
> /dev/sda6 838G 52G 744G 7% /data
>
> and I don’t know what root is mounted (/home and /data are the same)
>
> I simply wondered if there is an option to have the old display. mount
> gives exactly the same info.
>
> and I just noticed that /dev/root do not exists :frowning:
>
> finally, I have a mounted file system and it’s not listed antwhere??
> (my root is /dev/sda1)
>
> fstab is::
>
> /dev/sda1 / ext4 errors=remount-ro 0 1
> /dev/sda2 /home ext4 defaults 0 2
> /dev/sda3 none swap defaults 0 0
>
>
> so one can guess root is /dev/sda1, but it’s not true if the boot is
> not standard

I’m not sure what your problem is. When I use ‘df -h’ on 11.4, I get


finger@larrylap:~> df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 40G   11G   28G  28% /
udev                  1.5G  184K  1.5G   1% /dev
tmpfs                 1.5G  4.0K  1.5G   1% /dev/shm
/dev/sda7              40G   11G   28G  28% /
/dev/sda3             148G   97G   52G  66% /home
/dev/sda6              37G  5.9G   29G  17% /home2
/dev/sda5              40G  5.6G   33G  15% /suse113_32bit
/dev/sda1              40G   18G   20G  49% /susse113_64bit

Other than the entry for rootfs, it looks very much like the output of earlier
versions.

Like I said earlier and like @lwfinger says also, we are not sure what your problem is.

Also saying that there is no /dev/root is strange, as I have

henk@boven:~> l /dev/root
lrwxrwxrwx 1 root root 4  9 jun 15:49 /dev/root -> sda2
henk@boven:~>

And that brings me to the following: when you want me to read your computer output, then please put it between CODE tags: Posting in Code Tags - A Guide

So please tell us what your problem is, else I am afraid most will give up posting on your thread.

On 2011-06-09 16:06, jdd wrote:

> 11.4 one say
>
> Filesystem Size Used Avail Use% Mounted on
> rootfs 10G 4,7G 4,8G 50% /
> /dev/root 10G 4,7G 4,8G 50% /

Yes, it is a nuisance.

> I simply wondered if there is an option to have the old display. mount
> gives exactly the same info.

Not here:

/dev/sda7 on / type ext3
(rw,relatime,errors=continue,user_xattr,acl,commit=15,barrier=1,data=ordered)

>
> and I just noticed that /dev/root do not exists :frowning:
>
> finally, I have a mounted file system and it’s not listed antwhere??

By the command “mount”.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2011-06-09 16:31, Larry Finger wrote:
> Other than the entry for rootfs, it looks very much like the output of
> earlier versions.

That is the point, that the text for “/” has disapeared, it is not possible
to see the actual partition that holds “/”. What is the point of showing
“rootfs” instead of the real device? What do we gain with that?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

My 11.4 system.

henk@boven:~> df -h
Bestandssysteem       Grtte Gebr Besch Geb% Aangekoppeld op
rootfs                 20G  4,2G   15G  23% /
devtmpfs              487M  352K  486M   1% /dev
tmpfs                 492M  2,6M  490M   1% /dev/shm
/dev/sda2              20G  4,2G   15G  23% /
/dev/sda3              92G   49G   43G  54% /home
/dev/sda5              20G  5,5G   14G  30% /mnt/oldsys
/dev/sda6              99G   49G   46G  52% /mnt/oldsys/home
henk@boven:~>

I see two lines line for /, where one is the one you are looking for.
And as I suggested earlier:

henk@boven:~> df -h | grep '/dev/sd'
/dev/sda2              20G  4,2G   15G  23% /
/dev/sda3              92G   49G   43G  54% /home
/dev/sda5              20G  5,5G   14G  30% /mnt/oldsys
/dev/sda6              99G   49G   46G  52% /mnt/oldsys/home
henk@boven:~>

weeds out all lines you do not like.

On 2011-06-09 17:06, hcvv wrote:
> Like I said earlier and like @lwfinger says also, we are not sure what
> your problem is.

Obvious: that df output is not clear, in regard to the root partition.

> Also saying that there is no /dev/root is strange, as I have

Yes, but on some systems it prints “/dev/root”, and in others it prints
“rootfs”. No clue in df output what partition is that.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

You can try halinfo with the option -u to query udev (doesn’t use hal at all in this case).
See explanation and screenshot here: Displaying partitions infos from hal daemon
The latest version is available here: http://unixversal.com/linux/openSUSE/halinfo203.tgz
Possible syntaxes are

halinfo -u
halinfo -uv
halinfo -uV

depending on verbosity.
Add ‘c’ for colour output.
Currently mounted partitions are indicated by a star.

Apparently I am still guessing what the question is. All the information about the real partitions is there and my second statement shows them on their own. Isn’t that what is searched for?

Well, I know what you’re going to say: it doesn’t show the mount points. I could add a column with the mount points of mounted filesystems. If the filesystem is not mounted, udisks doesn’t have this information: the output of

udisks --show-info /dev/sdaX | grep 'mount paths'

would be empty in this case.

On 2011-06-09 20:36, hcvv wrote:

> I see two lines line for /, where one is the one you are looking for.
> And as I suggested earlier:

> weeds out all lines you do not like.

Mmmm…


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

What about:

df -hl -t ext4 -t ext3

?

Yes, nice one!

On 2011-06-09 21:36, please try again wrote:
>
> robin_listas;2351381 Wrote:

> What about:
>
> Code:
> --------------------
> df -hl -t ext4 -t ext3
> --------------------

Nice try, but I also have xfs and reiserfs, plus the sporadic vfat or ntfs.
Ah, and isosomething. Too complex :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Ha! ha! And I do have ufs1 ufs2 and btrfs … and the same 250 MB FAT16 partition with half a dozen DOS bootsectors I keep copying on all computers for over 15 years … But I’m using halinfo to see a big picture of my 50 to 60 partitions :wink:

df -hl 2>/dev/null | sed -n '/^\/dev/p'

On 2011-06-09 21:06, hcvv wrote:
> Apparently I am still guessing what the question is.

Language barrier. Maybe the Spanish understand better the French :wink:

> All the
> information about the real partitions is there and my second statement
> shows them on their own. Isn’t that what is searched for?

In the sample he posted, there is rootfs and /dev/root, but not the device
that is “/”, except as you say, that /dev/root is a symlink to the real one.

To me it is a bit confusing (and that is his point, I think). I would
prefer not to see that rootfs entry nor the /dev/root, but the real device.
Not that is real anymore, it is also a symlink.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I didn’t notice… actually :slight_smile:

@jdd, did you originally mean ‘real partition usage’ or ‘current partition usage’?

@hcw, ‘actuel’ in french means ‘current’ and not ‘actual’. This is a common mistake by french speakers.

I allready decided not to post here any more because I though I was talking against a black hole.

When I ask: “What is the real question?” and you think there is a language barrier, why don’t you explain then what the question is?

In the OP’s first post there was not even one question mark (?) and besides that I could not detect anything that would identify a specific technical question. So I asked in my first answer, together with two answers to questions not asked: one giving a way to filter the output of dh to the lines about file systems on physical partitions and the other on seeing what is mounted on which mount point.

The answer to that from the OP were two (badly readable) ouput listings showing the differences he mentionedd allready in post #1 Good illistration, but again no question.

I do not deny there is a dfffrence. It has without doubt to do with a different handling by the system (Kernel) of something. It is the same as the appearance of the devtmpfs and the tmpfs years go. The reason one might most possibly find by going to look for new kernel features/developement.

The thing is there and as (from it’s man page):

df displays the amount of disk space available on the file system containing each file name argument. If no file name is given, the space available on all currently mounted file systems is shown
it shows what it gets when it asks the kernel for the information, most probably in te same way df did for ages. Not dhanged, but the structure in the kernel changed to show new things.

This being as it is, the question is again, what is the real problem of the OP? E.g. if he wants to know on which partition his root file system resides, he could do


henk@boven:~> mount | grep ' / '
/dev/sda2 on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered)
henk@boven:~>

But as he wants something different there will be a different answer. Thus when anybody knows exactly what the OP wants (and I quess the OP know this best), please come foreward. This may make it possible to suggest something that might solve this.