Australian Media Center Community: Arch Backend Home Server Questions? - Australian Media Center Community

Jump to content


Welcome to the Australian Media Center Community

You are currently viewing our support forum as a guest - you'll need to register in order to participate in our community and make this annoying message disappear!

Registration is fast, simple and absolutely free - so why not join our community today and register now. If you experience any problems with the registration process, please send a message to Mike

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Arch Backend Home Server Questions? Rate Topic: -----

#1 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 20 November 2010 - 03:18 AM

Hey Guys

I am now building a Arch Backend Home Server and i have a couple of question before i start.

Here is a list of what i need the server to do

Myth-Backend
Torrent Flux, Webmin, MythWeb
File Share (Samba/NFS)
Run a XP Virtual Machine (Most liky kvm)



1. To set up myth-backend does X need to be installed. should i have a desktop installed or can it all be done at command line.

2. I'm gonna have 4x 1tb hard drives (raid 5) with lvm but still have 1 big file for it eg /media. (is this correct cause its lvm i can add another hard drive to the raid at anytime)

3. I also gonna have 1 500gb hhd and 1TB hhd for the rest of the server. i am wanting to have 30gb from the 500gb hhd as root / but have this 30gb raid 1 on the 1TB hhd so i dont have to rebuild the server if the 500gb hard goes. (is this possible? is it just lvm???)

4. on the 1TB hhd i want to have (30gb for raid 1 of root) then the rest mount /software and as /downloads (is this possible?) i want the whole 1tb spreader across 2 mount points. or do i have to set a size on both so 500gb on each

5. i have 4 onboard sata ports and 1 via 6421 sata raid card as i dont wanna hardware raid is t possiable to boot from the raid card in linux?? its only sata1 speeds so i dont wanna put any of my raid drives on it
what am i best to do about this???


that's all my question for now
also are you able post the link to the first part of this post http://www.xpmediace...haring-etc.html

Thanks

This post has been edited by BadT18: 20 November 2010 - 06:59 AM

0

#2 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 21 November 2010 - 09:37 PM

BadT18 said:

Hey Guys

I am now building a Arch Backend Home Server and i have a couple of question before i start.

Here is a list of what i need the server to do

Myth-Backend
Torrent Flux, Webmin, MythWeb
File Share (Samba/NFS)
Run a XP Virtual Machine (Most liky kvm)



1. To set up myth-backend does X need to be installed. should i have a desktop installed or can it all be done at command line.


Yes you need X but you don't need a graphic card. It's possible to install vnc, run a virtual framebuffer, connect to it remotely from another machine via a vnc viewer and run the myth setup program that way.

Quote

2. I'm gonna have 4x 1tb hard drives (raid 5) with lvm but still have 1 big file for it eg /media. (is this correct cause its lvm i can add another hard drive to the raid at anytime)


No. That's a lousy Windows view of the world in hard disc land. You're far better off to:

1. Make the raid5 array with mdadm.
2. Create a volume group from the resultant array.
3. Create smaller (no where near full size of the array), logical volumes for separate types of files.

If you just make 1 huge disk the size of the array you may as well not use lvm and just format the full 4 TB as one filesystem and mount it without lvm.

lvm gives you flexibility. The most obvious example that I use is this:

If you have one big /media (4tb), and your Live/Recorded TV goes into there, you won't monitor how much space it's using up. Myth will tell you you have zillions of hours recording time left, but eventually the 4tb will start to fill, you'll add a heap of HD movies to your movies directory, a heap of downloaded tv in there, music, photo's etc etc... Then one day you'll realise you have 1TB of recorded TV that has to be cleanup up but you'll no longer have the space to move it anywhere or even transcode it to a smaller size. It's far better instead to create logical volume of 300GB in size for recorded TV. If it starts filling you can do something about it before it fills the array, it also keeps the family (or yourself) in check as you're forced to do something about it sooner.

