Guest dopeghost Posted July 3, 2003 Report Share Posted July 3, 2003 Hi. I want to add a second drive to my linux system to be used exculsively for storing media (mp3's, videos etc). My problem is that when i formatted my drive as an ext2 partition it ended up reserving a big chunk of space (many gb's on a 120gb drive) for root. By comparison when i format the drive as fat32 i get all the available space. I have tried to look into this issue using google (there must be *many* server systems and such like that need to ultilise all available space) but i haven't been be able to find out how to prevent ext2 from reserving space for root or what would be a better alternative. Would definately apprieciate any advice or info from other users on their setups thanks -dopeghost Quote Link to comment Share on other sites More sharing options...
Gowator Posted July 3, 2003 Report Share Posted July 3, 2003 You can manually set the parameters when you create the filesystem. If you explicitly create it using the mk2fs however .... I haven't tested myself but xfs was designed by SGI specifcally for Multimedia files so maybe that is the option. I'm sat at a windows PC at work so I can't look up the mk2fs options for you (sorry) but try a man mk2fs. You didn't say how you created the filesystem, so I presume diskdrake. For ufs (the SUN filesystem) you specify free= to specifiy the root reserved space. If you don't its calculated by percentage. There is also fragsize= (this sets the smallest amount for a file, if you are looking at MM files this should be larger, it will waste some space but give faster contiguous access. You can also set rps = rev. per sec of the disk. Ive done quite a bit of tuning in Solaris for large files and it makes a BIG difference when you tune by hand. If you want performance don't rely on graphical tools becuase the make many default assumptions. In particularly the Draktools (IMHO) are fine to get something working for a noobie but don't optimise ANYTHING, basically they take the safe middleground on everything. Quote Link to comment Share on other sites More sharing options...
static Posted July 3, 2003 Report Share Posted July 3, 2003 The easiest way to do it I think is use cfdisk. Then delete all partitions on this new drive (be sure you're on the right drive!) then create a new one of type reiserfs or xfs that spans the entire drive. Then format it. The last step is to add it to your /dev/fstab. I'll head over to the gentoo installation instructions to check my syntax and be back to give exact commands... Quote Link to comment Share on other sites More sharing options...
static Posted July 3, 2003 Report Share Posted July 3, 2003 ReiserFS is a B*-tree based filesystem that has very good overall performance and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is now rock-solid and highly recommended for use both as a general-purpose filesystem and for extreme cases such as the creation of large filesystems, the use of many small files, very large files, and directories containing tens of thousands of files. ReiserFS is the filesystem we recommend by default for all non-boot partitions. XFS is a filesystem with metadata journaling that is fully supported under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and is optimized for scalability. We only recommend using this filesystem on Linux systems with high-end SCSI and/or fibre channel storage and a uninterruptible power supply. Because XFS aggressively caches in-transit data in RAM, improperly designed programs (those that don't take proper precautions when writing files to disk, and there are quite a few of them) can lose a good deal of data if the system goes down unexpectedly. Ok, here we go (note it's better to read all the way through before starting): I'm arbitrarily assuming the new drive is hdd, capice? [you@yourbox home]$su Enter root password: [root@yourbox home]#fdisk /dev/hdd This will bring up the fdisk prompt: (hit m at any time to see command list) Command (m for help): p //(to Print partitions currently on the drive) Disk /dev/hda: 30.0 GB, 30005821440 bytes 240 heads, 63 sectors/track, 3876 cylinders Units = cylinders of 15120 * 512 = 7741440 bytes Device Boot Start End Blocks Id System /dev/hda1 1 14 105808+ 83 Linux Command (m for help): d (to delete) Partition number (1-4): 1 //(Repeat to get rid of 'em all.) Command (m for help): n //(for New) Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-3876, default 1): 1 [or just enter] Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): 3876 [or just enter] //(use whole disk) Note: If fdisk or cfdisk instruct you to do so, please reboot to allow your system to detect the new partition configuration. Now to format it: [root@yourbox home]#mkreiserfs /dev/hdd1 Last Step: Add it to your fstab [root@yourbox home]#mkdir /mnt/MyNewDrive [root@yourbox home]#vi /etc/fstab //(add this) /dev/hdd1 /mnt/MyNewDrive reiserfs noatime,notail 0 1 Reboot! Now you can use /mnt/MyNewDrive! Quote Link to comment Share on other sites More sharing options...
Gowator Posted July 3, 2003 Report Share Posted July 3, 2003 I'd like to look into xfs more. It depends what you haver on the drive I guess. Im guessing it'll be movies and MP3 so not in the small files categories. Also theyre write once/read many types. I'm actually thinking of doing the same thing. It occurs that the perforamnce of the 120GB drive might not be different from SCSI. I have an older 10k rpm ST cheatah UW and AHA2940UW controller so Ill make some testing and see if the SCSI is any faster. Quote Link to comment Share on other sites More sharing options...
Guest dopeghost Posted July 4, 2003 Report Share Posted July 4, 2003 Hi, many thanks for everyones replies, after reading the post from Gowator i found that you can change the percentage of the filesystem reserved for root using the -m switch. mkfs.ext2 -m = reserved-blocks-percentage (Specify the percentage of the filesystem blocks reserved for the super-user. This value defaults to 5%.) Unfortunately although reiser and xfs seem like interesting options i also want to be able to access the drive when i boot into windows. FAT32 would have worked but it sucks as a filesystem... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.