Howdy, Stranger!

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


Need help to make a default filesystem
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.

Need help to make a default filesystem

kidrockkidrock Member
edited December 2018 in Help

I am a novice vps user. I had purchased a vps package from one of the offers posted here during Black Friday. Need some help setting up the vps Ubuntu 16.04.


https://imgur.com/a/euR19lK

I had purchased a vps package from another company too and they have just one filesystem in which whatever I install is written there.

However, this vps has 2 filesystem (vda and vdb) and whatever I install is being written in vda (10GB) instead of vdb (30GB). In above image, default filesystem is vda1 but since I wanted to use vdb (30GB) as my default filesystem for vps, I followed the vps documentation above for merging vba and vdb. However, vdb is not working as my default filesystem. VPS support said they cannot help since this is unmanaged hosting. As a novice user, I couldn't understand much from reading Google results.

Can anybody please suggest me how to make 30GB vdb my default filesystem so that whatever I install is installed there not in 10GB vda? Thanks.

«1

Comments

  • If you do a "df -h" where does it show vdb as being mounted?

    That mount point is where you then set your programs to be the default place to write to, which varies depending on the software of course.

  • Below is th df -h results.

    Filesystem Size Used Avail Use% Mounted on
    udev 487M 0 487M 0% /dev
    tmpfs 100M 11M 89M 11% /run
    /dev/vda1 7.4G 2.1G 5.3G 28% /
    tmpfs 497M 0 497M 0% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 497M 0 497M 0% /sys/fs/cgroup
    /dev/vdb 30G 44M 28G 1% /mnt
    tmpfs 100M 0 100M 0% /run/user/0

  • @kidrock said:
    Below is th df -h results.

    Filesystem Size Used Avail Use% Mounted on
    udev 487M 0 487M 0% /dev
    tmpfs 100M 11M 89M 11% /run
    /dev/vda1 7.4G 2.1G 5.3G 28% /
    tmpfs 497M 0 497M 0% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 497M 0 497M 0% /sys/fs/cgroup
    /dev/vdb 30G 44M 28G 1% /mnt
    tmpfs 100M 0 100M 0% /run/user/0

    as you can see your /dev/vda mount point is / (see the mounted on column) while your /dev/vdb mountpoint is /mnt. change them in your /etc/fstab file and reload with mount -a

  • @niraeth said:
    as you can see your /dev/vda mount point is / (see the mounted on column) while your /dev/vdb mountpoint is /mnt. change them in your /etc/fstab file and reload with mount -a

    This is my /etc/fstab
    UUID=be5d9142-ab45-45cf-9fb2-5196beea25f4 / ext4 defaults 0 0
    /dev/vda2 none swap sw,comment=cloudconfig 0 2
    /dev/vdb /mnt auto defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig 0 2
    /mnt/home /home none bind 0 0

    Does anything need to be changed here?

  • [root@vps] cd /home
    [root@vps] touch newfile
    [root@vps] cd /mnt/home
    [root@vps] ls
    

    If 'newfile' is in the directory listing you should be good to go.

  • layfonlayfon Member
    edited December 2018

    If you have installed something on it, you probably need to copy everything from vda1 to vdb1 and modify /etc/fstab as niraeth said.
    If you have nothing important on it, re-install manually can be an option, too. The manual you referred has guide on this.

    Edit: directly copying seems not as easy as I thought and you might want to do more research

  • kidrockkidrock Member
    edited December 2018

    @sleddog said:

    > [root@vps] cd /home
    > [root@vps] touch newfile
    > [root@vps] cd /mnt/home
    > [root@vps] ls
    > 

    If 'newfile' is in the directory listing you should be good to go.

    This is what I got from the commands above.

    root@v-1:~# cd /home
    root@v-1:/home# touch newfile
    root@v-1:/home# cd /mnt/home
    -bash: cd: /mnt/home: No such file or directory
    root@v-1:/home# ls
    newfile ubuntu

  • @layfon said:

    If you have nothing important on it, re-install manually can be an option, too. The manual you referred has guide on this.

    Edit: directly copying seems not as easy as I thought and you might want to do more research

    This is a new vps. So there's nothing. And I did reinstall from control panel.

    The other vps I am using has one filesystem and whatever programs I install are written in it. This one has 2 filesystems. I just want to install my programs in vdb (30G).

  • /dev/vdb is a filesystem by itself, which means you fucked it up.

    If nothing is on it yet, wipe out the GPT/MBR:

    dd if=/dev/zero of=/dev/vdb bs=1M count=10

    Then fdisk /dev/vdb and create a real partition. The Ubuntu Forums will help you, you've got a long way to go: https://ubuntuforums.org/forumdisplay.php?f=326

  • @Letzien said:
    /dev/vdb is a filesystem by itself, which means you fucked it up.

    I had just purchased this vps during Black Friday. As a novice user, I asked support for making vdb or whatever programs I install to be written on the 30GB disk, not on vda 10GB disk which I suppose is for system files probably.

    They instructed me to follow the commands under "Mounting folder via mount bind" from this link http://kb.ultravps.eu/kvm-cloud-server/index.html

    I just followed the commands and added the line in /etc/fstab

    My simple wish was to just install all programs in the 30G disk, not 10G disk. It's such complicating for a novice like me. I have a vps with another company and I had nothing to configure there. Just install any program and it gets written in the 20G disk there.

  • @kidrock said:

    @layfon said:

    If you have nothing important on it, re-install manually can be an option, too. The manual you referred has guide on this.

    Edit: directly copying seems not as easy as I thought and you might want to do more research

    This is a new vps. So there's nothing. And I did reinstall from control panel.

    The other vps I am using has one filesystem and whatever programs I install are written in it. This one has 2 filesystems. I just want to install my programs in vdb (30G).

    "Install" can go to many places so make root partition on /dev/sdb is probably the way to go. Since there's nothing on your vps I'd say manually re-install and set the root to /dev/sdb* during installation would be easier and quicker than figuring out how to do it. Though if you want to try it out and learn something, there's always rescue console.

    Thanked by 1Letzien
  • They basically gave you a virtual second disk, and said 'go to town'. If you've never manually partitioned anything before, or only done so under Windows- it's not so easy.

    If anything is under /mnt, back it up, then run the dd command above as root to clear the bad information on it, then use apt-get update && apt-get upgrade && apt-get install cfdisk && cfdisk /dev/vdb - it's menu driven.

    Create a new partition, Linux type, write, save, and exit. Then mkfs.ext4 -j /dev/vdb1

    Finally, edit /etc/fstab to be /etc/vdb1, instead of /dev/vdb. You're likely going to have problems using the entire disk as a virtual partition if it ever gets corrupt. It'll be easier for your host to fix, but not yourself.

    Again, consider the Ubuntu Forums.

  • @layfon said:

    "Install" can go to many places so make root partition on /dev/sdb is probably the way to go. Since there's nothing on your vps I'd say manually re-install and set the root to /dev/sdb* during installation would be easier and quicker than figuring out how to do it. Though if you want to try it out and learn something, there's always rescue console.

    When I did the "Re-install" Ubuntu 16.04 from control panel, it just asked for root password. That's all. Didn't get any option to set root to /dev/vdb.

  • @kidrock said:

    layfon said:

    "Install" can go to many places so make root partition on /dev/sdb is probably the way to go. Since there's nothing on your vps I'd say manually re-install and set the root to /dev/sdb* during installation would be easier and quicker than figuring out how to do it. Though if you want to try it out and learn something, there's always rescue console.

    When I did the "Re-install" Ubuntu 16.04 from control panel, it just asked for root password. That's all. Didn't get any option to set root to /dev/vdb.

    http://kb.ultravps.eu/kvm-cloud-server/index.html#manual-installation-of-ubuntu-18-04-and-other-linux-distributions

  • I selected "Boot Image" and installed Ubuntu 16.04. Now I cannot even login via SSH client. lol

  • @Letzien said:
    They basically gave you a virtual second disk, and said 'go to town'. If you've never manually partitioned anything before, or only done so under Windows- it's not so easy.

    If anything is under /mnt, back it up, then run the dd command above as root to clear the bad information on it, then use apt-get update && apt-get upgrade && apt-get install cfdisk && cfdisk /dev/vdb - it's menu driven.

    Create a new partition, Linux type, write, save, and exit. Then mkfs.ext4 -j /dev/vdb1

    Finally, edit /etc/fstab to be /etc/vdb1, instead of /dev/vdb. You're likely going to have problems using the entire disk as a virtual partition if it ever gets corrupt. It'll be easier for your host to fix, but not yourself.

    Again, consider the Ubuntu Forums.

    I am a Windows user and just have been using Ubuntu VPS to run few programs. Not a tech guy, so above instructions are making me sweat. I had bought VPS from Vultr and Aruba few months ago and used them without me having to configure anything. Just run some updates on them and install my programs. But this VPS.... I don't know how to configure. Think I will ask for the refund.

  • layfonlayfon Member
    edited December 2018

    @kidrock said:

    Letzien said:
    They basically gave you a virtual second disk, and said 'go to town'. If you've never manually partitioned anything before, or only done so under Windows- it's not so easy.

    If anything is under /mnt, back it up, then run the dd command above as root to clear the bad information on it, then use apt-get update && apt-get upgrade && apt-get install cfdisk && cfdisk /dev/vdb - it's menu driven.

    Create a new partition, Linux type, write, save, and exit. Then mkfs.ext4 -j /dev/vdb1

    Finally, edit /etc/fstab to be /etc/vdb1, instead of /dev/vdb. You're likely going to have problems using the entire disk as a virtual partition if it ever gets corrupt. It'll be easier for your host to fix, but not yourself.

    Again, consider the Ubuntu Forums.

    I am a Windows user and just have been using Ubuntu VPS to run few programs. Not a tech guy, so above instructions are making me sweat. I had bought VPS from Vultr and Aruba few months ago and used them without me having to configure anything. Just run some updates on them and install my programs. But this VPS.... I don't know how to configure. Think I will ask for the refund.

    Did you see rescue console? Did you cleaned vda? Is ssh server installed? I don't think it would be that broken,

  • your vps comes with two seperate partitions, from the output of your df and fstab vdb gets mounted to /mnt and then there is a bind mount for /mnt/home but that dir obviously doesn't even exist.

    you could for instance mount vdb1 to /home directly and leave out that bind mount at all.
    if you don't know what this means, you are clearly on the wrong product.

    also if you boot from a netinst iso of course there is no ssh but you need to use the VNC console to install your ubuntu from that iso.
    if you don't know what this means, you are clearly on the wrong product.

    so yes, probably asking for a refund is best option here. if you find the time and will to learn basic linux administration take some courses and find a cheap vps as playground. but for production use don't go with anything unmanaged yet.

  • This.

  • @Falzo said:
    don't know
    for production use

    CPanel and/or VestaCP drone time.

  • kidrockkidrock Member
    edited December 2018

    @Falzo said:
    your vps comes with two seperate partitions, from the output of your df and fstab vdb gets mounted to /mnt and then there is a bind mount for /mnt/home but that dir obviously doesn't even exist.

    you could for instance mount vdb1 to /home directly and leave out that bind mount at all.
    if you don't know what this means, you are clearly on the wrong product.

    also if you boot from a netinst iso of course there is no ssh but you need to use the VNC console to install your ubuntu from that iso.
    if you don't know what this means, you are clearly on the wrong product.

    so yes, probably asking for a refund is best option here. if you find the time and will to learn basic linux administration take some courses and find a cheap vps as playground. but for production use don't go with anything unmanaged yet.

    Haha, yup I didn't understand anything above, so probably I am on the wrong product.

    I have been using shared webhosting. And just used VPS from Vultr and Aruba few months back which I have no problems using them. This one, I am finding difficult to use probably as a novice user. So I guess probably asking for refund will be the best go for now.

  • FAT32FAT32 Administrator, Deal Compiler Extraordinaire

    Everyone is once a beginner, but my advice is dont learn to fly without learning how to walk.

    You can start by understanding file systems, virtualization, operating systems and anything related. Foundation is important.

    Besides asking for refund, you can also take this opportunity to learn and experimenting it around. If anything goes wrong, just reinstall and try again.

    Thanked by 2Falzo uptime
  • FAT32 said: Everyone is once a beginner, but my advice is dont learn to fly without learning how to walk.

    this nails it! I did not want to discourage or offend with my reply above. simply point out, that it seems that there is too much basic stuff missing which would make me worry about handling of other more important things that might no be so obvious as a potential problem ;-)

    FAT32 said: Besides asking for refund, you can also take this opportunity to learn and experimenting it around. If anything goes wrong, just reinstall and try again.

    better really start off with hourly billed stuff and premade templates then.

    @UltraVPS offer very good performance for the price but are definitely not the handholding type of provider ;-)
    (and I hope they don't become that otherwise the pricing probably couldn't be kept...)

    Thanked by 2FAT32 vimalware
  • sleddogsleddog Member
    edited December 2018

    Wow, what a snarl this turned into. AFAICS the OP was where he wanted to be...

    /     -> /dev/vda
    /home -> /dev/vdb

    Say shit in /home and use the 30GB drive.

    Why does he need to cancel his service?

    Thanked by 1kidrock
  • Over 20 messages and no one mentioned how @kidrock looks nothing like Kid Rock?!

    IMPOSTER

    Thanked by 1eol
  • @sleddog said:
    Wow, what a snarl this turned into. AFAICS the OP was where he wanted to be...

    /     -> /dev/vda
    > /home -> /dev/vdb

    Say shit in /home and use the 30GB drive.

    Why does he need to cancel his service?

    Because you can't usually directly boot from /dev/vda as it isn't actually a MBR/GPT virtual drive, and using an entire disk, as stated, for a partition, sucks on the user level for dealing with - when you have no clue what you're doing (It isn't a partition, so tools can't read it).

    OP decided to cancel, and we all kind of decided it wasn't worth making the host suffer.

  • sleddogsleddog Member
    edited December 2018

    Letzien said: Because you can't usually directly boot from /dev/vda as it isn't actually a MBR/GPT virtual drive, and using an entire disk, as stated, for a partition, sucks on the user level for dealing with - when you have no clue what you're doing (It isn't a partition, so tools can't read it).

    OP decided to cancel, and we all kind of decided it wasn't worth making the host suffer.

    He followed the host's instructions and had a working system with /dev/vdb at /home. The OS is installed at / on /dev/vda. No reason for boot issues. I don't see the problem.

    But whatever.

  • LetzienLetzien Member
    edited December 2018

    Well, no, he didn't- not exactly.

    /dev/vdb /mnt auto defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig 0 2
    /mnt/home /home none bind 0 0
    

    Also, he seemed to want to use /dev/vdb as /, which would have wasted 33% of his space, but worked perfectly fine with /dev/vdb as /boot for most intents.

  • FalzoFalzo Member
    edited December 2018

    if I remember right, the initial setup with any ultravps vm installed from a template is that /dev/vda1 ist mounted as / and /dev/vdb1 is mounted as /home (directly) - so whatever OP already tried more or less messed things up, because he lacks understanding for the difference between vdb vs vdb1 and so on.

    if he would aim to 'install' his 'apps' on the 30G partition he'd simply need to do so in /home and could use the system as it were provisioned.
    also we don't even know what 'apps' OP need and how the 'install' routine might look like..

    but we do know, that this might not be the way things work in linux anyway.

    again... nothing wrong with having no clue about that, but obviously that isn't the level he should make an entry into unmanaged (unsecured) linux systems with public internet attached anyway.

    TL;DR; if you'd want to have all available space as root you'd go to install from netinst and set up LVM to have both partitions together in a volume to be done with. but again that's obviously some levels above OPs actual knowledge and therefore I don't think it's appropriate to give a playbook that's just followed by, but not understood.

    worth to mentioned that @UltraVPS advertises only the 30GB of space on that package and the 10GB you get for the system are something you get kind of free ;-)

    PS: @kidrock if you want I'll offer you an initial setup of your VM with a partitioning to your liking for a one time fee of $50. send a PM if interested.

    Thanked by 23606202 eol
  • @kidrock One should know that @Falzo is one of the few real good souls that we have here on LET. He will surely do a good job for those $50 and you do not have to fear that he will harm you in any way.

    Thanked by 3eol Falzo vimalware
Sign In or Register to comment.