There are many other reasons. I always suggest this sort of layout (from my machine on a raid 5 array):


Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 10M 288K 9.8M 3% /dev
/dev/sda2 ext3 14G 11G 2.7G 80% /
none tmpfs 1008M 0 1008M 0% /dev/shm
/dev/mapper/raidvg-lv_home
ext4 50G 32G 15G 69% /home
/dev/mapper/raidvg-lv_audio
ext4 60G 47G 9.8G 83% /home/rick/Documents/audio
/dev/mapper/raidvg-lv_video
xfs 3.0T 2.5T 536G 83% /home/rick/Documents/video
/dev/mapper/raidvg-lv_tv
xfs 300G 81G 220G 27% /home/rick/Documents/video/RecordedTV
/dev/mapper/dlvg-lv_downloads
ext4 296G 162G 119G 58% /home/rick/Documents/downloads
/dev/mapper/raidvg-lv_images
xfs 25G 16G 9.5G 63% /home/rick/Documents/images
/dev/mapper/raidvg-lv_videoedit
xfs 600G 552G 49G 92% /home/rick/Documents/video/Edited


As you can see each "area" is it's own logical volume. This allows me to:

1. Have different filesystems for the various types of files. xfs is useful for large files (like video), ext4 is good for smaller files, not doing this will consume far more disk space than it should.
2. xfs filesystems are checked much faster than ext4 ones. If you have the whole space as one big drive and the system wants to do a 30 day "fsck" check it'll be an hour before the system can be used. So it makes sense to have the larger logical volumes (video), as xfs.
3. xfs can be defragmented as well which can speed performance for tv/video.
4. Having the logical volumes separated and at the size they need to be gives you flexibility. If for some reason you need more space for music, then you allocate it to music.
5. If someone gives you a pile of video files (1tb for instance), and you haven't allocated all the space, then you can create a temporary logical volume called "to sort", dump it all in there and then you can go through it and copy things into your real "video" volume that you want to keep. When you're done delete the logical volume and the space becomes free to allocate when you need it.
6. Doing it the above way makes you manage your storage. The idea is to leave as much space empty as possible, as you allocate it where it's needed you'll see when it's time to start thinking about getting more space. Rather than the windows way of panicing when all 4TB is full, no sata ports are left, and you can't fathom how to move 4TB of data from 4x1tb disks to 4x2tb disks.
7. The above keeps your options open. i.e. If you did have 1 sata port left you could plug in a 2TB drive, add it to the volume group, and lvmove one logical partition from the array to the new disk. This is done at block level so there's no file copying, lvm takes care of everything.
In short, it allows you to juggle things enough to be able to upgrade the size of the array onto new disks without any file copying like you'd have to do in Windows.
8. Backup. It's a damn site easier to back up important content when it's logically separated by defined boundaries.

Good storage management happens well before you format the first disk. Design it well and it will serve you well. Slap it all into one big "virtual" 4tb disk and you'll live to regret it, over and over and over ;)

Quote

3. I also gonna have 1 500gb hhd and 1TB hhd for the rest of the server. i am wanting to have 30gb from the 500gb hhd as root / but have this 30gb raid 1 on the 1TB hhd so i dont have to rebuild the server if the 500gb hard goes. (is this possible? is it just lvm???)


If you want. It can be done with pure lvm of the probably better way would be with a combination of lvm on top of md, and for a home server, is just overkill in my opinion. It'll add a lot to the overhead of managing it. I've thought about doing this myself but I find that if each time I make a change to my server I take a clonezilla image, then I'm fully covered anyway (and once it's built it hardly ever changes). Mirroring / is what we do on corporate servers. For home it's not really necessary. Besides. If you have /home on the raid volume (where it should be), then 98% of configuration data is safe, even if you have to re-install the OS and packages. if you make sure /etc is backup up then that's 100% covered. The OS files themselves can be put back easily. It's the config you don't want to lose and all that lives in /etc and /home.

Mirroring / means your initrd has to be lvm and/or md aware and it can make kernel upgrades difficult if anything goes wrong and you can't boot from a live cd and mount your root filesystems.

Quote

4. on the 1TB hhd i want to have (30gb for raid 1 of root) then the rest mount /software and as /downloads (is this possible?) i want the whole 1tb spreader across 2 mount points. or do i have to set a size on both so 500gb on each


