[solved] installing mageia across 2 drives

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[solved] installing mageia across 2 drives

Postby fadi » Mar 13th, '23, 17:46

I do not like to have a separate home partition but I want to install mageia on two drives each one is 1 terabyte, the ram size is 16 gigs. the first drive will be;
swap , / (including home folder)
What would the mount point for the second drive be?
Will it be ~/ or /data . I want it to automatically create a new folder for each new user I create or to be like an extension of the home folder. What should the swap size be as well?
Last edited by fadi on Mar 16th, '23, 14:38, edited 1 time in total.
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34

Re: installing mageia across 2 drives

Postby doktor5000 » Mar 13th, '23, 22:08

fadi wrote:What would the mount point for the second drive be?
Will it be ~/ or /data .

Whatever you like. If you don't include the two drives into LVM, it cannot be / as there's already a filesystem for that on the first drive.

Although a separate home partition is always recommended especially for upgrades / reinstallation.

swap size depends, it should usually be the size of your RAM, and it depends if you want to use hibernate (suspend to disk) - then it should be a bit more.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing mageia across 2 drives

Postby fadi » Mar 14th, '23, 16:56

But what will happen in each case :
  1. /data --- will it be /data/[userid] ?
  2. ~/data --- will it be /home/[userid]/data ?
Last edited by fadi on Mar 14th, '23, 18:24, edited 1 time in total.
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34

Re: installing mageia across 2 drives

Postby sturmvogel » Mar 14th, '23, 17:13

Different users get different directories in the home path, nowhere else:
Code: Select all
/home/user1/
/home/user2/
/home/user3/


fadi wrote:I want it to automatically create a new folder for each new user I create or to be like an extension of the home folder.

Again: Each user gets an own /home directory as shown above. If you want an additional data directory/partition you need to create it yourself. There is no automatic for such case...

Your requirements are unclear.
Do you want that all 3 users can access a separate data directory? Easy: just give them all access to the data directory by putting the in the same user group and create a partition and directory on your second drive:
Code: Select all
/mnt/data/


Do you want that every users has an own data directory which only can be accessed by him? Easy: Create three data directories on your second drive with adapted user/group rights:
Code: Select all
/mnt/data/user1/
/mnt/data/user2/
/mnt/data/user3/
sturmvogel
 
Posts: 739
Joined: Jul 30th, '12, 00:39

Re: installing mageia across 2 drives

Postby fadi » Mar 14th, '23, 17:41

I think I want it like home/[userid]/data and I thought typing ~/data as a mount point will create it automatically for each new user I create . But since you are saying it does not happen this way , I will just put /data as a mount point and I will create a new folder for each new user I create, manually. Am I right?
And also what does /mnt/ you typed stand for ?
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34

Re: installing mageia across 2 drives

Postby sturmvogel » Mar 14th, '23, 18:03

https://opensource.com/life/16/10/intro ... ilesystems

/mnt A temporary mountpoint for regular filesystems (as in not removable media) that can be used while the administrator is repairing or working on a filesystem.


You can also place your data directory directly under /data if you want. But if you are working with different drives and later also add mountpoints for NFS filesharing or similar, it is cleaner to place them all below /mnt/... or you will clutter your directory structure.
sturmvogel
 
Posts: 739
Joined: Jul 30th, '12, 00:39

Re: installing mageia across 2 drives

Postby JoesCat » Mar 14th, '23, 18:50

Hi fadi,
I think it could help us understand better what you plan on doing, and what is meant by data (like is it a "lot" may suggest doing one structure vs another). Is the data to be completely segregated from each user, or is some/all of it shared?

Linux is based on UNIX, and therefore lends itself really well for lots of users (one computer, N users), while Windows is based on DOS and it's roots come from one computer, one user. Would it be one user at a time, or could there be several users at once working on the data?
The more information, the easier it is to understand the question. :-)
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: installing mageia across 2 drives

Postby fadi » Mar 14th, '23, 21:17

the computer will be shared between two users each at a time , not a server. Like what I explained in the first post:
1st drive : swap, / (including home directory)
2nd drive : /data or /extra (it is just a name) and I will then create a folder manually for each user with different access rights for each one. I do not think using ~/data will do it for me.
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34

