LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hard drives (https://www.linuxquestions.org/questions/linux-newbie-8/hard-drives-387415/)

kuplo 11-28-2005 07:37 PM

Hard drives
 
I have 2 hard drives my hda1 hard drive is 204gb, my hdb1 is 115gb, everything seems to be on the first hard drive, but what do I do with the second one. I've already setup the machine and it's working fine, i TRIED to reset the second hard drive to linux native with a mount point of /Home but it wouldnt let me. So what do I do with it now.

here is my current fdisk -l

Disk /dev/hda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 131 1052226 82 Linux swap / Solaris
/dev/hda2 * 132 24790 198073417+ 83 Linux

Disk /dev/hdb: 123.5 GB, 123522416640 bytes
255 heads, 63 sectors/track, 15017 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 15017 120624021 83 Linux

MasterC 11-28-2005 07:46 PM

You can give it to me :)

If you want to dedicate the entire 115GB to /home then here's how I'd go about it:

fdisk /dev/hdb

And follow the included instructions to make sure you have that partition, and the partition type ID is Linux (I believe it's 83?).

Once you are done, create the filesystem on that partition (assuming you want ext3):
mke2fs -j /dev/hdb1

And then mount it somewhere to copy your home info over:
mount -t ext3 /dev/hdb1 /mnt/newdrive

And copy:
cp -a /home/* /mnt/newdrive

And then remove your current home 'stuff' (assuming the copy went well, be sure to check):
rm -rf /home/*
And then umount and remount OR one command to do both:
umount /dev/hdb1
mount -t ext3 /dev/hdb1 /home
OR
mount -t ext3 /dev/hdb1 /home -o remount

Cool

pixellany 11-29-2005 08:39 AM

Good answer, but I'm not sure what the QUESTION was....!

For the OP: What do WANT to do with the second drive?

kuplo 11-29-2005 11:31 AM

I want the second drive to start filling up with virtual websites when the first drive is almost full, so I dont have to think about it till the 2nd drive is getting full. When that happens I'll try to add my ata pci card and add more larger hard drives, but thats probably a couple months away. I've got one website already with only 11 users but over 50MB on the drive so it fills up pretty quick.

pixellany 11-29-2005 12:31 PM

Have you considered LVM?

On linux at least, this is a way of having many drives appear as one.

kuplo 11-29-2005 04:24 PM

Is there a way of changing that without destroying whats already done and having to redo it all? The original suggestions from Suse 9.3 was LVM for all drives, but someone else suggested to not use it(can't remember why at the moment).

pixellany 11-29-2005 04:55 PM

I dont know---but I wouldn't try it even if the book said you could.

First, back up all your data---you do have an external usb drive for backup--right?

kuplo 11-29-2005 05:55 PM

Nope, Im just backing up to dvd R the websites, and any other important files I can think of like the virtual host files since I've still got a long way to go to get everything working like mail, ftp etc. Hell I can't even ftp into my own box.

MasterC 11-29-2005 06:15 PM

Check your firewall settings, sometimes that's the hitch that can never be found.

As for LVM..

I switched recently to LVM with an XFS filesystem, and lost the files. Basically it was my own lack of knowledge of LVM and how to switch properly, but I did lose everything. A backup would have been nice ;) Just be sure your backup is as new as possible, then go for it. I personally (now) use partimage for my backups.

Cool

kuplo 11-29-2005 07:01 PM

Someone else suggested the XFS file system, what exactly is that and what are the advantages of using that over the 0x83(I think thats what it is).

MasterC 11-29-2005 07:24 PM

I like XFS because it deletes files a lot faster. It's also, IMHO, a bit 'snappier' when doing anything that is hard drive I/O intense. It's a little different and requires a while to get used to (using the tools I mean) but it's nice for growing filesystems:
xfs_grow

It seems that a lot of people prefer it for LVM use too.

Cool


All times are GMT -5. The time now is 07:27 AM.