Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[Help] Change mount for web server storage?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[Help] Change mount for web server storage?

I use Webzuo and Centos 7 which is installed on a 120GB SSD. I need the /home to point to the 2TB RAID. I'm noob when it comes to SSH and partitioning. Webuzo only sees the 120GB SSD for storage, I need that changed to the HD.

Thanks

«1

Comments

  • So, migrate it and create a hardmount or symlink it?

  • type 'mount'

    Note which one is the 2TB RAID.

    Then

    mount /dev/whatever /home (as root, after tarring your stuff back to the RAID, and dropping any/all services currently locking, et al.

    Thanked by 1HuntersPad
  • jarjar Patron Provider, Top Host, Veteran

    Move /home to /home2, create new empty /home, format and mount storage drive as /home, move data inside /home2 to /home.

    That's the high level, not the step by step, but that should at least help with direction.

    Thanked by 1HuntersPad
  • @jarland said:
    move data inside /home2 to /home.

    I just cringed so hard at that. There's going to be /home/home2, and we both know that.

    Thanked by 2jar Lm85H4gFkh3wk3
  • Thanks, But I have no clue on what command to use? sorry mounting things via SSH I'm not well learned on lol. /home/hunter is where the normal storage is that needs to point to the RAID as an example

  • jetchiragjetchirag Member
    edited February 2018

    HuntersPad said: home/hunter

    o.O

    I guess,

    $ mv /home /home2
    $ mkdir /home
    $ mount
    # Notice drive name
    $ mount /dev/%Drive% /home/hunter
    # Don't forget fstab entry
    $ cp -r /home2/* /home
    $ cp -a /home/. /home2/
    

    I guess that should work but take confirmation!

    Thanked by 1HuntersPad
  • Thanks, But that did not work for me. (Would post error but this was a few days ago when I tried) I hate that is even has the SSD lol, which apparently cannot just be disabled in the bios.

  • @HuntersPad said:
    Thanks, But that did not work for me. (Would post error but this was a few days ago when I tried) I hate that is even has the SSD lol, which apparently cannot just be disabled in the bios.

    I guess it wouldn't be working for this command mount /dev/%Drive% /home/hunter

    Is directory created? Also, If you remove /home and change whole structure, I dont think your panel would work!

  • Right now I have a fresh clean install again no panel installed, and maybe do this before installing panel?

  • HuntersPadHuntersPad Member
    edited February 2018

    This is the current file system with no panel installed:

    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/vg-root 101G 1.2G 95G 2% /
    devtmpfs 7.5G 0 7.5G 0% /dev
    tmpfs 7.6G 0 7.6G 0% /dev/shm
    tmpfs 7.6G 17M 7.5G 1% /run
    tmpfs 7.6G 0 7.6G 0% /sys/fs/cgroup
    /dev/sda2 485M 148M 312M 33% /boot
    /dev/mapper/vg-tmp 976M 2.6M 907M 1% /tmp
    tmpfs 1.6G 0 1.6G 0% /run/user/0
    /dev/md0 1.8T 77M 1.7T 1% /mnt/raid0

  • @HuntersPad if you don't have any users created yet editing /etc/fstab changing /mnt/raid0 (which i guess is that 2TB raid you are speaking of) to /home and rebooting should do the trick otherwise you have to copy all directories from /home to /mnt/raid0 (keeping owners/permissions intact) beforehand.

    Thanked by 1HuntersPad
  • @mksh said:
    @HuntersPad if you don't have any users created yet editing /etc/fstab changing /mnt/raid0 (which i guess is that 2TB raid you are speaking of) to /home and rebooting should do the trick otherwise you have to copy all directories from /home to /mnt/raid0 (keeping owners/permissions intact) beforehand.

    Thanks! So Just change /mnt/raid0 under fstab to /home is all?

  • @HuntersPad said:
    Thanks! So Just change /mnt/raid0 under fstab to /home is all?

    As long as /home is still empty yes.

    Thanked by 1HuntersPad
  • /dev/mapper/vg-root / ext4 discard,noatime 1 1

    UUID=be923c15-45ad-4733-afa8-46dca430f538 /boot ext2 defaults 1 2
    /dev/mapper/vg-tmp /tmp ext4 discard,noatime 1 2
    /dev/mapper/vg-swap swap swap defaults 0 0
    /dev/md0 /home ext4 defaults 0 0

  • @HuntersPad said:
    /dev/md0 /home ext4 defaults 0 0

    Seems you've made it.

    Thanked by 1HuntersPad
  • Will install the panel and see what happens :D

  • HuntersPadHuntersPad Member
    edited February 2018

    Damn :/ Disk Usage 2.89 GB / 100.93 GB as stated by control panel anyway, and copying files into /home/hunter/public_html is counting against it.

  • Can you post output of df -h?

  • I would, but decided to do a reboot. And now it wont start back up... So I guess another reinstall it is.

  • @HuntersPad said:
    I would, but decided to do a reboot. And now it wont start back up... So I guess another reinstall it is.

    Strange. Mounting /dev/md0 to /home should be seriously fool proof. My guess would have been that the panel uses some stupid way to calculate diskusage that that doesn't realize /home is not on the same device as / but i have zero idea how that could stop the whole server from booting.

    One thing i am curious about is how comes /dev/md0 is originaly mounted to /mnt/raid0? Is that some kind of template? It's not exactly a standart mount point since actually even if the name suggests that /mnt is not ment to have mount points below it.

  • @mksh said:

    @HuntersPad said:
    I would, but decided to do a reboot. And now it wont start back up... So I guess another reinstall it is.

    Strange. Mounting /dev/md0 to /home should be seriously fool proof. My guess would have been that the panel uses some stupid way to calculate diskusage that that doesn't realize /home is not on the same device as / but i have zero idea how that could stop the whole server from booting.

    One thing i am curious about is how comes /dev/md0 is originaly mounted to /mnt/raid0? Is that some kind of template? It's not exactly a standart mount point since actually even if the name suggests that /mnt is not ment to have mount points below it.

    Its mounted that way as I used this guide to create the software raid - https://www.tecmint.com/create-raid0-in-linux/

  • @HuntersPad said:
    Its mounted that way as I used this guide to create the software raid - https://www.tecmint.com/create-raid0-in-linux/

    I see. It's not going to break anything anyways i think. Actually when looking it up i see there is lots of different approaches to the usage of /mnt anyways. Lets just say i wouldn't have put the mount point there.

    Thanked by 1HuntersPad
  • I redone everything

    [root@s124980 ~]# df -h

    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/vg-root 101G 1.2G 95G 2% /
    devtmpfs 7.5G 0 7.5G 0% /dev
    tmpfs 7.6G 0 7.6G 0% /dev/shm
    tmpfs 7.6G 17M 7.5G 1% /run
    tmpfs 7.6G 0 7.6G 0% /sys/fs/cgroup
    /dev/sda2 485M 148M 312M 33% /boot
    /dev/mapper/vg-tmp 976M 2.6M 907M 1% /tmp
    tmpfs 1.6G 0 1.6G 0% /run/user/0
    /dev/md0 1.8T 77M 1.7T 1% /home

  • mkshmksh Member
    edited February 2018

    @HuntersPad said:
    /dev/md0 1.8T 77M 1.7T 1% /home

    So there's 77MB on the raid which is mounted to /home. If that somewhat matches du -sh /home i'll call bullshit on whatever the panel is displaying.

    Edit: Well, actually why wouldn't it and you can pretty much compare the outputs to the panel yourself to see if it comes up with the right disk usage.

  • HuntersPadHuntersPad Member
    edited February 2018

    I do know the panel on another providers server will show incorrect storage space as it installed on its own partition. But actually storaging things in/home store in the right place but not in this case. I use Webuzo

    It seems that guide I am using is breaking the server after a reboot. When following that guide I linked above seems when I reboot the server NO longer boots up, and I have to do a reinstall.

    I guess its $30 wasted. So much for wanting to move it away from SoYouStart. If only I could get rid of the damn SSD.

  • mkshmksh Member
    edited February 2018

    @HuntersPad said:
    I do know the panel on another providers server will show incorrect storage space as it installed on its own partition. But actually storaging things in/home store in the right place but not in this case.

    Well my guess is the panel simply does not realize it can neither just take to size of whatever is mounted to / to get the available space nor does it make any sense for this config to just add all files to get the usage.

    It seems that guide I am using is breaking the server after a reboot. When following that guide I linked above seems when I reboot the server NO longer boots up, and I have to do a reinstall.

    Thats pretty strange. Didn't it still boot when you edited fstab?

    I guess its $30 wasted. So much for wanting to move it away from SoYouStart. If only I could get rid of the damn SSD.

    Is this a KVM? What kind of options do you have for installing the OS? Does it have a rescue system?

  • Its a dedicated Server through NOCIX "WholeSaleInternet"

    I do not remember if I rebooted or not, I've wasted a lot of time on this.

  • @HuntersPad said:
    Its a dedicated Server through NOCIX "WholeSaleInternet"

    I see. Well depending on the install options availability of rescue system/VNC it should be at last possible to debug this and/or get rid of the SSD.

    I do not remember if I rebooted or not,

    You have had to otherwise it wouldn't have become mounted after editing fstab.

    I've wasted a lot of time on this.

    Yeah, i know the feeling.

  • It does have sysrcd with VNC and gparted. But unsure on how to use it, as I would first need to install centos use sysrcd and then reboot. As if I reinstall centos after it will wipe any changes made

  • mkshmksh Member
    edited February 2018

    @HuntersPad said:
    It does have sysrcd with VNC and gparted. But unsure on how to use it, as I would first need to install centos use sysrcd and then reboot. As if I reinstall centos after it will wipe any changes made

    Well, first thing would be to use VNC and check if you can get any hints why the server hangs at boot.

    Anyways a rescue system + VNC gives you a ton of options. I guess usual install consists of some template where you don't have control about the partition setup and your system ends up on the SSD? Trick here is to use the resucue system to write the iso file from http://netboot.xyz/ to the disk (dd straight to the device, no partition, no nothing) that gets booted (the ssd i guess), do a normal reboot and then use VNC to get at the console and you can install pretty much any OS you want in any configuration you want. In your case that would probably be CentOS to the RAID with nothing on the SSD but grub (and maybe /boot) to get the system to start unless of course you can get at the BIOS and change the boot order then you don't have to use the SSD at all.

    Thanked by 1uptime
Sign In or Register to comment.