How do I know /usr directory is on /usr partition?

How do I know /usr directory is on /usr partition?

Post by Fred Hanson » Tue, 16 Jun 1998 04:00:00




> I installed w. RH5 using the Disk Druid tool and created 3 partitions
> (and a swap partition)  called      /        /usr       /home

> How do I know that my  /usr  directory is on the  /usr partition?
> (and same for  /home directory on  /home partition  )

> Did Disk Druid automatically assign these?  I don't recall doing anything
> to specifically put these directories on those partitions.

> How can I know which partition my:   /bin  /etc  and  /var directories are on?

Try the "mount" and "df" commands with no arguments. They should
which directories your partitions are mounted at.  Note that if you
unmounted, say, your "/usr" partition (DONT DO IT; IT WOULD BE VERY BAD),
there would still be a "/usr" directory which would be on the partition
that holds "/" and there might even be files in "/usr" which are hidden
when there is a partition mounted there.

Quote:

> When I do:  ls -l  from  /
> it is showing  all the top directories at root,
> and doing:  view  /etc/fstab
> shows:   /usr    on  /dev/hda5   and   /home   on  /dev/hda6

> BTW...(for the sake of discussion) instead of calling these partitions the
> same names as the directories,  could I have called them  something arbitrary
> like:      /     /red    /blue    ?

> BTW2:   What's the main reason for the multiple partition tactic?
> Easier emergency recovery?

Read long answer at http://www.pathname.com/fhs/

Quote:> Is doing it all with one big  / partition (with a separate swap partition)
> really all that bad for a simple single-user desktop system?   What potential
> problems are there running the whole directory tree on one  /  partition?
> (for a single-user box, that is)

Assuming single-user: One partition is fine.  Some folk like to keep
all the stuff they load from the OS installation CD separated from the
stuff they load from elsewhere (eg Internet) so they can be sure an
OS upgrade won't wipe out the stuff they've hand crafted. Using multiple
partitions makes the separation easy and sure.
 
 
 

How do I know /usr directory is on /usr partition?

Post by Sid Boyc » Thu, 18 Jun 1998 04:00:00



> > I installed w. RH5 using the Disk Druid tool and created 3 partitions
> > (and a swap partition)  called      /        /usr       /home

[barrabas:/pub/ham/z8530]# mount
/dev/hda2 on / type ext2 (rw)
none on /proc type proc (rw)
bumble:/ on /mntb type nfs (rw,rsize=8192,wsize=8192,addr=10.0.0.3)
        "mount" will list them all. From my other machine.....
/dev/hda2 on / type ext2 (rw)
none on /proc type proc (rw)
/dev/sda1 on /usr2 type ext2 (rw)
10.0.0.1:/ on /mntb type nfs (rw,rsize=8192,wsize=8192,addr=10.0.0.1)
/dev/fd0H1440 on /mnt0 type msdos (rw)

Quote:> > How do I know that my  /usr  directory is on the  /usr partition?
> > (and same for  /home directory on  /home partition  )

> > Did Disk Druid automatically assign these?  I don't recall doing anything
> > to specifically put these directories on those partitions.

> > How can I know which partition my:   /bin  /etc  and  /var directories are on?

> > When I do:  ls -l  from  /
> > it is showing  all the top directories at root,
> > and doing:  view  /etc/fstab
> > shows:   /usr    on  /dev/hda5   and   /home   on  /dev/hda6

> > BTW...(for the sake of discussion) instead of calling these partitions the
> > same names as the directories,  could I have called them  something arbitrary
> > like:      /     /red    /blue    ?

        That's correct, they are all under "/".

Quote:> > BTW2:   What's the main reason for the multiple partition tactic?
> > Easier emergency recovery?
> > Is doing it all with one big  / partition (with a separate swap partition)
> > really all that bad for a simple single-user desktop system?   What potential
> > problems are there running the whole directory tree on one  /  partition?
> > (for a single-user box, that is)

> > Thanks!

        I've heard the argument about recovery, but my experience is that if you are
writing to them all on the same physical HD and you have a rogue controller,
they'll all get trashed. I also contend that sooner or later you'll end up with
symlinks going everywhere when say /usr gets filled up. I found this happening
on friends' machines and also ran across it on SUN, you should have seen these
guys figuring out where the space was to put stuff and symlinking if the
particular partition/directory was a must. I use one for / and another for swap,
also these days you can do backups easily to tapes etc.
Regards
--
... Sid Boyce...Amdahl(Europe)...44-121 422 0375
                   -----------------------------------
Any opinions expressed above are mine and do not necessarily represent
 the opinions or policies of Amdahl Corporation.

 
 
 

How do I know /usr directory is on /usr partition?

Post by Rolf Magnu » Fri, 19 Jun 1998 04:00:00


 > How do I know that my  /usr  directory is on the  /usr partition?
 > (and same for  /home directory on  /home partition  )

