[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Relabel partition didn't work





On 4/5/07, Bob McGowan <bob_mcgowan@symantec.com> wrote:
Manon Metten wrote:
> On 4/5/07, *Douglas Allan Tutty* <dtutty@porchlight.ca
> <mailto:dtutty@porchlight.ca>> wrote:
>
>     On Thu, Apr 05, 2007 at 07:06:51AM -0500, Manon Metten wrote:
>      > Linux debian 2.6.18-4-486 #1 Mon Mar 26 16:39:10 UTC 2007 i686
>     GNU/Linux
>      >
>      > I want to change the name and access point of a partition on my
>     second hd.
>      > It's labeled /xyz now (coz I could think of no better name when
>     installing
>      > etch).
>      > I tried this:
>      >
>      > e2label /dev/hdb4
>      > xyz
>      > e2label /dev/hdb4 store
>      > e2label /dev/hdb4
>      > store
>      > So seemingly the label has changed.
>      > I edited /etc/fstab accordingly:
>      >
>      > changing  /dev/hdb4
>     /xyz            ext3    defaults        0       2
>      >           to  /dev/hdb4       /store         ext3    defaults
>      > 0       2
>      >
>      > Then I rebooted, only to find this message popping up during boot
>     time:
>      >
>      >   mount: mount point /store does not exist
>      >
>      > There was no further error during boot time and kde was up and
>     running.
>      > Then I'd reset everything and could mount and access /xyz as before.
>      >
>      > What did I do wrong and how do I change /xyz to /store?
>
>     You're confusing disk lables with mount points.  Your fstab doesn't
>     have
>     disklables in it.  You told mount to mount /dev/hdb4 on /store, so it
>     looks for the directory /store, which doesn't exist.
>
>     So backup:
>
>     What are you trying to do?
>
>     Doug.
>
>
>
> Hi Doug,
>
> After fiddling around with sarge for some months, I installed etch a
> couple of weeks ago.
> I've done lots of reading and I'm following this list for a while, but
> I'm new to debian anyway.
>
> I have 4 partitions on my 2nd hd, swap, /tmp, /var & /xyz.
> /xyz is the 4th primary partition on my 2nd hd.
> When installing etch, at some point partman asked for a mount point for
> that partition and I entered /xyz.
>
> I use this xyz partition only to store some .iso's and other large
> files, so I want rename/relabel it to /store. If I do mkdir /store, that
> would create the dir/mount point on my 1st hd where / is located
> (correct?). Thus the question is: how to change /xyz to /store on my 2nd
> hd, so I can do eg. something like this:
>
>   mv  ~/*.iso  /store
>
> so it moves *.iso from ~ on my 1st hd to /store on my 2nd hd.
>
> Greetings, Manon.
>
>
> @ Joe Heart
>  > What in the world is e2label?  It doesn't show up in my search.
> I fould e2label in /sbin, read the man and tried to use it.
>
>  > What is it today, national "People from other distros" day?
> Huh? Sounds like a warm 'welcome to debian' to me.
> I guess you don't have the monopoly of wisdom too.
>
> BTW: it's SHE, not he.
>
> Anyway, greetings to you too, Manon.

Hi, Manon,

There's nothing to do to the second hard disk.  Think of the mount point
as directions to the kernel on where to go look for a disk.  But this is
a logical reference to a physical device.  So, first, some background on
devices.

Generally, the device names are pretty much fixed in a system, over time
(this does not hold very well for SCSI devices, particularly when using
pluggable storage such as USB, but that's another story).  So, for a
pair of IDE type hard disks, you will have the device names 'hda' and
'hdb'.  The partitions on these devices then add numbers to the basic name:

        hda1    hdb1
        hda2    hdb2

And so on.  The above is complicated by the presence of an extended
partition, but it doesn't sound like you have one.  So, for your 2nd
hard disk, you should have disks named 'hdb1', 'hdb2', 'hdb3', 'hdb4'.

These are names the system gives to the devices, which can be found in
the /dev directory.  These names have nothing to do with labels.  Debian
will, by default, make labels for disks based on the mount point given
during installation.  Anything done after that will not get a label
unless you put one on it.

And though labels can be used to help get around the pluggable device
problem mentioned above, the default setup just uses the disk names and
directory mount point names.

This next piece can be a bit confusing, but I think is essential to
understanding how all this works:  Each and every disk partition has its
own 'root' directory.  This is what users of DOS/Windows systems have to
put up with:  C: has a \, D: has a \, A: has a \, on and on....

This is hidden in unix/linux systems by mounting.  What a mount does is
to tell the kernel that when a mount point is accessed on disk1, move to
disk2 root and process from there.  This might look better as a simple
picture:

         BootDisk                               HardDisk2
            /                     point)----->      /
         etc  usr      ----(mount              bob jim jane

What you work with is simply /usr/bob or /usr/jane, without concern for
which disk it's on.

So, you want to change the mount point?  Create a directory (store in
your case) somewhere in the filesystem.  Others have suggested /mnt or
/media, but there are really no restrictions on where it goes, put it
where it makes logical sense to put it.

Edit /etc/fstab and find the current mount point, change it to 'store'
and your done.  The name of the disk does not change and so it will now
mount in the new location on your next boot.

If you want it to move now, without rebooting, do, as root:

     umount /xyz
     mount /store

And you're done.

Sorry for the long winded explanation, I'm too much the teacher at heart.

Bob


Hi Bob,

Thanks for your detailed explanation. I appreciate it very much.
Hope I understand it better now:

/xyz is a logical mount point that I can use to access my physical partition /dev/hdb4 - correct?
Whatever name for a mount point I choose to access /dev/hdb4, no physical changes to my 2nd hd are made - correct?

If I wanted, /xyz could be an mount point to any other physical (or logical) partition on whatever hd I want. I just have to change fstab accordingly - correct?


So I changed fstab, rebooted and found /xyz  to be changed to /store.
fstab says:  /dev/hdb4       /store            ext3    defaults        0       2
I have access now to /dev/hdb4 by means of the logical mount point /store.

The odd thing however is, when I type 'ls /' /xyz as well as /store show up, although /xyz is not mounted of course. How do I get rid of this /xyz statement (and where does it come from)?

Greetings, Manon.



@ Joe Hart

> ... I already explained where that statement came from.  I apologize.
No offense taken.

>> BTW: it's SHE, not he.
> I left off a letter and you added one.  Let's call it even.  OK?
> (s)he / h(e)art.
Deal!

> I went through this problem ... Call it a male chauvinist language.
You make me laugh. It sounds like my dad.
Except for my mom, the rest of the world is considered male :-)

> ... and said she when it should have been it ...
Huh, IT? I know HE, SHE and ET, but no IT. What planet does IT come from?

Greetings, Manon.


Reply to: