new install opensuse 12.3 help: need info on installing with Raid 1 system disk.

Hi, I actually have several setup related questions so here I go.
the background is:
#1 I am not a Linux guy. I am coming from windows.
#2 I am trying to setup a good robust VM server and file server for my home lab.
#3 I have a 24 bay Supermicro server with 2 AMD Opteron Six core CPU, 56GB RAM 4 NICs(2 build in and 2 PCIe) IPMI,
2x1T HDD for system setup
1x2T HDD for data hold (have more but at this moment only one is available to work with.)

what I am trying to do is :
Setup OpenSuse to boot from 2x1T HDD in soft Raid 1 using btrfs as default file system with a minimal config.
I am thinking TextMode first and add light GUI manually.(I know this is a server and all but I do like to have GUI to work with over CLI)
when done, setup Xen.(currently I am having issues with setting up this, mainly after Xen install my network stop working and I do not see Xen mentioned anywhere in Grub boot.)

once all of the above is working plan is to setup a btrfs Raid 6 data array + LVM for all file sharing needs etc.
and configure NFS/SAMBA shares for my ISOs, media files, applications install, shared user folders etc.
once this is done

planed VMs:

openSuse VM for Domain Controller (not sure if I need this yet but it’s an option)
FTP server , Clonzilla or FOG server with PXE boot options to be able to backup/rebuild my other PC via network

pfSence VM configure to use this as my hardware router replacement.
( WAN/LAN router, DHCP, firewall, NAT,DNS) maybe Domain Controller should be here

Ubuntu or OpenSuse VM for transmission,sanzbs,coach potato,sick beard setup

a VM to host a media server like PlayOn, Serviio, MediaTomb, Plex or MediaPortal server. not sure what the Guest OS will be yet. and what the server will be.

in addition to the above my question is
what the good partitioning schema for system drive can be.
I have setup new system last night but struck several issues thus will be rebuilding it
issue 1 I could not setup/configure raid during install.
the install manager would not let saying I do not have any free devices for raid.
the drives I want to use one was a brand new , right from the box Seagate 1T
the second one is Green WD 1T that had some stuff on it from my XenServer test run, but I have removed all partitions before trying the raid. could it be that install manager still saw the drive as used and refused to delete it?

so I did a setup on single new drive with partitions like

sda\sda1\ 40GB /boot EXT4
sda\sda2\ 40GB /swap swap
sda\sda3\ 100GB / btrfs
sda\sda4\ ~700GB /home btrfs

this is only for system disk.

is there are better way of doing this?
should I use LVM for this?
any other partitions/subvolume to use?

the data raid I will setup as soon as I have a good working system.

thanks.

vl1969 wrote:
> Hi, I actually have several setup related questions so here I go.
> the background is:
> #1 I am not a Linux guy. I am coming from windows.

Wow, for a non-Linux person there’s an awful lot in your message.
There’s one word that’s not there at all though: ‘backup’. How are you
going to do backups for the system?

Also have you read

https://btrfs.wiki.kernel.org/index.php/FAQ#Interaction_with_partitions.2C_device_managers_and_logical_volumes
https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

oh why, why every time I ask a question no mater how specific the question is (or even every other post I see)
It have to ask about backup?

please guys forget about backup.
I will think about it once my system is up and running and doing what I want it to do.
this is not a production system, as in busyness server or anything.
it is a home lab/media server.
most of the precious data that will be hold on it will be either on CD/DVD already or will be put on CD/DVD @ what ever pace I choose to.

I may be a noob to Linux but I have been in IT for the last 20 years.
I have 3 PC running at home that I have been sole admin for years for.
I have a specific question for a specific Distro, and really would like to get an answer to the question(s) at hand, not start a discussion on what the best practice on backing up the system that not even build yet.

I am not trying to be an A@# or anything, I just don’t want to sift through bunch of post that have nothing useful and even related to the question at hand.

I am pretty good at scouting for information, and if I ask the question it means I could not find help so far.