lvm will let you add a partition + an entire drive into one "virtual drive", called a volume group which you an then create logical volumes of any size on. They can span less that one disk or all of both disks. Whatever you want. But again, it's better to not allocate ALL the space up front. I have 12TB (10TB usable) in my machine but currently only 4TB is allocated:


--- Volume group ---
VG Name raidvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 6
Open LV 6
Max PV 0
Cur PV 1
Act PV 1
VG Size 9.10 TiB
PE Size 4.00 MiB
Total PE 2384657
Alloc PE / Size 1048320 / 4.00 TiB
Free PE / Size 1336337 / 5.10 TiB



I'll use that space when I need to ;) I also have a single 1TB sata in use as a boot drive and there is something else that you haven't yet factored in. What happens when you need to do package upgrades to upgrade your OS? Or if you need something new? The design most of us are using caters for a second partition to "copy" your existing root (/) to. You can then boot from it, upgrade it, test it, confirm it works etc etc. Assuming it can take days to do that testing you leave the default grub boot to boot the original fully functioning OS. When you're happy the upgrade is complete and fully tested then you switch grub to boot from the upgraded copy, freeing the old one for the next upgrade cycle. You can't do any of that easily with lvm.

So my 1tb drive is partitioned as:

sda1 - /boot (or more accurately, grub files only)
sda2 - 2gb swap
sda3 - 15gb (OS primary)
sda4 - Extended partition (rest of the drive)
sda5 - 15gb (OS secondary, for upgrades)
sda6 - remainder of drive (/downloads). Not raided, but I don't care if I lose anything in there.

To backup, I simply image sda3 or sda4 (whichever is the active partition). In your case you can merge sda6 with sdb (a second 1TB drive), with lvm to have it all usable. Note though that if you lose either of sda or sdb the contents of the logical volumes on BOTH those disks will be gone, so nothing is safe in that scenario. So your /software and /downloads would cease to exist. Don't put anything in there that you want to keep :)

This also brings up another point.. Bet you didn't realise these questions were so big? Raid5 IS NOT A REPLACEMENT for backups. I've seen numerous raid array's die completely. It only protects you from failure from 1 disk and you'd better make sure you get alerted if 1 ever fails as the second one may not be far behind. If you don't back up important files consider them as just as unsafe on a raid 5 array as they are on a single drive.

Quote

5. i have 4 onboard sata ports and 1 via 6421 sata raid card as i dont wanna hardware raid is t possiable to boot from the raid card in linux?? its only sata1 speeds so i dont wanna put any of my raid drives on it
what am i best to do about this???


Depends on the card and your bios. Only way to find out is to try it. Personally I'd go and buy a cheapy sataII PCI card and use internal ports for your boot disk and use the rest of the internals+PCI ports for the array. The good thing about software raid is you can move all the disks to a new motherboard with 8 sata ports later on and everything will just work (just did this myself, it's very cool). Then you'd have another 4 ports to build a 2tb disk based 8tb array you can move the 4tb off onto, then replace those 4tb with another 8tb, create an array on it too, then combine both 8tb arrays with lvm to grow the existing lvms across 2 arrays...(all directories/moutpoints remain unchanged even though you've quadrupled your storage! Ultimate Flexibility without a bunch of unnecessary file copies, creation/deletion of things, no juggling, just more space :)

Quote


that's all my question for now
also are you able post the link to the first part of this post http://www.xpmediace...haring-etc.html

Thanks


No need. I just explained the partitioning scheme that you were missing in this one ;)

Glad there's no more questions. My keyboard is on fire!!

Cheers,

Arkay.
0

#3 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 03 December 2010 - 09:29 AM

Thanks Arkay for getting back to me with the info and the super long post.

I have Installed Arch but i got a couple of questions

First i have made my raid 5 with

# mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

worked well

then did
# pvcreate /dev/md0

# vgcreate raid5 /dev/md0

# lvcreate --size 1.5TB --name videos raid5


after that i now have /dev/dm-0

now how do i format it and mount it??