Re: installing mageia across 2 drives

Postby sturmvogel » Mar 14th, '23, 22:04

fadi wrote:I do not think using ~/data will do it for me.

It's still not quit clear why you need an additional data directory for each user. If you create two users with different UID and groups, both get a separate home directory. User1 can not access the home directory from User2 and vice versa. That means if you create big enough home partitions you don't need additional /data directories. Eccept you want to be able to wipe your main drive and preserve the /data partition.
sturmvogel
 
Posts: 739
Joined: Jul 30th, '12, 00:39

Re: installing mageia across 2 drives

Postby doktor5000 » Mar 14th, '23, 23:14

fadi wrote:I think I want it like home/[userid]/data and I thought typing ~/data as a mount point will create it automatically for each new user I create . But since you are saying it does not happen this way , I will just put /data as a mount point and I will create a new folder for each new user I create, manually. Am I right?

Nope, it won't. By default home directories are only created as /home/[username] but that won't be a separate filesystem for each user nor a filesystem at all.
I still don't get your issue, if you have two drives, simply put both into an LVM, create a / LV with 100GB and the rest of the 2TB for /home which has room for both users.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing mageia across 2 drives

Postby JoesCat » Mar 14th, '23, 23:57

2 users, 1 person at a time, 1 terabyte drive for data....
...Assuming you are doing a lot of number crunching, you probably need a large temp, but if it is mostly storage and lookups, you probably don't need that much temp (just thinking out loud, since I would recommend keeping separate partitions for home, and therefore this would suggest sliding up/down the size between /home and / ).

...like sturmvogel suggests, I also prefer putting /mnt/data instead of /data to keep it tidy in /
for each user, you can suggest they create a symlink like ~/data pointing to /mnt/data/userX/ but this only works after you manually create /mnt/data/userX or /mnt/data/userY

drive2, I'd suggest calling it /mnt/data
After it is created, you will need to manually add /mnt/data/user[a,b,c,....z] or however you like.
You'll note that Mageia's standard security is to generally create directories viewable by anyone (example):
Code: Select all
ls -l /mnt
drwxr-xr-x   5 root root      4096 Mar 15  2023 mnt/data/user1
drwxr-xr-x   5 root root      4096 Mar 15  2023 mnt/data/user2

so you would need to modify them per user (similar to /home):
Code: Select all
ls -l /mnt
drwxr-x---   5 user1 user1 4096 Mar 15  2023 mnt/data/user1
drwxr-x---   5 user2 user2 4096 Mar 15  2023 mnt/data/user2


drive1, I'd still recommend keeping separate partition for:
/ (perhaps 1/4 to 1/2 the drive ~250G...500G)
/home (maybe 1/2 to 3/4 of drive ~500G...750G)
swap (17GB)

Still don't really understand what data is, but if it's mostly archives, I'd lean towards a large /home partition,
... or if it is a "lot" of data that needs to be number-crunched then I would suggest a smaller /home, and having a large "/" or maybe even having a separate large /tmp
example.... /=100G, /home=250G, swap=17G /tmp=rest_of_drive
If whatever you are doing is going to take a lot of memory, you may want to increase the size of swap...
...but it really depends on what sort of data is data.
Last edited by isadora on Mar 15th, '23, 08:54, edited 2 times in total.
Reason: Please place command-output between [CODE]-tags, to improve readability, thanks ahead!!! ;)
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: installing mageia across 2 drives

Postby doktor5000 » Mar 15th, '23, 00:40

Why suggest such a huge /tmp of more then a TB ? /tmp is usually tmpfs and not an actual filesystem and non-volatile contents should be located below /home/username/tmp.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing mageia across 2 drives

Postby JoesCat » Mar 15th, '23, 02:12

Yeah - it does seem a bit overboard, and perhaps a poor choice :-)
I was thinking of super-sized data sets, like perhaps mapping geography, or camera images of paintings (to less than a hair in width).
...but these would probably benefit from more RAM.