mount

 > How can I know which partition my:   /bin  /etc  and  /var
directories are on?

If you don't give them extra partitions, they are on the / partition.
Files are on the partition where the directory is on, unless the
directory is a
mount point.

 > and doing:  view  /etc/fstab
 > shows:   /usr    on  /dev/hda5   and   /home   on  /dev/hda6

Well, this shows where your partitions are (or at least where your
system
trys to mount them at startup).

 > BTW...(for the sake of discussion) instead of calling these
partitions the
 > same names as the directories,  could I have called them  something
arbitrary
 > like:      /     /red    /blue    ?

The partitions are not called the same as your directories. They are
called
/dev/hda5 and /dev/hda6 . What you are talking about is not the name,
but the
directory where they are mounted.

 
 
 

How do I know /usr directory is on /usr partition?

Post by Jerome Mroza » Sat, 04 Jul 1998 04:00:00



> > > BTW2:   What's the main reason for the multiple partition tactic?
> > > Easier emergency recovery?
> > > Is doing it all with one big  / partition (with a separate swap partition)
> > > really all that bad for a simple single-user desktop system?   What potential
> > > problems are there running the whole directory tree on one  /  partition?
> > > (for a single-user box, that is)

> > > Thanks!

>         I've heard the argument about recovery, but my experience is that if you are
> writing to them all on the same physical HD and you have a rogue controller,
> they'll all get trashed. I also contend that sooner or later you'll end up with
> symlinks going everywhere when say /usr gets filled up. I found this happening
> on friends' machines and also ran across it on SUN, you should have seen these
> guys figuring out where the space was to put stuff and symlinking if the
> particular partition/directory was a must. I use one for / and another for swap,
> also these days you can do backups easily to tapes etc.
> Regards
> --
> ... Sid Boyce...Amdahl(Europe)...44-121 422 0375
>                    -----------------------------------
> Any opinions expressed above are mine and do not necessarily represent
>  the opinions or policies of Amdahl Corporation.

Hello!  I'm a Linux newbie planning my first install.  I've been told by
my (RedHat) install manual about physical partitions (hdb0 thru hdb4?
5?) and logical (above that).  You've voiced an opinion that everything
might as well go onto two partitions.  Could the /swap be a logical
partition, or is there good reason for it being physical?

Now that I think about this, what does it mean to have a logical
partition?

Jerome.
--
Jerome Mrozak                     goose  -at-  mcs  -dot-  net
Sun Certified Java Developer & Programmer

 
 
 

How do I know /usr directory is on /usr partition?

Post by Alexander Vi » Sat, 04 Jul 1998 04:00:00




Quote:

>Hello!  I'm a Linux newbie planning my first install.  I've been told by
>my (RedHat) install manual about physical partitions (hdb0 thru hdb4?
                                                          ^--1
>5?) and logical (above that).  You've voiced an opinion that everything
>might as well go onto two partitions.  Could the /swap be a logical
>partition, or is there good reason for it being physical?

>Now that I think about this, what does it mean to have a logical
>partition?

It means that DOS-compatible partition table can hold only 4 elements
(yes, it sucks). So if you want to have more than 4 partitions you have
to use Dirty Hack (tm) - mark one of the partitions as 'container' and put
there an extension of parition table. Logical partitions are ones inside
of the 'extended' (aka container) partition. So, for the setup with 7
pieces you may obtain the following picture:
<------------------------------------------------------------> whole disk
*<--#1--><--#2--><-------------container--------------------->
                 *<--#3--><------------container------------->
                          *<--#4--><------container---------->
                                   *<--#5--><---container---->
                                            *<--#6--><-cont.->
                                                     *<--#7-->
Numbered beasts are useful partitions. Containers are, well, containers.
Asterisks (*) are partition tables. From the OS point of view logical
partitions are as good as primary ones - they are (non-overlapping) chunks
of the disk and that's all that matters. There's 5 idiotic restrictions
on the partitioning:
        1) No more than 4 on the top level (partition table is _small_)
        2) No more than one container (or DOS will get mad; Linux doesn't
care)
        3) Container can hold either single logical partition or logical
partition and container (or DOS will get mad).
        4) If DOS sees a non-DOS partition within the container it decides
that the rest of container also is non-DOS. So put all DOS ones in front
of Linux ones.
        5) DOS will get mad if you'll put two DOS partitions on the top
level.
Sigh... Kudos to IBM and Microsoft - it's their kludge. Linux have to use
the same structure, so (1), (2) and (3) still hold, but (4) and (5) are
DOS-only. Linux doesn't care whether your partion is logical or primary.
So nothing prevents you from putting swap on a logical partition.
                                                        HTH. HAND,
                                                                Al
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a real computer" - Dilbert.