Ubuntu Guest second disk not ready

Discussions about using Linux guests in VirtualBox.
Post Reply
mwpowellhtx
Posts: 22
Joined: 8. May 2012, 00:38

Ubuntu Guest second disk not ready

Post by mwpowellhtx »

Hello,

I added a second VHD disk to my Linux Ubuntu guest OS. For the most part, it works great. I'm a Linux novice in many areas yet, so it's a bit clumsy to get it connected some times, but it works.

I am noticing when the VM starts that it's not ready to mount. Is there a way to prioritize that when the OS initializes? Because I've got some continuous integration services running that are configured to hit that volume which can run non-interactive.

Thank you.

Regards,

Michael Powell
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu Guest second disk not ready

Post by Perryg »

Add the mount to the /etc/fstab and it will be available at boot.
mwpowellhtx
Posts: 22
Joined: 8. May 2012, 00:38

Re: Ubuntu Guest second disk not ready

Post by mwpowellhtx »

Pretty sure I did, or my fstab entry isn't quite right. I somewhat modeled the last line after the first one (somewhat).

I can mount it afterwards, after logging in. But I want it available prior to user-login.

<fstab>
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=0b033d77-5505-4d53-994b-eeac13ea99c9 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=55b6a199-1690-4559-864e-d26b1cdc165e none swap sw 0 0
# second disk
UUID=cf5ff5d1-0cfa-4cb0-9210-fcab78183d03 /sdb ext4 errors=remount-ro 0 1
</fstab>
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu Guest second disk not ready

Post by Perryg »

Code: Select all

# second disk
UUID=cf5ff5d1-0cfa-4cb0-9210-fcab78183d03 /sdb ext4 errors=remount-ro 0 1
If you use the blkid you should not need the /sdb (which is wrong in any case as it would be /dev/sdb)

I don't use the blkid on my extra drives (just old fashioned I guess)

First drive is data and second is for backup

Code: Select all

/dev/sdb1	/drive/tara1	ext4	rw	0	2
/dev/sdc1	/drive/backup	ext4	rw	0	2
mwpowellhtx
Posts: 22
Joined: 8. May 2012, 00:38

Re: Ubuntu Guest second disk not ready

Post by mwpowellhtx »

Thank ye. I'm acclimating to the conventions for directories as you can tell. That helps though. And probably saves some pain later admin-wise.
Post Reply