Adding a drive - what is the meaning of the mount point?

I am a relative newbie but I am proud to have figured out in YaST how to partition and format a new SATA drive I just added to my 12.1 system as /dev/sdb1. It appears in the system but I can’t seem to write a file to it.

I am asked in Expert Partitioner to choose a mount point and I don’t seem to be able to select points that already have drives attached to them, like “/” and “/home”. So I chose what it suggested - “/srv”. What is the idea behind attaching a drive to a point in the file structure. This is not like Windoze?

What can I do to make the drive writable?

Thanks. Sorry if these are dumb questions.

George

First to get some basic understanding: SDB:Basics of partitions, filesystems, mount points - openSUSE

I guess, that when you expand your system with more diskspace, you do that for a purpose. It normaly means that youu want (more) diskspace for something. And that determines where you mount it. E.g. mounting on /srv means that you are using /srv for something, most probably you have then a big and important web-site, because that is where /srv is for.

First thing is thus do plan what you are going to do with the new space. And also what role the existing space has in the total plan, must it be reorganised? After that you can make aan action plan for transversion from the old to the new situation (can be very easy or very complicate according to the neeed). You can ask here for suggestions and help of course, but it is you that haas to make the decissions.

I see it is more complicated. Thank your for the reference. I am reading it.

On 2012-03-13 14:06, georgeinacton wrote:
>
> I see it is more complicated. Thank your for the reference. I am reading
> it.

It is easy, really :slight_smile:

A mount point is an empty directory anywhere in the filesystem where you
want a “drive”, a partition to appear. It has to exist, it should be empty
(if it is not, the contents will disappear from sight, but not deleted).

In Windows, a partition gets automatically a letter, like D:. In Linux you
decide the name, and where to put it. Like for example:

/I/want/my/drive/here/

(Recent Windows also has mount points)

So you told Yast to use /srv. Don’t use that location, it is reserved for
servers like apache. Simply type a name you like, like for example “/data”,
or “/home/myname/mydata”

You can change it two ways. One, fire up the yast partitioner and change it
there.

Two, edit the file “/etc/fstab” and change the mount point there. This is
much faster once you know it. You can, for example, run “kdesu kate
/etc/fstab”. The procedure is:


su -
umount /srv
edit the fstab file however you like
md /mountpointthatyouchoose
mount /mountpointthatyouchoose


Cheers / Saludos,

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

Thank you Carlos.

Can I have more than one storage connected to the same attachment point? It seems to me that when I tried to attach to /home, it would not let me do that since there was already a drive there. Is this anything to do with Multipoint?

I tried first in YaST and I could not find how to modify the attachment point. When I select that partition I have the choices under Configure of 1/ Configure iSCSI (which offers to install the iSCSI package - I did not) 2/ Activate Multipath which seems to run but nothing happens and 3/ Provide crypt passwords (which I did not do. I must have done something because the drive is now attached to /media/1b84ccfd-2f15-4a9d-9ec7-dfe43d5878e6
whatever that is?? I will remove the drive and clean it and start again. Maybe if I catch the attachment point the first time, now that you have told me how to do it?

Next I tried your console commands and I get this:

linux-12-1:/home/george # unmount /srv
Error: Try the command: umount
linux-12-1:/home/george # umount /srv
umount: /srv: not mounted
linux-12-1:/home/george # kdesu kate /etc/fstab
kdesu(4147)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application ‘kdesu’ crashing…
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-linux-12-1/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
drkonqi(4148)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
linux-12-1:/home/george #

I am sorry to be such a newbie. Attaching the drive anywhere sounds neat, but not yet easy. Thanks. George

Please do use CODE tags around copied/pasted computer text: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html

And please take attention. You are still endulging in trying to do technical things. But the fisrt and foremost questions is: What do you want to do with that disk, where do you want to add diskspace to your one and only hierarchcal tree of directories and files? When you do not know, we can not help you. As well as in the link I gave you as in the post of Carlos, there are some examples. But they are only examples. You must decide why you have bought the disk and tell us. We can not tell you. We can only help you in realising then what you want to achieve.

And the term used is “mount point”, not “attach point”. Try to use the common terms, that makes communication easier.

Thank you. I will try to mount the new drive as /home/george

At this point, the exercise is to learn how to do it. I am working on a freshly loaded system that is not critical so I am not worried about “breaking” something. Later I must store some experimental data and thought to use the drive for that.

I will remember to use the advanced editor so that I have the CODE tags available.

George

I interprete yoour wish how to use the disk as follows:
You do not want to split the disk in several parts to be used on different places.
You want to use the disk (as a whole) mounted in /home/george, most probably to be used as the home directory for the user george (though you do not explain that).

When this is correct. to begin with there are two cases:
a) /home/george does allready exist (and probably the user george also). When yes, then copy away all contents of /home/george to some backup (either an USB sticky or on some other place of your system on the disk you have now allready), because that must be restored to the new disk after you added it. Then delete /home/george and all that is inside it. I guess it is clear that user george should not be loged in during your action.
b) /home/george does not exist (and thus user george is still to be created). This is most easy because no preparation is needed.

Then go to YaST > System > Partitioning and confirm that youy are an expert.

Search for the disk. If there is any partitioning on that disk allready (because of your earlier trials), delete them.
Then add a partition, choose to format is ext4, choose the start end end addresses to use the whole disk 9those are probably allready given asdefaults). There is a field to eneter the mount point, enter /home/george.
Let it run.