this is my 3rd or 4th attempt in building this setup.
I was building it having something else in mind, to be specific I was trying to virtualyze my UnRaid server. but do to the fact that my hardware does not 100% support IOMMU that is needed for PCI pass through
it have been difficult.
I tried XCP, XenServer6.2, Ubuntu 12.04/13.04 + Xen 4.2/4.3, Mint, ESXi 5.0/5.1/5.5

the only attempt that came close to be successfull was Ubuntu Server 12.04 + Xen 4.2

but during all this quest, I cam to realization that I can build system that might be better for my needs than unRaid using basic Linux distro.
while I was searching for other answers, I came across OpenSuse 12.3 that supports btrfs and raid 6 so now here we are.
if all else fails I can just plug my ubuntu setup back and be done with it.

On 2013-09-26 18:46, vl1969 wrote:
>
> oh why, why every time I ask a question no mater how specific the
> question is (or even every other post I see)
> It have to ask about backup?
>
> please guys forget about backup.

No way :stuck_out_tongue:

You want to use btrfs, and this is considered by many as “unstable”. It
can fail, and the fsck tool is unfinished. The only recovery procedure
then is restore from backup or reinstall.

More things.

Several people have reported big problems installing 12.3 with raid;
they had to install 12.2 instead and upgrade online via zypper dup.

btrfs filesystem is unbootable: you need an extra /boot partition made
in ext2 preferably.

I understand you have experience, but not in Linux. Well, LVM can be tricky.

The minimal pattern is really minimal. It doesn’t even have typical
server type services and applications. I prefer to install the minimal
graphical pattern, or even xfce or lxde patterns.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

robin_listas >> I do appreciate the concern :stuck_out_tongue:
BUT for the sake of simplicity let’s forget about backup.
like I said before the really good stuff is backed up on DVD and everything else can be replaced.
besides I have recently dig out 3 external drives 250-300GB and 2 were dead like a doornail
they used to be the backup… so now what? :smiley:

>>>>
the btrfs were marked as stable recently in wiki.
and is consider stable enough to be offered as default FS for OS12.3 install
it’s good for me.
>>>>

>>>>
might go that way, will see.
>>>>

>>>>
that I gathered from all my readings :slight_smile:
so I setup 4GB /boot partition on the disk and only use btrfs for all others including root “/”
it seams to work.
my question is ho to do that with raid 1?
do I clone the disk my self and than raid it?
>>>>

>>>>>
yeah I figured that out when I tried to run yast2 in text mode and all screen was full of garbage.
so I did zypper up
and installed xfce I think to make it look nicer.
>>>>

so no usable sugestions yet huh :slight_smile: ?

Setting up on a pre setup FAKE or software setup RAID is a problem for the 12.3 installer. Insstalling 12.2 the upgrading vi the net seems to be the work aorund. If you are installing new and setting up a new RAID I think it will work in 12.3. In that case you would select the RAID setup at the install. It is certainly easier there then trying to add a soft RAID after the install.

If you want encryption or expandable partitions LVM is the way you also need a separate boot partition.

On 2013-09-26 20:06, vl1969 wrote:

> the btrfs were marked as stable recently in wiki.
> and is consider stable enough to be offered as default FS for OS12.3
> install

False. It will be included for the first time as default for 13.2, about
a year from now.

It is their developers who consider it stable. Many do not agree.

> it’s good for me.

You have been warned. :slight_smile:

> that I gathered from all my readings :slight_smile:
> so I setup 4GB /boot partition on the disk and only use btrfs for all
> others including root “/”
> it seams to work.
> my question is ho to do that with raid 1?
> do I clone the disk my self and than raid it?

AFAIK, not possible with 12.3. Install fresh 12.2 with raid from the start.

> so no usable sugestions yet huh :slight_smile: ?

Depends on what you consider usable…


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

OK, when I say included as default I man that there is a check-mark during install that you can check to use it as default FS.

and FYI it is possible in 12.3 to setup raid with btrfs for system drive.
I did it yesterday. (although I had screw it up already to the point it want boot but it is possible)

