Adding a new HD

Dr-Host

Verified User
Joined
Mar 23, 2004
Messages
109
Location
Israel
I got 2 questions related to adding a new hard drive

1) If I will change the name of /var to something and set in /etc/fsbtab that /var is the new /dev/hdb3 and then copy all the data from the old /var to the new /var will it copy it to the new HD and will it work fine

2) If I want to add a new HD to be used as a new /home where do I mount it to and how do I make DA to use the new HD for the new users, and still being able to control the old users on the original /home

Thanks,
David
 
Hello,

1) That sounds correct to me.

2) You can add /home2 (or anything) on the new drive. Edit /etc/defaut/useradd and set HOME=/home to HOME=/home2. DA itself doesn't care where the new home is. The useradd program is the one who decides where it goes, so by changing the default path for useradd, DA will follow without complaint :)

John
 
Ok John thanks I'm gonna add 2 new HD's to both of my box's
so just wanted to make sure I was right

Thanks again

David
 
DirectAdmin Support said:
Hello,

1) That sounds correct to me.

2) You can add /home2 (or anything) on the new drive. Edit /etc/defaut/useradd and set HOME=/home to HOME=/home2. DA itself doesn't care where the new home is. The useradd program is the one who decides where it goes, so by changing the default path for useradd, DA will follow without complaint :)

John
I have no users yet, and want to move my home directory to my second hd, would that be fine to do as well?

I think the answer is yes, since the previous poster wanted to keep some of his on the other drive.

TIA.
 
Actually, after looking, it looks like I do have some users (admin, ftp, and some others). I'm guessing I'd be fine to just move them?
 
Once you make the changes John suggested all old users should stay on the old partition and all new users should end up on /home2.

And all should continue to work.

Be sure to save copies before you change any systems files, in the event you must change back.

Jeff
 
Yeah, I did some research, and in a dedicated environment like most of us are in, it's nearly IMPOSSIBLE to do, because you'll have to start the box in single user mode to actually change the mounting...

Anyway, I'll do the home2 option for sure.

Thanks again.
 
You shouldn't have to put the box into single user mode.

You can change fstab (I think that's the right table to change, but I'm not looking at docs right now) and reboot the system.

Of course if you make a mistake, then you do need to go into single-user mode to fix it.

Jeff
 
I'm referring to moving /home off /dev/hda to /dev/hdb.

The problem you run into if you move the data or unmount it is programs are accessing it unless you're in single user mode. At least according to what I read anyway??

If I can ever get my test box live (just need time), I'll test it and see if you can do it on the fly.
 
We've done it remotely.

You'll have to stop certain services while you move data, but you don't mount/unmount live partitions if you're afraid of corrupting data; you just change fstab and reboot the server.
Jeff
 
hmm, could it be that easy? I'll get my test box up and give it a whirl and see. I just had to have 15 min reinstall because I was trying it, thought I had it all perfect, rebooted, and ... well, appearently I didn't :)

Fortunately, no customers on it yet (but they will be by the end of the month).
 
Just make sure you don't make any mistakes in fstab.

I'd suggest strongly you look for instructions on the 'net, as I don't want to have you blame me for having to pay for another reinstall.

Jeff
 
well can someone assist me, I had the center install a second hard drive, and friend had told me that he could "see" it but it needed partitioning, now he has left for school and Im not sure what I need to do to finish this project.
This HD was added solely for backup for a different server's use .
can you tell me what steps I need to do?
I have shell/root access, where do I go to see it and then how to partition it as a single partition thats accessible through ftp from the other server...
thanks
 
One question here about add new HD

Before only one hardisk and install directadmin already, but right now the space not enough, so need add new HD for reseller and user, how to do it ?
 
Directions for adding drives to linux/unix are all over the 'net; Google is your friend.

As far as DA support is concerned...

AndyII, once you've created a partition for your new drive (you can call it something like /backup, simply set DirectAdmin to backup to that drive.

Gsmdenis, DirectAdmin cannot create new resellers/users on different partitions at the same time; you can change DA (see the directadmin.conf file) to use a different partition for all new accounts from now on, but that's all you can do.

DA will continue to find all sites previously setup on the original partition.

Jeff
 
thank you Jeff,
on google I did find this, looks good and does show me the added drive, Ill send the page I found for others to see, 1st, would you say this is correct?
also is formating in ext3 the best?
http://www.eth0.us/mount
#fdisk /dev/hdc --or whatever the drive letter actually is-----

-press "n" for new partion
-press "p" for primary partition
-press "1" for the first partition
-press enter for the first AND last cylinders. This will make it automatically use the entire disk
-press "w" for write out to save what you have done



The next step is to make the filesystem readable by linux. I am going to have you format it in ext3 which is the most common filesystem type.

#mkfs.ext3 /dev/hdc1 ----example drive name----

Note that I have used "hdc1" because it is the first partition. Now we are going to set the disk to automatically be mounted on boot as /backup. Again if you want it placed someplace else simply rename the directory.

#mkdir /backup

#pico -w /etc/fstab

Add the following line:
/dev/hdc1 /backup ext3 defaults 1 1



Now test it out

#mount /backup
next question, suppose this all went as planned, I could use it as a backup drive for server "A", but what if I wanted to use this drive for server "B", how would I get ftp/ access to it, using Admin Backup/Transfer RC1.
 
thank you Jeff,
on google I did find this, looks good and does show me the added drive, Ill send the page I found for others to see, 1st, would you say this is correct?
also is formating in ext3 the best?
Looks good to me at first glance, but I didn't study it.
next question, suppose this all went as planned, I could use it as a backup drive for server "A", but what if I wanted to use this drive for server "B", how would I get ftp/ access to it, using Admin Backup/Transfer RC1.
Simply create an ftp account on server A, with /backup as the starting directory.

Jeff
 
Back
Top