Common Workarounds [Ubuntu 16.04 + C2L]

#1

Hello,

I have been spending a few weeks with Scaleway and have run into a few ‘unique’ situations. I will be adding to this as a knowledge base that hopefully some others may find helpful. These are primarily in junction with Ubuntu 16.04 and using a C2L machine, but most of these will still apply. Note: These are the findings I have either come across here in other threads or through trial and error. I do not claim to be an expert sysadmin. I just want to share what works for me. Your mileage may vary.


Mounting C2L SSD Disk
Problem:
The included SSD disk does not automatically show up in the machine.
Solution:

  1. Create a filesystem on the disk. mkfs -t ext4 /dev/sda1
  2. Find the UUID of the disk. blkid
  3. Look for the /dev/sda1 UUID= copy the portion in “”
  4. Create your directory you want to mount to. In my example I will use /data. mkdir /data
  5. Open fstab with your favorite editor. nano /etc/fstab
  6. Add the following line (remove < > in the example) UUID=<UUID from step 3 goes here> /data ext4 defaults 0 2
  7. Test! mount -a
  8. Your drive should now be appearing and usable. Enjoy!

Using the web console
Problem:
The web console may not work by default in Ubuntu 16.04. You can type and type, and the console will not respond to text entered.
Solution:

  1. Start the tty console for this session. systemctl start getty@ttyS1.service
  2. Enable the tty to start on boot. systemctl enable getty@ttyS1.service

More to come…

2 Likes
#2

on my server the main disk mounted is /dev/nbd0 and i can not find any /dev/sda1, so i tried to follow your procedure with /dev/nbd1 but system reported that it is 0 block size. I am using C2M server which I thought should have SSD disk as well, or am I wrong here?

#3

Only the C2L have attached SSD. You can add more of the nbd’s however~

1 Like
#4

It seems like the UUID of the DSSD drive changes when you power down the server and start it up again. This makes sense because your server does not necessarily gets assigned to the same physical hardware. I had this FSTAB entry for the DSSD, but after a power down and power up the server did not want to start up completely. The issue seems to be this fstab entry causing the boot to fail.

I fixed this by starting up with the failsafe boot script, ssh into the server, mount ndb0, and edit /etc/fstab and remove the line for the dssd. After changing the boot script back to the original one the server started up successfully.

What would be a good way of auto mounting the dssd at startup, even when starting the server from archived state? I’m imagining a startup script that will 1. check if /dev/sda exists, 2. format the drive and add an ext4 partition, 3. mount at the required path.

Update:
It seems like mounting /dev/sda1 in the fstab file, rather than by UUID might be the solution. In my case the ssd was already formatted as ext4, so perhaps it’s not necessary to do it again?