what I did :

  1. on install check use btrfs as default.
    do not use LVM !

  2. use custom partitioning option.

  3. clear both HDD of any partitions if there are any

  4. choose the first(primary HDD you want to use), for me it was easy as the HDD I want to use for system came up as sda and sdb respectively
    I have 2 1TB HDD alocated for this.

  5. Add /boot partition as Ext4 (I have it as 500MB) do not mount at this time

  6. Add /swap partition as swap (I have it as 4GB)do not mount at this time

  7. Add btrfs /root partition as /root (used the rest of the disk ~ 927GB)do not mount at this time

  8. clone the main HDD to the second drive.(ther is an option for this in the Partitioner)

8.1 select each of the partitions on first disk and go to edit,
mount the partition at this time

  1. go to Raid and add both drives to raid
  2. continue install
  3. select to mount grab2 from /boot partition
    I am not really sure if this is a proper way of doing this,I mean booting from partition not MBR, but it worked for me
    I read that it might create issues if you want to dual boot
    but since it is a server setup I do not see this to be important.

my main issue is how to copy grab setup to the second disk /boot space.
I am not to sure on this.

do I just run “dd if=/dev/sda/boot of=/dev/sdb/boot bs=1M conv=noerror”

On 2013-09-27 14:56, vl1969 wrote:

>
> OK, when I say included as default I man that there is a check-mark
> during install that you can check to use it as default FS.

We call that “manually selecting btrfs for install”, not default. :wink:

The current default is ext4.
Previously it was ext3, and previously reiserfs.

By the way. The recommended filesystem for /boot is ext2, not 3 nor 4.
Why? Because it is a small filesystem, and the journal wastes a high
percent of available space. Being small, fsck runs fast on it even in
the absence of a journal.

I make it about 1 G. Previously I thought 200 MB was too much, but
nowdays initrd is growing and growing… I have been bitten with
partition full too often recently. 500 M is just enough now.

> and FYI it is possible in 12.3 to setup raid with btrfs for system
> drive.
> I did it yesterday. (although I had screw it up already to the point it
> want boot but it is possible)

That’s an horrible way of doing it. Not that you are doing it badly, but
that the installer is broken and forces you to find ways around it.

> my main issue is how to copy grab setup to the second disk /boot space.
> I am not to sure on this.
>
> do I just run “dd if=/dev/sda/boot of=/dev/sdb/boot bs=1M conv=noerror”

Unsure. If it is a raid 1, it should be a clone… but there is code in
the MBR pointing to what to load later. Does it refer to a disk, or to a
raid? A raid is not possible in bios, so it must be to a disk. Then it
should be different disk on each mbr.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

<< Unsure. If it is a raid 1, it should be a clone…>>

no , the issue is that on software raid you can not Raid the /boot and / swap partitions (not sure about /swap but /boot you definitely can not raid)
so you only raid the btrfs partition, it is in-fact add only btrfs partition when you select raid option.
but other partition(s) need to be cloned on both drives.
issue is install will only setup boot on one drive, thus making it not redundant for failure.
so /boot needs to be cloned after the install to have a second copy of grab on the secondary disk.(I have read this somewhere in one of the forums but now can not find it.)
I do belive that this is my issue now that drives have been swapped at reboot and system tries to boot from what used to be sdb where /boot is empty.

I think if I boot to live CD and try to clone the part it would fix the boot issue.
but I also know that I might have to do clone of that part. every time I change the grab setting (maybe, maybe not will see).

<< Unsure. If it is a raid 1, it should be a clone…>>

no , the issue is that on software raid you can not Raid the /boot and / swap partitions (not sure about /swap but /boot you definitely can not raid)
so you only raid the btrfs partition, it is in-fact add only btrfs partition when you select raid option.
but other partition(s) need to be cloned on both drives.
issue is install will only setup boot on one drive, thus making it not redundant for failure.
so /boot needs to be cloned after the install to have a second copy of grab on the secondary disk.(I have read this somewhere in one of the forums but now can not find it.)
I do belive that this is my issue now that drives have been swapped at reboot and system tries to boot from what used to be sdb where /boot is empty.