I'm somewhat curious about what sort of data needs a terabyte of space.
...but then again, we'll be seeing larger drives in the future.
Seems there never is enough space for data.
Last edited by isadora on Mar 15th, '23, 17:07, edited 1 time in total.
Reason: Quoting the former message is not appropriate
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: installing mageia across 2 drives

Postby fadi » Mar 15th, '23, 17:01

doktor5000 wrote:Nope, it won't. By default home directories are only created as /home/[username] but that won't be a separate filesystem for each user nor a filesystem at all.
I still don't get your issue, if you have two drives, simply put both into an LVM, create a / LV with 100GB and the rest of the 2TB for /home which has room for both users.

This is the best answer to my problem . Now how to do this during installation ? The new question is how to create a /home partition that extends over two drives using LVM ? Does mageia installer do for me or do I have to create it using gparted ? Please explain to me how to do it using graphical tools, since I am not as technical as you are. So how to create logical volume spanning the two disks ?
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34

Re: installing mageia across 2 drives

Postby doktor5000 » Mar 15th, '23, 18:17

You don't seem to understand what LVM does. You define 2 PVs for your two disks, put those 2 PVs into one VG, and then create LVs inside that VG. LVM does all the rest.
Have a look at e.g. https://en.wikipedia.org/wiki/Logical_V ... ger_(Linux)

You should be able to do that with our installer via custom partitioning.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing mageia across 2 drives

Postby fadi » Mar 15th, '23, 21:34

Thanks. From what I read from source targeted at debian;
Code: Select all
pvcreate dev/sda
pvcreate dev/sdb
vgcreate vg  /dev/sda  /dev/sdb
lvcreate -L 184G -n root vg
lvcreate -L 16G -n swap vg
lvcreate -L 1800G -n home vg

And then use the installer and treat each lv as a partiton, give it mount point and format it accordingly. Is the process in mageia graphical from the begining.I still need a tutorial, with screenshots if possible, in mageia. There is a file system type in partitioner called Linux Logical Volume Manager . Right ? :?:
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34

Re: installing mageia across 2 drives

Postby sturmvogel » Mar 15th, '23, 22:02

Simply start the installer -> custom disk partitioning
Create a PV on disk 1 (mark disk one, click "other", chose LVM, chose complete disk size)
Create a PV on disk 2 (mark disk two, click "other", chose LVM, chose complete disk size)
Put both PV's into a VG (called LVM in the partitioner screen on the right side)
Create 3 LV's inside the VG (100GB lv_root (/), some GB for lv_swap (/swap) and rest for lv_home (/home))


It's that easy...
sturmvogel
 
Posts: 739
Joined: Jul 30th, '12, 00:39

Re: installing mageia across 2 drives

Postby doktor5000 » Mar 15th, '23, 23:37

fadi wrote:Is the process in mageia graphical from the begining.I still need a tutorial, with screenshots if possible, in mageia.

Depends what media you use to start the installation.
Documentation for the installer is available: https://doc.mageia.org/installer/8/en/c ... index.html
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing mageia across 2 drives

Postby morgano » Mar 16th, '23, 12:56

sturmvogel wrote:...
and rest for lv_home (/home)).


I usually choose not to use all available space in the VG.
That way i can later extend any partition that need more space.
That is possible any time with diskdrake, even when partitions are in use and system is running :)
I have done that many times, never failed - but it is good to take a backup before anyway.

(Shrinking a LV is much more complicated and we have no GUI for that)

Free space can also be used for snapshots. We have no GUI for that.

I almost always use LVM on my Mageia installs. Normally one big PV on the one disk, and encrypted, so everything except a separate /boot partition gets encrypted with one key only, all set up by diskdrake/installer.
Last edited by morgano on Mar 16th, '23, 15:59, edited 1 time in total.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1489
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: installing mageia across 2 drives

Postby fadi » Mar 16th, '23, 14:21

Thanks to you all for your answers and Godspeed until I trouble you with my ignorance once again..Looking forward to Mageia 9 :D
fadi
 
Posts: 53
Joined: Mar 26th, '21, 20:34


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron