Page 1 of 3 123 LastLast
Results 1 to 10 of 28

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

  1. #1
    jdd NNTP User

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

    Hello :-)

    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

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,735

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

    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
    Code:
    df -h | grep '/dev/sd'
    will give you what I think you want.

    3) when you want to now about what is mounted where and with what parameters you use
    Code:
    mount
    4) 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.

    5) 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).
    Henk van Velden

  3. #3
    jdd NNTP User

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

    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 :-(

    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

  4. #4
    Join Date
    Jun 2008
    Location
    Kansas City Area, Missouri, USA
    Posts
    7,236

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

    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 :-(
    >
    > 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

    Code:
    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.


  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

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

    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 :-(
    >
    > 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)

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,735

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

    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
    Code:
    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.
    Henk van Velden

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

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

    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)

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,735

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

    My 11.4 system.
    Code:
    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:
    Code:
    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.
    Henk van Velden

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

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

    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)

  10. #10

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

    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
    Code:
    halinfo -u
    halinfo -uv
    halinfo -uV
    depending on verbosity.
    Add 'c' for colour output.
    Currently mounted partitions are indicated by a star.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •