Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSD+HDD RAID+lvm2 formatting strategy help.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
1clue
Veteran
Veteran


Joined: 05 Feb 2006
Posts: 1355

PostPosted: Fri Aug 10, 2012 2:19 pm    Post subject: SSD+HDD RAID+lvm2 formatting strategy help. Reply with quote

Hi everyone.

I recently had a system failure, a drive went bad. I grabbed my data on a removable and set about installing Gentoo again. I had 4x750g drives set up as LVM2 with a removable drive for backups. I actually kept backups, so nothing really lost here but hardware. I couldn't find my exact drive anywhere. The other 3 have no faults.

I picked up a Corsair Force 3 240g drive. This is a lower-cost drive from a company I like for memory products.

I hadn't really planned to get an SSD so I have no plan, I'm caught with my pants down. I'm going through http://en.gentoo-wiki.com/wiki/Solid_State_Disk and getting some questions.

I had thought that SSDs required a scatter filesystem to prevent too many writes in one spot. The wiki says this is false because SSDs have a controller which takes this into account. The documentation on this drive don't say anything about that, and since it's a lower cost model I wonder if it has the controller, or if they just didn't mention it. Is there some way I can tell?

If these were all spinning disks, my /boot would be raid1x4 from each drive, swap would be four single SWAP partitions (no RAID) and everything else would be RAID with LVM2 on top. Everything except /boot would be EXT4 or XFS or Reiser, because those filesystems can be resized while mounted and they cover all my data needs.

Here's my modified strategy, somebody please check sanity on this and offer advice.

SSD format:

  1. /boot
  2. LVM2 vg=ssdvg


HDD format, all identical, 3 disks:

  1. 12g SWAP
  2. 400g RAID vg=raid5vg
  3. * RAID vg=raid0vg


The HDD format is basically what I had before. I have 12g RAM. I have a lot of SWAP defined, but I use TMPFS for /var/tmp/portage and a few other places, and have never actually touched a SWAP partition other than for hibernate. My prior filesystem map actually looks a lot like the SSD wiki recommendations.

I have 2 partitions for RAID on each spinning disk, and generally mix modes. I would use the 400g partition for RAID5 (RAID6 if I had all 4 disks) and maybe raid 0 for the remainder of the disk for a quick data dumping ground for non-critical data.

I also have a large removable disk with xfs on it, used for backups.

Thanks in advance.
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4665
Location: Theux (Belgium)

PostPosted: Fri Aug 10, 2012 11:52 pm    Post subject: Reply with quote

Indeed SSD have everything needed to use all the memory cells efficiently without requiring any particular filesystem. You might also want to read an article I found lately about SSD. An interesting feature is the elevator=noop kernel argument; SSD don't need clever I/O scheduling and all I/O requests can pass-thru without impacting performance. If you're curious ;) .

EDIT: BTW I would place on the SSD only what changes rarely, just to make sure the drive lasts the longest possible. So I'm not Sure LVM is a wise option here... unless you dedicate a specific group and physical volume to it. So filesystems such as /var, /run and /home are best out of an SSD.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
1clue
Veteran
Veteran


Joined: 05 Feb 2006
Posts: 1355

PostPosted: Sat Aug 11, 2012 5:26 pm    Post subject: Reply with quote

VinzC,

Thanks for the response.

I'm reading your article now, but does elevator=noop affect my spinning drives?

The ssd would be its own volume group, all it would give me is adjustable partition sizes.

I will probably have 2 volume groups on the spinning array.

Thanks.
Back to top
View user's profile Send private message
1clue
Veteran
Veteran


Joined: 05 Feb 2006
Posts: 1355

PostPosted: Sat Aug 11, 2012 6:18 pm    Post subject: Reply with quote

Can I do root partition on LVM?

My current thought is no, I've never done it that way. But I'm curious.

Thanks.
Back to top
View user's profile Send private message
darklegion
Guru
Guru


Joined: 14 Nov 2004
Posts: 466

PostPosted: Sun Aug 12, 2012 2:15 pm    Post subject: Reply with quote

1clue wrote:

I'm reading your article now, but does elevator=noop affect my spinning drives?


You can set it per drive e.g with "echo noop > /sys/block/sda/queue/scheduler".

I put it in /etc/local.d/baselayout1.start and it will be applied on boot. I use deadline instead of noop, but either should be fine for a SSD.
Back to top
View user's profile Send private message
VinzC
Advocate
Advocate


Joined: 17 Apr 2004
Posts: 4665
Location: Theux (Belgium)

PostPosted: Mon Aug 13, 2012 11:54 am    Post subject: Reply with quote

1clue wrote:
I'm reading your article now, but does elevator=noop affect my spinning drives?

Yes, if passed as a kernel argument. But as darklegion wrote it is also possible to have per-hard-drive tuning.

I'd just add that no-op is preferred for it really adds (close to) zero overhead to IO queueing. The deadline elevator adds some non-zero delay anyway. Not that the latter is not fine but no-op is the fastest.

1clue wrote:
Can I do root partition on LVM?

My current thought is no, I've never done it that way. But I'm curious.

Yes, you can boot with the root filesystem on LVM. I use the command genkernel ramdisk --lvm ... for that. Just be sure to enable the required kernel support features and to pass the argument dolvm to the kernel. For example:
Code:
kernel vmlinuz
append root=/dev/ram0 real_root=/dev/sys/gentoo-root ... dolvm

is what I have on my machines. (Booting with syslinux.) Volume group is sys and root filesystem is gentoo-root.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
GNU/Linux user #369763
“Wow! I feel root”
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum