Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Redhat / Fedora Linux Help > Want to change media names

Forgot Password?
 Redhat / Fedora Linux Help   Help and discussion related to Redhat and Fedora Linux.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 07-02-2009   #1 (permalink)
Just Joined!
 
Join Date: Jul 2009
Location: Sherbrooke, QC
Posts: 7
Send a message via ICQ to ironwilliamcash Send a message via MSN to ironwilliamcash Send a message via Skype™ to ironwilliamcash
Want to change media names

Hi, this is my first question on this forum, although I've been around to read for a while.

I just installed a fresh copy of Fedora 11 on my old win server 2003 machine. I have 2 x 250gig drives on this machine that are not the system drives. Fedora automounts them when I double click on them which is fine, but I would like them to automount as the system starts up and eventually make them available automatically to all other computers on the network.

I was wondering how I could change the name of the 2 drives without wiping them. One never had a name on my 2003 server so when it mounts it's name is something like this: A6CC5216CC51E0DB. Is there a way for me to change these? I tried using the Palimpsest Disk Utility, but it always gives me an error :
"fstype ntfs not supported" , So is there a way to change the label name even if it's ntfs? If not, can I easily convert to another filesystem without losing the data on the drives?

Also when this is done, I assume I have to make an entry in the fstab to automount, is this correct?

Thanks
ironwilliamcash is offline  


Reply With Quote
Old 07-03-2009   #2 (permalink)
Super Moderator
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, India
Posts: 21,081
Send a message via Yahoo to devils casper
Hi and Welcome !

First of all edit /etc/fstab file to automount partitions of both drives.
Execute fdisk -l command in Terminal and post output here.
Code:
su -
fdisk -l
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein
New Users: Read This First
devils casper is offline   Reply With Quote
Old 07-03-2009   #3 (permalink)
Linux Guru
 
Rubberman's Avatar
 
Join Date: Apr 2009
Location: I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Posts: 2,662
You can use the command: mkfs -L label /dev/sdxn
where /dev/sdxn is the device name + partition, such as /dev/sdb1. If this gives you an error on your ntfs partition, you can use the command mkfs.ntfs instead. The advantage with using mkfs is that it can usually determine the type of file system on the partition and use the correct mkfs.type command under the covers, so if it is an ext2/ext3 or other file system type, it will deal with it appropriately.

Once you have given them a label, you can add them to your /etc/fstab file to be automounted on bootup. Example:
Code:
LABEL=ntfs-1       /mnt/ntfs1             ntfs-3g    defaults        0 0
LABEL=linux-1     /mnt/linux1            ext3        defaults        1 2
Note that you need to create the mount point, which is the empty directory /mnt/ntfs1 or /mnt/linux1 in this example. Also note the last 2 fields that differ from the ntfs and ext3 file systems. They tell the system whether or not these file systems can be dumped and what order that fsck should be run on them at boot time. Since you don't want to run fsck on the ntfs file system, the value of the last entry is 0. I've never run fsck on an ntfs file system, and am not 100% sure that you can, which is why I suggest that it be set to zero here. In fact, I'd say that I'm about 80% sure that you cannot run fsck against an ntfs file system...

Using labels are good since there are times when your system will happily assign different device id's to your drives, such as when you plug in a new external USB or esata drive.
__________________
Sometimes, real fast is almost as good as real time.
Rubberman is offline   Reply With Quote
Old 07-03-2009   #4 (permalink)
Just Joined!
 
Join Date: Jul 2009
Location: Sherbrooke, QC
Posts: 7
Send a message via ICQ to ironwilliamcash Send a message via MSN to ironwilliamcash Send a message via Skype™ to ironwilliamcash
Thanks a lot! I'll give it a try when I get home tonight. I'll post my results in case others want the info.
ironwilliamcash is offline   Reply With Quote
Old 07-04-2009   #5 (permalink)
Just Joined!
 
