adding an extra harddrive... what FS to use and how to use the drive?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
adding an extra harddrive... what FS to use and how to use the drive?
Runnign debian Sarge here jsut threw in another 20gb hdd i had lying around for some extra storage to my alrdy meager 10gb drve where / is mounted and all my webserver/php junk is. Have been cruisin around command line for a while now and having a great time. However, I have a question now that guides and man pages seem too convoluted on for me. Basically what Im looking to do is use this drive like it were an extra drive I threw into windows or a OSX, sort of jsut a place for storage of files.
anywho, i can run fdisk on the /dev/hdb and see that it is formatted in NTFS (used to use it on my PC) and I knwo I should reformat that to something... but curious as to what. FAT32? Linux? Linux Extended? Not sure what File System would be best to use here...
Not worried about putting other operating systems on or recognition or anythign like that... jsut a place in my linux box to store files that I might later host on web or ftp server or something.
So, after choosing the filesystem, I am jsut a little curious as to how i go about using this drive... I have read about mounting but really don't see what flies there. Do I mount it at a certain directory or something? and then files I put there can be stored on the drive. Right now Im just running on a single drive that has a boot partition, extended part, and swap part. the boot part is where everything is stored.
cmd "mount" says: /dev/hda1 on / type ext3 (rw,errors=remount-ro)
I left out cdrom and floppy for sake of brevity and concise-ness.
OK so to formulate my question: what filesystem to reformat with? and a rundown of how/where to mount this file system to act as a storage device and how I will use it whence.
OK so to formulate my question: what filesystem to reformat with? and a rundown of how/where to mount this file system to act as a storage device and how I will use it whence.
for fs type: if you want it readable between linux and windows use vfat, if you dont care use ext3, refeiris, whichever you prefer.
You can mount it anywhere, traditionaly under /mnt or its own directory under /
so if you mounted it under /mnt/files your sequence would be something like
Quote:
fdisk /dev/hd?
n
p
<some number>
<enter>
+<number>M
w
... it writes your partition ....
now to give it a fs, you will need the letter from the ? in /dev/hd? and the <some number> lets say its a and 2
Quote:
mkfs -t ext3 /dev/hda2
make dir and own to your username
[quote]
mkdir /mnt/files
chown -R drawagoat.users /mnt/files
Also keep in mind that FAT32 cannot hold files bigger than 4GB.
ext3 is a "journaled" FS, which means that if your PC suddenly powers-off, your last writes on the disk will be protected.
Then there's XFS FS, which is not journaled ( if power goes out just after you copy something to the disk, you may lose it. Anyway, according to the use you want to give it, I think there no need for a journaled FS), and is very fast, supports >4GB files and gives you more useful space.
I mean:
With ext3, you'll get 19,1 GB of real space; with XFS, you'll get 19,8 GB, for example.
I use XFS file-system for holding mp3, doing video rendering, etc...
If you're not sure which file system to use, just use the default "ext3".
In order to mount it, first create an empty directory where you want to mount it. For example, you could make /mnt/hdb1. Then create an fstab entry for that partition. Since your "/" hda1 partition is ext3, you could simply copy that line and change the device (from hda1 to hdb1) and the mount point (from / to /mnt/hdb1).
If you want to manually mount the partition, you can use the command "mount /mnt/hdb1". If all is well, then you'll see "lost+found" inside /mnt/hdb1/.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.