is this correct
#cfdisk /dev/dm-0
make a partition.

Then im not too sure how about formation it.

?????
#mkfs.xfx /dev/raid5/videos
didnt work tho :(

then when mounting it just add it in fstab??

/dev/dm-0 /media/videos xfx defaults 0 1



also do i have to add raid5 and dm-mod to rc.conf???


i other problem i have is when my system boot it comes up as
waiting 10 secs for /dev/sda3 (which is root part)
then says root device doesnt exist.

and doesnt boot but then i restart a couple of times its works fine. then restart again same thing happens.

i think its because my 500GB hard drive (root drive) keeps changing from sda to sdc not sure y though


this is my df output there is some werid thing in there just wounding if you can check or explain them to me
[tony@server ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 10240 236 10004 3% /dev
/dev/sda3 33641476 1935224 29997340 7% /
shm 902396 0 902396 0% /dev/shm
/dev/sda1 186663 14565 162461 9% /boot
/dev/sda6 24027628 176064 22631028 1% /businessfiles
/dev/sda7 387298168 199096 367425476 1% /downloadz


i was reading through duffy's output on him backend and noticed he didnt have udev and shm just wounding why i do
Thanks
Tonz

This post has been edited by BadT18: 03 December 2010 - 11:28 PM

0

#4 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 04 December 2010 - 03:19 AM

BadT18 said:

Thanks Arkay for getting back to me with the info and the super long post.

I have Installed Arch but i got a couple of questions

First i have made my raid 5 with

# mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

worked well

then did
# pvcreate /dev/md0

# vgcreate raid5 /dev/md0

# lvcreate --size 1.5TB --name videos raid5


after that i now have /dev/dm-0

now how do i format it and mount it??

is this correct
#cfdisk /dev/dm-0
make a partition.

Then im not too sure how about formation it.

?????
#mkfs.xfx /dev/raid5/videos
didnt work tho :(

then when mounting it just add it in fstab??

/dev/dm-0 /media/videos xfx defaults 0 1



also do i have to add raid5 and dm-mod to rc.conf???

Ok i should of read on more on the back-end server post i found out how to do the formatting and mounting. Those post are all over the place hard to follow.

Thanks for the help.

here is my fstab output, hope its alright

# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults 0 1
/dev/sda6 /businessfiles ext4 defaults 0 1
/dev/sda7 /downloadz ext4 defaults 0 1
/dev/raid5/videos /media/videos xfs defaults 1 2
/dev/raid5/lv_images /media/pictures ext4 defaults 1 2
/dev/raid5/lv_music /media/music xfs defaults 1 2
/dev/raid5/lv_tonysfiles /home/tony/documents ext4 defaults 1 2
/dev/raid5/lv_software /media/software ext4 defaults 1 2
/dev/raid5/lv_xbox /media/software/xbox360 xfs defaults 1 2



also im not too sure what does the default 1 2 means ??? and i noticed when arkay was going thur with duffy they had different defaults?


also im still aving problems with /dev/sda3 not getting found on some boots


Thanx
Tonz

This post has been edited by BadT18: 04 December 2010 - 08:34 PM

0

#5 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 05 December 2010 - 12:11 AM

BadT18 said:

Ok i should of read on more on the back-end server post i found out how to do the formatting and mounting. Those post are all over the place hard to follow.


You're welcome to condense it into a better guide ;)

Quote

also im not too sure what does the default 1 2 means ???


Try this in a terminal:


man fstab


Quote

also im still aving problems with /dev/sda3 not getting found on some boots


That shouldn't be happening. Post up the output from this so I can see what you've got there:


sudo su -
cat /boot/grub/menu.lst


Here's what my fstab looks like. Might pay to alter yours to match:


/dev/raidvg/lv_home /home ext4 acl,user_xattr 1 2
/dev/raidvg/lv_audio /home/rick/Documents/audio ext4 acl,user_xattr 1 2
/dev/raidvg/lv_video /home/rick/Documents/video xfs defaults,noatime,nodiratime,nosuid,nodev,allocsize=512m,logbufs=8 1 2
/dev/raidvg/lv_tv /home/rick/Documents/video/RecordedTV xfs defaults,noatime,nodiratime,nosuid,nodev,allocsize=512m,logbufs=8 1 2
/dev/dlvg/lv_downloads /home/rick/Documents/downloads ext4 acl,user_xattr 1 2
/dev/raidvg/lv_images /home/rick/Documents/images xfs defaults,noatime,nodiratime,nosuid,nodev,allocsize=512m,logbufs=8 1 2
/dev/raidvg/lv_videoedit /home/rick/Documents/video/Edited xfs defaults,noatime,nodiratime,nosuid,nodev,allocsize=512m,logbufs=8 1 2
#/dev/datavg/lv_scratch /home/rick/Documents/scratch xfs defaults,noatime,nodiratime,nosuid,nodev,allocsize=512m,logbufs=8 1 2


Cheers,

Arkay.
0

#6 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 05 December 2010 - 12:58 AM

arkay said:

You're welcome to condense it into a better guide ;)


yeah i am wanting to post up a guide soon but im still learning atm so im probly not the best person to follow.


arkay said:


That shouldn't be happening. Post up the output from this so I can see what you've got there:


sudo su -
cat /boot/grub/menu.lst



# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,1)
# /dev/sda3 (hd0,2)
#

# FRAMEBUFFER RESOLUTION SETTINGS
# +-------------------------------------------------+
# | 640x480 800x600 1024x768 1280x1024
# ----+--------------------------------------------
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
# +-------------------------------------------------+
# for more details and different resolutions see
# http://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution

# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img

# (1) Arch Linux
title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1


what happen is that my main hard drive keeps changing from /dev/sda to /dev/sdc so the system is looking for /dev/sda3 but cause it has change grub cant find it.

i have been looking for away to make udev mount /sda by a hard drive serial or sumthing. but im not to sure

Thanx
Tonz
0

#7 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 05 December 2010 - 05:25 PM

Ok. Sounds like a dodgy bios. Are you certain that the HDD with the OS on it is plugged into sata port 0 on the motherboard because if it were if should always come up as sda.

If it is then the other way to work around it is to mount it via UUID numbers rather than /dev devices.

Can you start a terminal and post up the output of:


blkid
cat /etc/fstab
and I'll show you how to change grub and fstab to use UUID numbers instead.

Cheers,

Arkay.
0

#8 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 05 December 2010 - 11:15 PM

thanks arkay.

/dev/sda1: UUID="f1d46d08-3e66-4ca0-8a4f-8f370e5eb1be" TYPE="ext2"
/dev/sda2: UUID="7fd2f070-3e40-4aa3-b4d6-24efcebc0f69" TYPE="swap"
/dev/sda3: UUID="7b35fb3d-3c18-45f2-8e89-f25cbbecb5aa" TYPE="ext4"
/dev/sda5: UUID="78a82674-a389-404c-a06a-b71967673784" TYPE="ext4"
/dev/sda6: UUID="4970d13a-872f-4f19-b6e3-031b5132f545" TYPE="ext4"
/dev/sda7: UUID="9fd1d476-d81e-4ce8-a476-5dbe11300e71" TYPE="ext4"
/dev/sdc1: UUID="f35cc129-2c5f-f6d5-100e-311507dcc351" UUID_SUB="a3b59424-8562-d e05-7c6a-ab3f3007d5ae" LABEL="server:0" TYPE="linux_raid_member"
/dev/sdb1: UUID="D35OA7-JDtv-0mlR-xx53-bm4L-8bx2-M0ytyG" TYPE="LVM2_member"
/dev/sdd1: UUID="f35cc129-2c5f-f6d5-100e-311507dcc351" UUID_SUB="671fde61-a3af-5 522-c9a9-4a83b84798bf" LABEL="server:0" TYPE="linux_raid_member"
/dev/sde1: UUID="f35cc129-2c5f-f6d5-100e-311507dcc351" UUID_SUB="e62174f0-cfbb-9 114-9319-0ede29fb66b6" LABEL="server:0" TYPE="linux_raid_member"
/dev/sdf1: UUID="f35cc129-2c5f-f6d5-100e-311507dcc351" UUID_SUB="8c1d8112-8aa8-d 86d-42a9-6d4bfc518672" LABEL="server:0" TYPE="linux_raid_member"
/dev/md127: UUID="Ni3rle-kukb-5Glw-d4u6-nRFX-6Rmk-7SleE8" TYPE="LVM2_member"
/dev/mapper/raid5-videos: UUID="b38796e5-8861-41b2-8074-2ff328d224cb" TYPE="xfs"
/dev/mapper/raid5-lv_images: UUID="0fadcb25-fadf-481a-90e6-45388e568c1f" TYPE="e xt4"
/dev/mapper/raid5-lv_music: UUID="c28bcd4c-673b-456c-848d-8d55848e77a3" TYPE="xf s"
/dev/mapper/raid5-lv_tonysfiles: UUID="7ca63fdc-5532-4072-9c37-1bcb244a8a4e" TYP E="ext4"
/dev/mapper/raid5-lv_xbox: UUID="8ce26eed-b9e1-4eac-9065-f416f509436e" TYPE="xfs "
/dev/mapper/raid5-lv_software: UUID="1216e6d9-3b11-4530-bba1-289c5c54c6a8" TYPE= "ext4"
/dev/mapper/1tb-lv_recordedtv: UUID="286459a2-bae9-4abd-b7da-3e25e40b6ff7" TYPE= "xfs"
/dev/mapper/1tb-lv_softw: UUID="b43ccdef-14b7-4c67-87f7-0d4f41b7d411" TYPE="ext4 "


cat /etc/fstab
# 
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults 0 1
/dev/sda6 /businessfiles ext4 defaults 0 1
/dev/sda7 /downloadz ext4 defaults 0 1
/dev/raid5/videos /media/videos xfs defaults 1 2
/dev/raid5/lv_images /media/pictures ext4 defaults 1 2
/dev/raid5/lv_music /media/music xfs defaults 1 2
/dev/raid5/lv_tonysfiles /home/tony/documents ext4 defaults 1 2
/dev/raid5/lv_software /media/raid_backup_software ext4 defaults 1 2
/dev/raid5/lv_xbox /media/software/xbox360 xfs defaults 1 2
/dev/1tb/lv_recordedtv /media/recordedtv xfs defaults 1 2
/dev/1tb/lv_softw /software ext4 defaults 1 2


if changing grub and fstab to UUID will that stuff up the raid aswel.

because disk /dev/sda seem to keep changing with /dev/sdc
when the system boots fine
/dev/sda is the root drive
and /dev/sdc is 1 of the raid drive. if changing it to UUID so when sda does change to sdc it will boot fine but wont the raid try and use sdc (wen then it sud use sda then) **If that makes sense to ya, sorry kind hard to explain on forum.

im not sure but from what i have read udev is what maps sda paths to the drives correct?? if so is there away to just tell udev to map that drive to sda or is it alot harder than that.

Thanx
Tonz
0

#9 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 06 December 2010 - 02:40 AM

What about your sata port ordering?

I'm not sure about udev. Far as I understand it udev only gets called after the kernel is booted and the rules that udev uses come from the / drive so it's a catch 22.

I'm sure you're not the first person with this issue. There must be a logical reason for it. Have you checked for a bios update? It sounds to me that the bios is presenting the drives in different orders randomly and that's why you're getting things messed up.

With the raid device it technically shouldn't matter, depending on how you have your raid config file set up. If it's default then it will scan all disks on boot and assemble the raid from those where it finds they have raid headers on the disk. So it won't matter if it's sda or sdc.

Rather than trying to fix it in software we need to find out why it's happening at all.

Can you list up your complete setup, motherboard details etc etc.

Cheers,

Arkay.
0

#10 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 06 December 2010 - 05:30 AM

its a DFI 790GX M2RS motherboard and yeah the sda hd is pluged in to sata0

Will come back to this later on aswel


Thanx
Tonz
0

#12 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 06 December 2010 - 09:52 PM

Ok. I'll give you the info anyway as it's a quick one to change and might fix the boot issues.

You need to change the entry in your fstab to use UUID, change the sda3 / entry to read:


UUID=7b35fb3d-3c18-45f2-8e89-f25cbbecb5aa / ext4 noatime 0 1
then edit your /boot/grub/menu.lst and change the sda3 references to point to the same UUID e.g.:


# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/7b35fb3d-3c18-45f2-8e89-f25cbbecb5aa root= ro
initrd /kernel26.img
The uuid is taken from your output above so they should be correct. If you can't boot after doing this don't panic, it can be fixed easy enough with a live cd.

That should get it booting and mounting sda3 via it's uuid number which technically should avoid any problems with sda/sdc numbering etc.

It shouldn't effect the raid. I assume you've set up your /etc/mdadm.conf file as well to list the devices that are part of the raid? If not I think it defaults to assembling the raid from identified raid devices, it should be able to work it out itself, even if the partition names are different, but it wouldn't hurt to specify it exactly. Maybe post up the output of:


cat /etc/mdadm.conf


Cheers,

Arkay.
1

#13 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 11 December 2010 - 03:50 AM

now i got a lil free time will try and fix this problem.

am i correct but sud i change fstab to UUID for all sda1-7 otherwise it wont boot

# mdadm configuration file
#
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
#
#
# the config file takes two types of lines:
#
# DEVICE lines specify a list of devices of where to look for
# potential member disks
#
# ARRAY lines specify information about how to identify arrays so
# so that they can be activated
#


# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1
#DEVICE /dev/hda1 /dev/hdb1
#
# The designation "partitions" will scan all partitions found in
# /proc/partitions
DEVICE partitions


# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#
# super-minor is usually the minor number of the metadevice
# UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#
# mdadm -D <md>
#
# To capture the UUIDs for all your RAID arrays to this file, run these:
# to get a list of running arrays:
# # mdadm -D --scan >>/etc/mdadm.conf
# to get a list from superblocks:
# # mdadm -E --scan >>/etc/mdadm.conf
#
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
#
# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a
# failed drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
#


# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program. To start mdadm's monitor mode, add
# "mdadm" to your DAEMONS array in /etc/rc.conf
#
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld
#PROGRAM /usr/sbin/handle-mdadm-events


Thanks
Tonz
0

#14 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 12 December 2010 - 05:39 PM

Hmmm. Didn't take notice that you had so many partitions on sda in your fstab. May as well change them all.

Just use the blkid output to match them all up and use sda3 in /boot/grub/menu.lst. Grub must be able to read /boot in order to present a menu so I assume it will need the root partition in the menu.lst file. If that doesn't work then try sda1.

Doesn't matter if it won't boot, you can always boot up from a live CD and mount sda1/3 to fix it ;)

Cheers,

Arkay.
0

#15 User is offline   BadT18 

  • MC Journeyman
  • PipPipPip
  • Group: Members
  • Posts: 104
  • Joined: 09-July 09

Posted 13 December 2010 - 03:00 AM

ok did all the above and the system wont boot.

but good thing its just grub error and fstab with uuid worked fine.

so if i change grub back to /dev/sda-c3 it works and all file systems are mounting which is good :)


but on grub when i change it to uuid it gets a error ash: /dev/ : unknown operand

then back to waiting 10 seconds etc


well i guess atleast it isnt a fstab error cause thats not a easy fix lol

**Update

Dont worry i found the problem. grub menu should be like
# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/7b35fb3d-3c18-45f2-8e89-f25cbbecb5aa ro
initrd /kernel26.img

not root= ro at the end

Thanks Arkay all working well now just gonna check if the raid is still fine but i think it should be


thanks
tonz
0

#16 User is offline   arkay 

  • Grand Poobah
  • View blog
  • Group: Global Moderators
  • Posts: 12340
  • Joined: 14-February 05
  • LocationMelbourne

Posted 13 December 2010 - 05:23 PM

Cool. One less problem :)

Cheers,

Arkay.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

-->