I have multiple drives in the server but it only stores in the / one. How can i use the remaining two drives to save it?

Was I? We help people here on the forum, however it’s still the people’s task to run their own server. If you are new, you don’t know certain things, it is ok to ask for it. However if some just ask questions and expect ready copy&paste answers, or nearly identical questions asked shortly (which could have been found by looking and searching a bit), also some unknown keywords or commands that could be found out easily by using a search engine. So in such cases, you tend to get a bit aggressive.
So in this case, the user has read through some stuff and didn’t succeed, but in such cases, it’s much better to ask a more specific questions where you can’t follow or where you are unsure. It’s a bit like with a teacher, if you just say I didn’t do or understand what to do in my homework, or if you say, I started to do this and that and at that specific point, I was lost and didn’t know what to do.

1 Like

Thank you for replying :slight_smile: And sorry for the late reply.

I only understand the first three points i.e. to do a backup, but the rest are very new to me, and I don’t want to mess with my server, so is there any tutorial you want me to check. I know I can search on google but as I said, I’ll not take a risk as of now because if something happened, I can’t recover it.

So, please recommend me something. Some YouTube video, article, or something…

Wait, I understand… You want me to take the Home folder and shift it inside Root using mv command.(See the image) Screenshot 2021-03-13 at 12.35.13 PM

Also, there is no /etc/fstab file or folder, I check it but couldn’t find any.

And how can I delete md3 and sd4? Can you please give me commands… Also for point 7,8 & 9…

Thanks in advance :slight_smile:

Not really, root is /, and you point root directory under the root - /root.
Lets start from the beginning:

  1. Provide information about your environment: what kind of OC, version, etc.
  2. Output of
    lsblk
    df -hl
    cat /proc/mdstat
    mount
  3. How you manage it? Via SSH, some kind of UI?
  4. Do U have physical access to machine in case something goes wrong?

Then we will do point 4 only for start.

  1. Lsblk -
    Screenshot 2021-03-13 at 4.21.51 PM
  2. df -hl
    Screenshot 2021-03-13 at 4.22.20 PM
  3. cat /proc/mdstat
    Screenshot 2021-03-13 at 4.23.03 PM
  4. mount

    I use this server with ssh from my Terminal, and no I don’t have physical access to the machine. P.S. - This is a dedicated server…

And what is the system? CentOS, Ubuntu, something else?


On a first and last screenshots you see, that /dev/md3 is mounted to the root as home. So the aim of point 4 is to move this to the partition /dev/md2. Based on any tutorial e.g. this one, or this one you have to:

  1. Make new folder to mount /dev/md3 to it
sudo mkdir /mnt/home_orig
  1. Then mount /dev/md3 there.
sudo mount /dev/md3 /mnt/home_orig
#With next command check that content is your regular home directory before to proceed next.
ls -la /mnt/home_orig
  1. Unmount home directory
sudo unmount /home
  1. make new home directory
sudo mkdir /home
  1. Copy content from old home to the new home
sudo rsync -av /mnt/home_orig/* /home/
#OR
sudo cp -aR /mnt/home_orig/* /home/
# Check that everything being copied
sudo diff -r /home /mnt/home_orig -x ".gvfs/*"
  1. check that home not mounted
mount | grep md3
# Should not show "/home"
  1. Here depends on your system you have to comment (remove we can make later) line with /dev/md3 /home to prevent it from the mount on boot, e.g. from /etc/fstab, but you do not have it…

Thats it for point 4. In case of trouble if you do not apply point 7, after reboot you should have your old home folder back. But you do not need to reboot, simply mount it back in case of troubles sudo mount /dev/md3 /home

I’m on Ubuntu… I see there are a couple of commands to perform. Should I first back everything up or is it safe?

For ubuntu there is a good tutorial here, the aim is the same. St rage that you have not fstab…

Till you delete something it is pretty safe to perform.

I don’t want to delete any file or thing, I just want to have all the 8TB in /. So, I don’t need backup, right? And should I just follow that tutorial? Like, point to point?

If yes, do I need to perform the previous steps you gave me earlier?

What does it mean? Should I not use Fstab or what? I think your commands are much better for me to follow as it’s much more direct and to the point. So, should I follow your above commands and you give some other commands for it to fully work!

Please!! P.S. - Sorry I am asking so many questions, but this is one shot so I have to…

You have to follow this global plan:

Only Point 4 do not need a backup because you are not deleting anyhing, but you have to find where your fstab is, or a way how mounts are managed on your system. Otherwise after reboot you will be back to you initial setup with /home under /dev/md3.

Thats really strange I have also Ubuntu Desktop and Server edition and have fstab, could you check sudo cat /etc/fstab?

From point 5 we will start moving partition, so you better have to have backup in place for this action.

sudo cat /etc/fstab - This worked.
Screenshot 2021-03-14 at 1.27.10 AM

I’ll just back up the whole server, just in case something happened. Also, I have a question - I’m running a Python script in /root and I want it to run for a couple of weeks, will these steps can cause it to step?

P.S. - I can’t stop it…

Ok, let’s leave everything. Can you please help me out with this? Like, give me the commands to do the thing! Please!!

This I can’t predict, if script using your home directory for config, input or output savings then it probable will be interrupted.

Basically this is a global plan to do I have multiple drives in the server but it only stores in the / one. How can i use the remaining two drives to save it? - #10 by gas85
and this is detailed description of step 4 I have multiple drives in the server but it only stores in the / one. How can i use the remaining two drives to save it? - #18 by gas85

If you succeed with this, then for the rest it is simple:
For step 5 e.g. this tutorial. Do not miss up - you need to delete md3. First unmout it.
For step 6 you need to remove /dev/sda4 and /dev/sdb4 - on both HDDs. Do not miss up. First unmout it.
For step 7 you need to grow your partition with e.g. sudo resize2fs /dev/sda3 and sudo resize2fs /dev/sdb3.
For step 8 I didn’t found straight way for a root partition, e.g. this could help. And this is a good tutorial to grow partitions. As it root this could cause problems with expanding mounted partition.

Alright. I’ll wait for my program to end and then will start these actions.

Oh, I forgot to thank you for taking the time to help :)))) Thanks bro, always help Noobs like me :slight_smile:

1 Like

It looks like there is a more simple solution for you with mhddfs or mergerfs. Both should give you advantages without destroying current setup.

very hard to say. There is no “that handbook” for all about running linux.
The best thing you could do is probably saveing your important stuff to an stick or additional drive and just try advice you get. If you may mess with the server don’t very try it again.

And with each try you gonna get better and better.

Hey, Now I need to do this. Let’s see what I got :slight_smile:

Checking this out!!

Hey, @gas85 I just heard that we can use the External Storage Addon on nextcloud to use the additional HDD on the server? I just installed and set it up and it is showing the content of my /home, so I guess it’s properly set up.

But, I want to ask you that setting it up won’t have any problem in future, right? Also, there isn’t any speed issue with it?

1 Like