Unable to mount mirrored drives

slincoln
Posts: 6
Joined: Sun Aug 19, 2012 12:50 pm

Unable to mount mirrored drives

Postby slincoln » Sun Aug 19, 2012 1:28 pm

Hi,
I'm new to Amahi and Linux so how you can all help.
I bought myself a HP ProLiant N40L MicroServer and have had my Amahi server up and running for about a month now.
I have recently bought 2, 2TB hdd's which I want to use to store all my files. I've added them to the HP and configured them as a raid 1 mirror. The HP shows the mirror in the BIOS as it boots.

I then followed the instructions in the Amahi Wiki for adding another drive.
I installed gparted, partitoned, formatted and labelled the new mirror as shown below.

Image

I then run hda-diskmount and get the results as shown below

Image

Unlike the example in the wiki, I cannot see what to add to the /etc/fstab/ file.

If I logon to Fedora and open "Computer" I see the new 2TB hdd. I cannot access it though as I get a "Unable to mount location" error. I presume that's because I am logged on as my normal account and not root, but do not know how to mount the drive as root.

Not sure what other information you may need but really hoping you can help.
Many thanks.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Unable to mount mirrored drives

Postby bigfoot65 » Sun Aug 19, 2012 2:03 pm

If you had the drive connected when you installed the OS and Amahi, then it is already there. It works best if you disconnect the drive, remove it from /etc/fstab and reboot. Then add it using hda-diskmount script.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

slincoln
Posts: 6
Joined: Sun Aug 19, 2012 12:50 pm

Re: Unable to mount mirrored drives

Postby slincoln » Sun Aug 19, 2012 3:15 pm

Thanks for replying but I'm not sure I understand.

Are you saying I should turn off the hda
Remove the two drives which make up the mirror.
Turn on the hda and edit /etc/fstab/
Turn off the hda again and reconnect the two drives
Turn on the hda and run hda-diskmount

This is my /etc/fstab/ at the moment;


#
# /etc/fstab
# Created by anaconda on Wed Jun 6 20:15:53 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_hps-lv_root / ext4 defaults 1 1
UUID=3f164e7f-d587-4164-bf15-daa31801c33e /boot ext4 defaults 1 2
/dev/mapper/vg_hps-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_hps-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0


What is it I should be editing out after removing the drives?
Thanks again.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Unable to mount mirrored drives

Postby bigfoot65 » Sun Aug 19, 2012 5:30 pm

Yes. It is recommended you install the OS with no other drives connected. Then once Amahi is installed, you can reconnect them.

There really is no need for RAID as Greyhole will keep copies of all your share files. You need to figure out which lines in /etc/fstab are for those two drives. Then before you shutdown, comment them out or remove them.

You might be able to just do a restart and then the OS will not see them in /etc/fstab and will show them when you run hda-diskmount. That seems to be the best way in my opinion.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

slincoln
Posts: 6
Joined: Sun Aug 19, 2012 12:50 pm

Re: Unable to mount mirrored drives

Postby slincoln » Mon Aug 20, 2012 12:07 am

Thanks again.

Just to be clear, the OS and Amahi were originally installed with just the one drive installed. It's been running for over a month as I was playing around with media streaming.
It's only in the last couple of days I've added the two new drives.

I've rebooted numerous times since and it's made no difference. hda-diskmount gives the same result every time.

After rebooting, I can see the mirror in "Computer" but cannot access it. I've since found that I can run Fedora's disk utility as root (cannot remember the command, I found it on another site) to mount the mirror and then I can access the mirror in Fedora.
But it's only temporary until I reboot.

However, even though I can mount the mirror in Fedora, it does not seem to effect /etc/fstab/ and I still cannot see the mirror in Amahi.

Surely it cannot be this hard.

Thanks again

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Unable to mount mirrored drives

Postby bigfoot65 » Mon Aug 20, 2012 4:53 am

Sorry if I misunderstood your configuration. I am not familiar with RAID setup and do not use it. I am just trying to be helpful.

Since you are having to manually mount them after reboot, maybe there is some guidance on the internet for making them mount on boot. The real problem here is not Amahi, but the OS not mounting them.

I would think you could manually add the drives to /etc/fstab without using hda-diskmount. Make it look like what hda-diskmount would yield if it detected the drives.

Try to get the info on how it's mounted, then add that to the file. Once you do so, you should be able to do

Code: Select all

mount -a
as root user. If there are no errors, then it's a good indication it worked. Only true test will be reboot of the HDA of course.

Have you checked out the RAID guides in the wiki? They might help. There also may be some guidance here in the forums, but not sure.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

slincoln
Posts: 6
Joined: Sun Aug 19, 2012 12:50 pm

Re: Unable to mount mirrored drives

Postby slincoln » Mon Aug 20, 2012 2:05 pm

Hi Bigfoot65,
I appreciate your trying to help but Linux is new to me and I'm struggling a bit.
Anyway, this is where I am.

I decided to take the two 2TB drives out of my server and start again.

I went into the BIOS and broke the RAID1 mirror, shut down and removed the drives.
Restarted and made sure the server and Amahi were working as I expected them to. All was OK.
Switched off and inserted ONE of my drives and followed the instructions in the Wiki for adding another drive to the hda.
All went as per the instructions and I was able to move shares to the new drive and use it in Amahi.

Switched off and inserted my 2ND drive as an individual drive.
Restarted and followed the instructions in the Wiki for adding another drive again.
All went well and now Ahami could see both my two 2TB drives as individual drives and I was able to move shares and data around.

I know you say "There really is no need for RAID as Greyhole will keep copies of all your share files" but I don't understand Greyhole enough to put my trust in it.
I want to be sure that if one drive fails, all my data is intact as a copy on the other drive. That's why I want to use a RAID1 mirror.

Anyway, I reverted all the shares to their original location and used Fedora's drive utility.
You have to open a terminal as root and run the command palimpsest. Don't know why the disk utility has the command palimpsest, makes no sense to me.
Using the disk utility, I was able to select the two 2TB drives and create a software RAID1.

Image

The disk utility gave me a device name of /dev/md0p1 and once it was formatted, it mounted it as /media/RAID1/
I then added the line /dev/md0p1 /media/RAID1/ ext4 users,rw 0,0 to /etc/fstab

After a reboot it was not mounted. Disk utility reported it with a different device name.
It now had the device name /dev/md127p1
Edited /etc/fstab to reflect the new device name and ran mount -a
It failed with error "mount point RAID1 does not exist."

Created folder RAID1 in /media using terminal and tried command again but still failed.
Created folder RAID1 in /var/hda/files. Edited mount command in /etc/fstab to new location and tried mount -a again.
This time it worked.

Aftr reboot the software raid was mounted automatically as /dev/md127p1/ /var/hda/files/RAID1

So this is where I am, I have it working but only by using software RAID. This is not ideal as it carries a large processor overhead.
Much better to have the hardware perform the RAID I think.
So, tomorrow I'm going to break it all again, re-create the hardware RAID mirror in the BIOS and see if I can work out how to mount that.

Hopefully. all this is of some help to others as well.
Thanks.

slincoln
Posts: 6
Joined: Sun Aug 19, 2012 12:50 pm

Re: Unable to mount mirrored drives

Postby slincoln » Mon Aug 20, 2012 2:07 pm

Sorry, meant to add.
When I had the two drives configured in a software RAID1, I tried hda-diskmount but it did not see anything, only the single 250Gig boot drive.
It would seem that script does not see RAID volumes.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Unable to mount mirrored drives

Postby bigfoot65 » Mon Aug 20, 2012 2:35 pm

So sounds like you are up and running. I would think it would be simpler and timely to learn about Greyhole vs sticking with Raid. Of course there are many who would not do anything without it.

Let me give you some insight on what it does. It puts copies of files on as many drives as you have based on the settings. Once you have all the drives added, you configure them for the storage pool via the dashboard.

Then you configure each share independently as to how many copies of files you desire, from 0 to max. Then when Greyhole runs, it copies the files to each drive as indicated. The original file in the share is then symlinked to the Greyhole share. So, you always have a copy of every file if you have it set for max. It stores the files in a directory called gh on each drive.

It works quite well and many have been using it. If you want to learn more, check out the web site.

http://www.greyhole.net/

I am not a big fan of RAID for home use as I have heard many horror stories of losing data. Greyhole is simple and if you lose a drive, you replace it, add it to the storage pool, and the files are automatically copied to the new drive. There are many features in place to handle most anything from drives going bad to drives gone bad. It even has a built in recycle bin that has saved my butt a few times.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 10 guests