Kodi Community Forum

Full Version: XBMCbuntu and RAID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want make media PC with 2x1TB HDD in raid 1 + one small hdd for system.
Raid is supported by bios and question is, if is necessary install xbmcbuntu with running raid or is possible switch on raid after xbmcbuntu installation.
I hope that xbmcbuntu support raid.

Thanks

Alda

Remarks: I installed xbmcbuntu to small drive with raid swiched off and later I swiched on raid and raid was not recognized.
Got the same problem not seeing any raid disks available did you got it to work without raid?
If your using the bios raid, it should be as simple as creating the array. I do know that some older onboard raid controllers are just fancy software driven arrays. I imagine this hasn't changed. I these case its a toss up to see if the array is actually detected as a mirrored drive. My experiences in such instances, you see multiple drives that you can't really use. I tend to either use a true hardware raid controller or set the raid to just a bunch of disk mode and use operating system level mirroring. Linux you can use lvm or mdadm to accomplish raid 1 mirroring.
Thanks, Now I'm testing mdadm and looks that's working. Only I'm not sure which kind of partition must be prepared for mdadm or if the disk must be empty without partition.

Alda
I do have bios raid and already created an array.
I actually can see the disks on install ( as separate disks, where in windows I would see it as one )
I decided to leave them alone on install and partition them when the install finished. ( using an other disk for the OS )

They don't show up in the system maybe I need to partition them first? ( they are NTFS partitioned as it was a windows machine, but the data has been backuped so I can wipe them )

Should I run the install again and partition the disks, or can I do it form within xbmcbuntu ? also like Alda says I don't know what partitions should be used. ( in my case there just data disks )
I would not recommend leaving the disk ntfs if you plan on writing data to it via linux. It does work, but strange things happen sometimes, and typically when these occur its catastrophic. Reading data from it is fine. If you did want to reformat it with a linux file system you can.

First thing you need to do is figure out which hard drive is your mirrored raid 1. A quick
#sudo fdisk -l
This is the letter L not 1. This will show all the hard drives in the system. You should only see the one raid mirror drive, not both 1TB drives. If you see both 1T drive, you need to check to see if your raid controller is supported in linux.

Here is an example:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008a063

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 999423 498688 fd Linux raid autodetect
/dev/sda2 999424 312580095 155790336 fd Linux raid autodetect

So you see the drive is 160 GB with two partitions, which are devices /dev/sda1 and /dev/sda2
My example above is using mdadm for mirroring. sda1 is a small boot partition and the other is just used for lvm. I'm just trying to explain the Linux raid autodetect.

Once you find your big drive, just make a mental note of it.
If you want to format it, this is where you proceed with that.
mkfs.ext4 mkfs.xfs mkfs.ext3. I'm not here to promote one linux filesystem over another, I will allow you to decide this. Everything has strengths and weaknesses. I will say ext4 and xfs seem to be the more common choice on larger drives.
To format the second partition in the example above with ext4, simply #sudo mkfs.ext4 /dev/sda2
Again this step can totally be skipped if you are wanting to keep the ntfs.

Next step I would restart udev to recreate all the dev uuid links. I know this uses to be a required step, but may not be now. No harm comes from doing this.
#sudo restart udev

Get the uuid for the drive.
#sudo blkid

/dev/sda1: UUID="RZpOgA-TQej-9N4b-qX7M-nLBH-sBhj-u13aXk" TYPE="LVM2_member"
/dev/sda2: UUID="7af02b9b-6cd1-4b49-883d-030119255804" TYPE="ext4"

Just make note of the uuid without the quotes. Type will be ntfs if you did not format.

now edit /etc/fstab with your file editor of choice. Mine is vim.

#sudo vim /etc/fstab

NTFS example: I have a folder off the root, called /xbmc, which I will mount the ntfs partition. Since ntfs you need to specify a user/group of who owns the files and directory mask and file mask of the files on the drive. In short windows does file security and owners differently. The owner should be what ever linux account you run xbmc under.
Append the following:

UUID=7af02b9b-6cd1-4b49-883d-030119255804 /xbmc ntfs-3g defaults,user,locale=en_US.utf8,rw,uid=xbmcuser,gid=xbmcuser,dmask=0002,fmask=0111 0 0

Save the file and run #sudo mount /xbmc

EXT4: Similar /xbmc folder.
UUID=7af02b9b-6cd1-4b49-883d-030119255804 /xbmc ext4 defaults

Save the file and run #sudo mount /xbmc
Copy your media files.

In either case, you should be able to add the /xbmc folder to the video list