Now YaST will:
. alter the partition table to your wish of one big partition;
. the system will recognise this and let udev create the device special file dev/sdb1;
. create an ext4 filesystem on the partition (many people call this “formatting” because they still live in the MS-DOS world);
. create the directory* /home/george*;
. it will create an entry in* /etc/fstab* where all the configuration needed for mounting* /dev/sda1* on /home/george are stored for now and the future boots.
. it willl mount it.

In the above case a) you can now copy back the contents of /home/george.
In the above case b) you can use YaST > Security > Users and groups to create user george (the default there will to use /home/george as home directory for this user).
In both cases you can now tell user george that he canlogin again. You can also tell him that he can create as much data as fits on the disk without creating any diskspace problems for other users in* /home*.

I hope this helps. Please when you hesitate, do ask first for clarification before you start executing this implemanetation plan.

Excellent instructions Henk. Thank you. I already am the user george and there are the usual files in /home/george.
As I don’t want to create another user for this partition and I want to leave the existing files as they are and not move them onto the new drive since it may come and go, I will instead call the new space /home/george/george_stuff. As I understand you, this will create a new folder in user george’s home called george_stuff to which the new drive will be mounted. Is that correct?

Will I have to manually unmount this drive before it is ever removed? (Let’s say that I will always do this at power off)

On 2012-03-15 12:26, georgeinacton wrote:

Please follow Henk’s post, it is much easier to do.

Just for clarification, I’ll expand on this part.

> Next I tried your console commands and I get this:
>

(please remember to use code tags!)


> linux-12-1:/home/george # umount /srv
> umount: /srv: not mounted

Thus, you did not have a disk mounted there, contrary to what you said before.


> linux-12-1:/home/george # kdesu kate /etc/fstab
> kdesu(4147)/kdeui (kdelibs): Session bus not found

Notice that the first command in the list I gave was “su -”, that’s “su”
and a dash with a space in the middle. If you had done that, you would not
need “kdesu” and it would not have failed. If you want to use kdesu, you
will have to wait for a kde user to say, I don’t use that method myself.
But I do remember problems reported in that area.

I vaguely remember that in KDE there was a menu entry to get a root’s
terminal. You can also use that one.

> I am sorry to be such a newbie. Attaching the drive anywhere sounds
> neat, but not yet easy. Thanks. George

It is easy, but it needs getting used to :slight_smile:
When you get it, the next time will be easier.


Cheers / Saludos,

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

Almost there.

I have created the full drive partition on the new drive and mounted it at /home/george/george_stuff and it is there and I can open it. When I try to write to it access is denied. I click properties of george_stuff and I see that only owner has access rw and owner is root. So I add george to the list with rw and I still cannot write to the partition. I am just trying to save a simple text file with kwrite but ti does not let me.

Thank you for the clarification Carlos.

That is correct. When you choose* /home/george/georg_stuff *in YaST as mount point, it will be mounted there. And the directory will be created by YaST if it does not exist allready.

My recipe starts from the point where you have the unused disk just added to the system. Thus when it is mounted now somewhere, you should umount it and when it has an entry in /etc/fstab you should remove that entry. You can see if it is mounted with

mount

and you can see what is in* /etc/fstab *with

cat /etc/fstab

When in doubt, post them here and ask for advice.

Normaly, the disk will be mounted from boot until shutdown (as all you other partitions like / and* /home*). When you feel the need to remove it “on the flight” you of course have to umount first. This is like every disk (or disk like) device. In many desktops this is called “remove savely”, but it comes down to umount.
And you can only umount when no process is using it. That does mean that you must not run programs from there, have any files open or even “be there” e.g. by looking into it with a file manager (like Dolphin).

(And I hope you find a better name then george_stuff, because
a) I hate the _ characters (would rather use -, that can be typed without touching the Shift);
b) it is allready in *george, *thus stuff is enough imho;
c) maybe a more logical name like music or pictures then stuff is more telling.
But you should not take this last parahraph to serious :wink: )

Thank you Henk lol!
I am very happy to have all your advice, including the last part.
It all works like you said.
Thank you to everyone who helped me!

You are welcome. I allways like to see not only a problem solved, but also knowledge increased. And IMHO you knowledge and thus insight has increased during this action.

On 2012-03-15 16:16, georgeinacton wrote:
>
> Almost there.
>
> I have created the full drive partition on the new drive and mounted it
> at /home/george/george_stuff and it is there and I can open it.

Good!

> When I
> try to write to it access is denied. I click properties of george_stuff
> and I see that only owner has access rw and owner is root. So I add
> george to the list with rw and I still cannot write to the partition. I
> am just trying to save a simple text file with kwrite but ti does not
> let me.

No, you have to change the owner of /home/george/george_stuff to yourself.
It is in your home, so make it yours. This is one of the things you can do
with native Linux filesystems.


su -
chown george /home/george/george_stuff
exit


Cheers / Saludos,

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

On 2012-03-15 16:16, hcvv wrote:
> b) it is allready in -george, -thus -stuff- is enough imho;

Right.
I use data, varia, things… :slight_smile:


Cheers / Saludos,

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

On 2012-03-15 15:36, georgeinacton wrote:
> Will I have to manually unmount this drive before it is ever removed?
> (Let’s say that I will always do this at power off)

The system will mount and umount it automatically on boot and poweroff.


Cheers / Saludos,

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

Perfect!
I had in mind a removable drive.
Thanks