Problem with a new Hard Disk and fstab
I feel embarrassed to ask this, but I've never had to do it before and I'm stuck!
I'm running a CentOS 6 Server (on VMware ESX 4i. I added a second virtual hard disk. I created the Partition and formatted (ext3) it, without a problem I labeled it work. Now I need to mount it and I have to put an entry into fstab, I googled for an answer and found several : LABEL=/work etc., I tried this and lots of variations, but none of them work. Will someone please point me in the right direction? Is it CentOS 6 which is different or VMware virtual disks or is it just me being dumb? |
@ Reply
It should look something like this in /etc/fstab:
Code:
LABEL=work /abc/home/ ext3 defaults 0 0 LABEL=work : Is the label that you have set for your partition /abc/home/ : Is the mount point where you want to mount the partition. ext3 : Is the file system type defaults: mount option, you can specify other options as per your requirement. Make sure you are mount the partition on a directory that is empty otherwise your data will become inaccessible. Before rebooting the server run the following command to make sure that the new entry in /etc/fstab is mounting the partition properly: Code:
mount -a |
The Arch Wiki has an excellent article on fstab; the section on labels is about half-way down the page.
I have never used labels in fstab myself; I can see how they might have some utility in a organizational system, but not in a personal one. The Arch Wiki is an excellent resource, regardless of which distro one might use. |
It doesn't work!
The label is work, mkdir /work (I checked, it created it). LABEL=/work /work ext3 defaults 0 0 mount -a gives me a message : mount: special device LABEL=/work does not exist The partition IS labeled work and the partition IS formatted ext3 according to parted. Even more confusing, the Arch Wiki says : LABEL=Arch_Linux / ext4 defaults,noatime 0 1 so no / before the label name I tried : /dev/sdb1 /work ext3 defaults 0 0 and this worked, so the problem is sorta solved, but I would like to know why the label doesn't work. |
@ Reply
You only said the answer. You said that the label is "work' then why you are trying to use /work. Check my previous post.
|
Sorry, I tried it without the / and it worked. I just wonder why all the docs I read from CentOS (and others all say LABEL=/name.
Problem solved. Thanks for the help. I have another question, but I'll post that as a separate thread so as not to be confusing |
All times are GMT -5. The time now is 03:55 AM. |