Join Date: Jul 2009
Location: Sherbrooke, QC
Posts: 7
Send a message via ICQ to ironwilliamcash Send a message via MSN to ironwilliamcash Send a message via Skype™ to ironwilliamcash
Quote:
Originally Posted by Rubberman View Post
You can use the command: mkfs -L label /dev/sdxn
where /dev/sdxn is the device name + partition, such as /dev/sdb1. If this gives you an error on your ntfs partition, you can use the command mkfs.ntfs instead. The advantage with using mkfs is that it can usually determine the type of file system on the partition and use the correct mkfs.type command under the covers, so if it is an ext2/ext3 or other file system type, it will deal with it appropriately.

Uhm... I tried what you told me:


Code:
[root@fileserver etc]# mkfs -L BigGuy2 /dev/sdb
mke2fs 1.41.4 (27-Jan-2009)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=BigGuy2
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
15269888 inodes, 61049646 blocks
3052482 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1864 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Then I couldn't mount the drive anymore, so I rebooted...
Now I can mount the drive, the label is fine... but the disk is empty... as if my whole disk was wiped...

I hope I'M doing something wrong and I didn't just lose 250 gigs of data...
ironwilliamcash is offline   Reply With Quote
Old 07-04-2009   #6 (permalink)
Linux Guru
 
Rubberman's Avatar
 
Join Date: Apr 2009
Location: I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Posts: 2,662
You missed the part about the partition, and the warning you got told you about it... I think you are toast. This is what I said:
Quote:
You can use the command: mkfs -L label /dev/sdxn
where /dev/sdxn is the device name + partition, such as /dev/sdb1.
.
.
.
__________________
Sometimes, real fast is almost as good as real time.
Rubberman is offline   Reply With Quote
Old 07-04-2009   #7 (permalink)
Linux Newbie
 
rituraj.goswami's Avatar
 
Join Date: Aug 2008
Location: Guwahati
Posts: 111
good lord, why don't you read before you press yes. it's linux where you are responsible for your actions. and besides mkfs is basicall a commnad to make a filesystem. i hope you just have a backup. i think you should have followed "Rubberman" advise.
__________________
There is nothing impossible, for everything is possible; the impossible only takes a bit longer than the possible.
rituraj.goswami is offline   Reply With Quote
Old 07-04-2009   #8 (permalink)
Just Joined!
 
Join Date: Jul 2009
Location: Sherbrooke, QC
Posts: 7
Send a message via ICQ to ironwilliamcash Send a message via MSN to ironwilliamcash Send a message via Skype™ to ironwilliamcash
Quote:
Originally Posted by Rubberman View Post
You missed the part about the partition, and the warning you got told you about it... I think you are toast.
Hmmmm guess I missunderstood. Since there was only one partition I thought that's what I was supposed to do.

No biggy, didn't have a backup but it's all movies, music and that sort of stuff, nothing I can't get back eventually. At least the device has a name now

Thanks for the help,
I'm going to get them to automount now.


Quote:
good lord, why don't you read before you press yes. it's linux where you are responsible for your actions.
Don't worry I take responsibility, there's now way I would be mad at you guys for helping
ironwilliamcash is offline   Reply With Quote
Old 07-04-2009   #9 (permalink)
Linux Engineer
 
Join Date: Nov 2007
Posts: 1,135
Quote:
I was wondering how I could change the name of the 2 drives without wiping them.
I don't know why anyone would suggest running mkfs.ntfs - this *WILL* wipe the file table and create a new NTFS filesystem.
HROAdmin26 is offline   Reply With Quote
Old 07-04-2009   #10 (permalink)
Just Joined!
 
Join Date: Jul 2009
Location: Sherbrooke, QC
Posts: 7
Send a message via ICQ to ironwilliamcash Send a message via MSN to ironwilliamcash Send a message via Skype™ to ironwilliamcash
When my disk got wiped, it formatted to ext2. Is this a good fs for a disk that will only be used for storage? If not what fs should I use and how would I go about chainging it?

Might as well change it right away now that it's empty.
ironwilliamcash is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 02:07 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2