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.
Write an article for LinuxForums Today! Win Great Prizes!
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?
Location: I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Posts: 2,540
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:
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.
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...
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.
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
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.
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