Monday, June 1, 2009

/etc/fstab help!

Most of you know I'm a Linux n00b. I have no apologies for that...at least I'm trying right?

I unsucessfully attempted to install Oracle on Jaunty Jackalope (9.04) so I decided to use VirtualBox and Oracle Enterprise Linux. I'd successfully created a Windows Vista Ultimate virtual machine, off to try my second.




I chose fixed size storage:


Then select the folder where I wanted it to reside:


Location and size:


And the summary:


And received this:


At first, I began to search for problems with VirtualBox. I tried created a smaller disk, 2.0 GB, and it worked. So I knew I had a space issue (well, I think I knew).

So, fdisk to view the available partitions (as root):
root@cdj-laptop:/# fdisk -l
root@cdj-laptop:/#
So I did it as myself:
chet@cdj-laptop:/# fdisk -l
chet@cdj-laptop:/#
Using sudo:
chet@cdj-laptop:/# sudo fdisk -l
root@cdj-laptop:/#
So I installed GParted, and tried using that Partition Editor to see what was available:


WTF?

So I've tried search on "ubuntu fdisk nothing" and get nothing. So I'm asking you fine folks...either help me out or point me to the manual (RTFM!). Links are helpful. Answers are the most helpful. Something. I don't want to reinstall again but will if I have to.

Probably helpful to everyone is the contents of my /etc/fstab file as well:


Thank you and have a nice day.

11 comments:

SydOracle said...

df -h
should show available space.
I've used GParted on Ubuntu Jaunty. Think it needs to be sudo'd though.

oraclenerd said...

Filesystem Size Used Avail Use% Mounted on
tmpfs 1.5G 0 1.5G 0% /lib/init/rw
varrun 1.5G 140K 1.5G 1% /var/run
varlock 1.5G 0 1.5G 0% /var/lock
udev 1.5G 180K 1.5G 1% /dev
tmpfs 1.5G 148K 1.5G 1% /dev/shm
rootfs 19G 16G 2.6G 86% /
lrm 1.5G 2.4M 1.5G 1% /lib/modules/2.6.28-11-generic/volatile

I forgot to mention that this is a 150 GB hard drive. 20 or so for the programs, 3 for swap, and the remainder (~127 gb) for data.

John Scott said...

Chet,

Unless I read that wrong, you're trying to create a 20Gb disk image in /opt, you have no seperate /opt partition (or mount) so that would come under / instead, where you only have 2.6Gb free (so 20Gb into 2.6Gb would overflow it).

You do have a /opt listed in your fstab (/dev/sda6) but your df -h listing doesn't show that partition as being mounted.

John.

jpiwowar said...

Hi Chet,

Adding to the comment for John S:

While /etc/fstab mentions /opt, the mount point is actually named /data. Do you have a /data directory? If not, the OS won't be able to mount the partition.

What happens if you try the following?
sudo mkdir /data
sudo mount /data

Hopefully, running df -h again should show you the large partition that you're after.

Regards,

John P.

oraclenerd said...

@john and john

I tried created a VM image in the /data directory (I do have one). Perhaps it's just not mounted? Tonight I'll try to mount it manually and see what happens...I'll probably blow up the computer. ;)

Thanks guys for the pointers...I'll report my results back tonight.

jpiwowar said...

Chet,

Just a quick note: If you've attempted to to create a VM image in /data, then there is an opportunity for confusion.

Before you manually mount the 127G partition, check the existing /data directory to make sure that it's empty. If it's not empty, then mounting the 127G partition at /data will make the current contents of the /data directory inaccessible.

If /data is *not* currently empty, then before attempting to mount the 127G partition, try this (as root, or using sudo):

mv /data /data_old
mkdir /data
mount /data
mv /data_old/* /data

Probably a good idea to make sure your VM is shut down before schlepping all those files around, though. :-)


Regards,

John P.

oraclenerd said...

barnacles:

chet@cdj-laptop:/data$ sudo mount /data
mount: special device /dev/disk/by-uuid/1cb30763-a262-4555-91c3-4674a234d455 does not exist
chet@cdj-laptop:/data$ su root
Password:
root@cdj-laptop:/data# mount /data
mount: special device /dev/disk/by-uuid/1cb30763-a262-4555-91c3-4674a234d455 does not exist
root@cdj-laptop:/data# mount /opt
mount: can't find /opt in /etc/fstab or /etc/mtab
root@cdj-laptop:/data#

Tom said...

Virtual Box rocks! I seriously hope Oracle does not kill it after acquiring Sun! It works better on Ubuntu than VMWARE which I just had nightmares trying to install specific kernel drivers. VMWARE was a pain in the ass.

oraclenerd said...

@tom

You're supposed to give me a solution for my problem, not sing the praises of VirtualBox. :)

Tom said...

I thought you already fixed it!

oraclenerd said...

No, not yet. I gave up on trying to fix it for the time being.

However, with the most recent updates, The "Places" now displays the 136 GB Media...only nothing happens when I select it.

Should be my impetus to spin up a cloud image shouldn't it?