2

I need to create a file server using Ubuntu Server 13.10 with the following specifications:

  • 1 80Gb HDD:
    • grub boot manager
    • System files
    • apache server files
  • 2 identical 1000GB HDDs:
    • RAID 1 array for redundancy (/dev/md0)
    • files that will be accessible via FTP
    • home folders for all users on the system with those said files

Here's the issue I'm having:

While installing Ubuntu Server 13.10, I forgot to set the RAID array (/dev/md0) to be mounted as the home folder. I finished configuring everything about the FTP server, apache, ssh and other services.

Now I noticed that the RAID Array was not being used at all,

Every solution I look at says to essentially reinstall everything, and start over. I'd rather not do that.

How do I set /dev/md0 to be mounted as a home partition without reinstalling the system?

5
  • @ElliottFrisch would you mind to be a bit more precise about how to add the /dev/md0 to my fstab saying that it should be mounted as /home. Is it '/dev/md0 /home ext4 defaults 0 0' ? or something else?
    – Kasama
    Apr 15, 2014 at 20:27
  • I have to go fight Atlanta traffic, don't expect a quick answer. However, that looks right. Apr 15, 2014 at 20:33
  • man, you are a freaking genius. Thanks a lot you helped me a bunch. What you said did it seamlessly
    – Kasama
    Apr 15, 2014 at 20:43
  • @Kasama Please don't put solved in the title. You indicate your problem has been solved by upvoting an answer or marking it as 'accepted' (the checkbox underneath the voting box for each answer). Apr 16, 2014 at 0:37
  • 1
    @GeorgeStocker I know that, but the solution came first via comments, which I cannot mark as accepted, but now as Elliott posted a answer I can do it, thanks
    – Kasama
    Apr 16, 2014 at 1:12

2 Answers 2

5

To move your /home partition (which is a risky thing to do), you will need to -

First, format your new partition -

mkfs.ext4 /dev/md0

Then, add "/dev/md0" to your "/etc/fstab". Something like -

/dev/md0     /home     ext4     defaults     0     0

Then (the "p" is for preserve permissions)

tar cfp /home.tar /home

Next,

rm -rf /home && mkdir /home && mount /home

Finally,

tar xvvf /home.tar

Of course, if it doesn't work you will need to reinstall your system.

0

1st answer really helped me but when I tried to do "mount /home",

mount: wrong fs type, bad option, bad superblock on xxx.xxx.xxx.xxx:/directory, missing codepage or helper program, or other error

this error occurred.

So I did "mount /dev/md0 /home" and then it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .