You are not logged in.
I currently have a simple file server set up that uses the nVidia controller (NVRAID) on the MoBo to control the RAID1 arrays for the storage drives. Currently I'm using all four of the NVRAID controller sata ports yet I find myself needing to expand a bit and that has led me to search for a different solution. I've been looking at documentation for mdadm and it seems so simple, since the OS is on it's own non-RAID drive, that I am concerned I'm missing something. Assuming each disk will only have a single partition would it really be as easy as making my backups, disabling the NVRAID controller and following the simple commands below to have a functioning RAID1 setup ready to load with data? Also will this work the same on a PCI or PCI-E SATA Port adapter card?
Set the partition type with
# fdisk /dev/sd?
# fdisk /dev/sd?
Just to be safe make sure there is no existing superblock
# mdadm --zero-superblock /dev/sd? /dev/sd?
Create a RAID1 array
# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd?1 /dev/sd?1
Format /dev/md0 as ntfs:
# mkfs.ntfs /dev/md0
Mount the Array
# mkdir /myfoldername
# mount /dev/md0 /myfoldername
Then I just make sure to update fstab and mdadm.conf files to make sure the arrays are auto-mounted.
Thanks
Last edited by imatechguy (2010-08-05 02:38:18)
Offline
Yes, it is that easy
Although, why do you want to use NTFS?
And don't forget that you are recreating the array, so you will loose all the data currently on the drives! (You seem to already know this since you're running mkfs but for the benefit of anyone who finds this in the future with the same question )
EDIT
Also will this work the same on a PCI or PCI-E SATA Port adapter card?
As long as the kernel has drivers for the card, then it doesn't matter to mdadm. The kernel should just present the drive as a block device in /dev/
AND, don't forget to 'modprobe raid1' before you start to load the kernel module for RAID.
Last edited by fukawi2 (2010-08-03 22:59:13)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Yes, it is that easy
Although, why do you want to use NTFS?
Excellent thanks, it just seemed so easy I was sure I must be missing something. Most of the information I found was about creating an array to install the OS files to so it was a bit confusing at first. Aaaand, I don't want to use NTFS at all but I haven't convinced the wife to give up 'doze yet so I have to keep these files accessible for her PC.
And don't forget that you are recreating the array, so you will loose all the data currently on the drives! (You seem to already know this since you're running mkfs but for the benefit of anyone who finds this in the future with the same question )
Yep, but I appreciate the reminder. In addition to adding more HDD's I'm also migrating to larger drives so I can afford to start from scratch, and I intend to make backup images before doing anything anyway. They've saved my bacon more than once so I always make sure they're up to date.
EDIT
Also will this work the same on a PCI or PCI-E SATA Port adapter card?
As long as the kernel has drivers for the card, then it doesn't matter to mdadm. The kernel should just present the drive as a block device in /dev/
AND, don't forget to 'modprobe raid1' before you start to load the kernel module for RAID.
Good to know since this thing will eventually store data for personal use, my wife's photography business and the movie files for HTPC box (once I build it) it's going to have a lot of HDDs with everything being mirrored.
Okay that modprobe one made me look. Basically that just loads the Raid modules for a kernel when the system is prexisting and already running to avert needing to reboot to load them... right?
Thanks for the help it really is greatly appreciated.
Offline
Aaaand, I don't want to use NTFS at all but I haven't convinced the wife to give up 'doze yet so I have to keep these files accessible for her PC.
Is this a dual-boot machine? You won't be able to assemble the mdadm array in Windows, so it's likely to end up in tears if you try. If you're just sharing this drive across the network (ie, Samba) then you don't need to use NTFS on it for your wife. Using ext3/4 or another native Linux filesystem will likely be faster, and definitely safer, while still allowing her to access it via Samba.
Okay that modprobe one made me look. Basically that just loads the Raid modules for a kernel when the system is prexisting and already running to avert needing to reboot to load them... right?
Well you'll need to load it every boot if the kernel doesn't include it; the standard Arch kernel doesn't so you'll need to add it to your MODULES=() in /etc/rc.conf
Since you're not booting from the RAID array, you won't need to do anything with mkinitcpio.
Thanks for the help it really is greatly appreciated.
You're welcome
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Is this a dual-boot machine? You won't be able to assemble the mdadm array in Windows, so it's likely to end up in tears if you try. If you're just sharing this drive across the network (ie, Samba) then you don't need to use NTFS on it for your wife. Using ext3/4 or another native Linux filesystem will likely be faster, and definitely safer, while still allowing her to access it via Samba.
No this is effectively a straight up CLI only NAS box, built with spare parts. It has no desktop environment installed, no keyboard or monitor and it's only purpose right now is as a storage space within my LAN. I didn't know I could use ext3 and/or ext4 and still read/write to the drive with a 'doze box. Is that enabled due to SAMBA or do I need a special program or driver? I knew you could do something simlilar for ext2 but not obviously not for ext3/4. I would very much prefer to set the box up with these drives as ext3 over ntfs so that would really be nice.
imatechguy wrote:Okay that modprobe one made me look. Basically that just loads the Raid modules for a kernel when the system is prexisting and already running to avert needing to reboot to load them... right?
Well you'll need to load it every boot if the kernel doesn't include it; the standard Arch kernel doesn't so you'll need to add it to your MODULES=() in /etc/rc.conf
Since you're not booting from the RAID array, you won't need to do anything with mkinitcpio.
Ah I see. I figured I might have to do that but just hadn't looked that far down the road. I knew I had to check the kernel and have the commands to do that written down or linked to somewhere but I wanted to make sure I was on the right track first.
Again I appreciate all the help.
Offline
No this is effectively a straight up CLI only NAS box, built with spare parts. It has no desktop environment installed, no keyboard or monitor and it's only purpose right now is as a storage space within my LAN. I didn't know I could use ext3 and/or ext4 and still read/write to the drive with a 'doze box. Is that enabled due to SAMBA or do I need a special program or driver? I knew you could do something simlilar for ext2 but not obviously not for ext3/4. I would very much prefer to set the box up with these drives as ext3 over ntfs so that would really be nice.
Go with ext3/4 then. Samba acts as the interface and 'translator' between Windows and the Linux kernel, which in turn handles the read/write from disk. The underlying file system is of no consequence to Samba.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
You don't even need to set the partition type through fdisk, as far as I remember. Just make sure the partitions are there, tell mdadm to start an array using partition X, Y, Z, and off you go.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
fukawi2 wrote:Yes, it is that easy
Although, why do you want to use NTFS?
Excellent thanks, it just seemed so easy I was sure I must be missing something.
You think this is easy? You have to try ZFS. It is the bee's knees
Offline
You don't even need to set the partition type through fdisk, as far as I remember. Just make sure the partitions are there, tell mdadm to start an array using partition X, Y, Z, and off you go.
That's correct, but it does help with assembly/recovery if you ever have to do it, especially with LiveCD's like TRK or Finnix
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Go with ext3/4 then. Samba acts as the interface and 'translator' between Windows and the Linux kernel, which in turn handles the read/write from disk. The underlying file system is of no consequence to Samba.
Cool beans, ext3 it is then! Thank you very much for all your input this has been extremely helpful.
Offline