| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-03-2011, 05:21 PM
|
#1
|
|
Member
Registered: Jan 2007
Location: Belgium
Distribution: CentOS & Ubuntu
Posts: 111
Rep:
|
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?
|
|
|
|
10-03-2011, 05:58 PM
|
#2
|
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,674
|
@ Reply
It should look something like this in /etc/fstab:
Code:
LABEL=work /abc/home/ ext3 defaults 0 0
where,
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:
I hope this helps.
|
|
|
|
10-03-2011, 08:07 PM
|
#3
|
|
Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian
Posts: 5,356
|
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.
|
|
|
|
10-04-2011, 02:26 AM
|
#4
|
|
Member
Registered: Jan 2007
Location: Belgium
Distribution: CentOS & Ubuntu
Posts: 111
Original Poster
Rep:
|
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.
|
|
|
|
10-04-2011, 02:30 AM
|
#5
|
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,674
|
@ 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.
|
|
|
|
10-04-2011, 02:53 AM
|
#6
|
|
Member
Registered: Jan 2007
Location: Belgium
Distribution: CentOS & Ubuntu
Posts: 111
Original Poster
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:19 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|