I think if I boot to live CD and try to clone the part it would fix the boot issue.
but I also know that I might have to do clone of that part. every time I change the grab setting (maybe, maybe not will see).

you know, I was also thinking, that I have a 250GB PATA drive and / 120GB laptop SATA
that I can just drop in and put the /boot and /swap on one of them.
than all I will need to do is make an image of that drive and if it fails replace and re-image only this drive
the root and all else will be on raided volume.
that would get me a full redundant system drive

or am I delusional?

vl1969 wrote:
> << Unsure. If it is a raid 1, it should be a clone…>>
>
> no , the issue is that on software raid you can not Raid the /boot and /
> swap partitions (not sure about /swap but /boot you definitely can not
> raid)

For the benefit of anybody else reading this thread, please note that
you can RAID /boot I won’t try to convince vl1969 because s/he knows best.

please convince me by telling me how to do it.

please,please,please…
pretty please with a cherry on top… >:)lol!rotfl!:stuck_out_tongue:

On 2013-09-27 15:56, vl1969 wrote:
>
> vl1969;2587994 Wrote:

> << Unsure. If it is a raid 1, it should be a clone…>>
>
> no , the issue is that on software raid you can not Raid the /boot and /
> swap partitions (not sure about /swap but /boot you definitely can not
> raid)

Yes, you can, both. /boot on raid 1 is done, and swap on any raid. The
advantages of swap on raid are debatable, but it is certainly done.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-09-27 16:36, vl1969 wrote:
>
> please convince me by telling me how to do it.

With 13.1, impossible. We said that it is broken.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Lilo would just read blocks off disk; grub legacy will just try to read filesystem from boot disk. Both should work as long as both partitions have the same number and location on disks.

grub2 supports Linux MD and will assemble RAID1 and open filesystem there.

Where it will possible create problems is duplicating of HDD signature. So ideally one need more intelligent copy which skips this MBR area.

linux-zi0r:~ # cat /etc/SuSE-release
openSUSE 12.3 (i586)
VERSION = 12.3
CODENAME = Dartmouth
linux-zi0r:~ # df -h / /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/md2        4.0G  635M  3.4G  16% /
/dev/md0        250M   38M  200M  16% /boot
linux-zi0r:~ # exit

Simply created MD arrays during installation, nothing special.

Where it has problems - if done during installation (tested with grub2 only), it will install bootloader on one, the first, disk only. I still do not understand how this logic works, but it can easily be fixed after installation. Go to yast - bootloader, select “no bootloader”. Save. Call yast - bootloader again, select GRUB2. Voila - you have “Enable redundancy for MD arrays” active and it installs bootloader in MBR of both disks. And it is fully compliant with openSUSE management toosl and persistent :slight_smile:

Or just edit /etc/default/grub_installdevice and add second MBR (it is supported for MBR only):

linux-zi0r:~ # cat /etc/default/grub_installdevice
(hd0)
(hd1)
activate
generic_mbr
linux-zi0r:~ # exit

now that is usefull :slight_smile:

thanks , I will try that when I get home.

I think I see 2 things I have issue with.

#1 I choose to bootload from partition not MBR on install.
#2 is I am not sure how to create the raid array for /boot on install.

the way I did my partitioning during install is
I choose disk1 (sda) created first partition as “/boot” Ext4 cyl. 0 to what ever the 500MB size would select.
than, I created my “/swap” swap type 4GB
than btrfs “/” of 927GB (the rest of the disk size)
after that I clone to disk2 (sdb)
when I go to raid it only give me option to raid the btrfs partition nothing else I think.
will try again thanks

This won’t work with grub2 and Linux MD for various reasons.

#2 is I am not sure how to create the raid array for /boot on install.

First create partitions on disk of type Linux MD, then create RAID arrays using these partitions. You may need to go into expert mode, do not remember.

it actually worked the first boot. I think.
it booted and all. I was doing some changes so I might have screwed up somewhere.
as when I rebooted last I got the black screen and nothing else.