New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Use Lvm on new install?

Got problems with your B2 or B3? Share and get helped!
Post Reply
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Use Lvm on new install?

Post by 86ivar »

I am reinstalling my b2 with a new disk. However, I wonder if it will be better off by not using lvm2. Just disable it in the install config. I never use extra disks et anyway..
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Use Lvm on new install?

Post by Gordon »

I ran a speed test once on the factory installed Green drive in my B3. Posted the results here on the boards. My conclusion is that you will be better off partitioning the drive yourself and putting swap in between the root partition and the LVM/home partition. Not using LVM simplifies that job, but you should be aware that even with 'nolvm' enabled the installer will still want to use sda2 (the swap partition in this case) as home drive.

Two ways to go about this:
  • Create four partitions instead of three. 20-40G for root (sda1) + 1G for the installer to use as home (sda2) + 1G for swap (sda3) and the remainder of the disk as sda4. Let the installer do its job and change /etc/fstab afterwards to reference /dev/sda4 for /home. While you have the chance I suggest you format that partition as ext4.
  • Create partitions as described in the intro and do the install manually. Update the ini file on the USB stick not to run install. ssh into the B2 when it is booted into rescue mode, mount /dev/sda1 (should be ext3 formatted) to /mnt, create a 'home' directory on it, mount /dev/sda3 to /mnt/home and unpack the payload file to /mnt. Edit /mnt/etc/fstab to reflect your disk layout: /dev/sda2 => swap /dev/sda3 => /home (ext4).
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Use Lvm on new install?

Post by 86ivar »

Interesting, however I could not find that post. However it seems like a better idea to have the swap partition closer to the root one. Did you gain much performance on file transfer for instance?
Anyway, why do you choose such a large root partition? I sized it to 3Gb due to the fact that I will only use it as a simple file/backup server from now on.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Use Lvm on new install?

Post by Gordon »

What I found was that file I/O was more or less constant on the first 30-40% of the disk - which has to be due to other limiting factors in hardware. From that point on file throughput started degrading. Don't remember the amount, but it was substantial at the point where the swap partition is originally located. Possibly down to some 10-20% of the throughput I measured at the beginning of the disk.
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Use Lvm on new install?

Post by 86ivar »

That is a lot! At the moment im doing a complete reinstall and format with the usb stick. I guess I can make a new partition table and install on the disk without formatting it over again. It has been formatting for approximatley 30 hrs now...
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Use Lvm on new install?

Post by Gordon »

I guess...

You could probably calculate the effect. I have an old disc lying around that I pulled apart some time ago. The disc is about 95mm diameter and has an axle aperture of about 24mm, roughly measured. Meaning that on this disc you can fit four times as many sectors on the outer circumference than on the inner - so that's 25% throughput remaining. Given that the first ~30% of the disc showed a more or less constant throughput, that will put the rim of maximum performance at a radius of about 40mm. So with this disc throughput would (obviously this one does not function any more) likely drop down to be about 30% on the last sectors of the disc.

Of course disc dimensions can be different based on brand and/or model and calculations based on circumference and surface size will be off a bit because sectors are not aligned in a spiral but on concentric rings where each ring can not contain partial sectors. The safe statement in regards to disc I/O speed at the end of the disc thus becomes less than a third of the speed at the start of the disc. Note that if the disc layout is reversed, i.e. from the inside moving outwards, speed will increment rather than degrade. I don't know any disc that does this though.
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Use Lvm on new install?

Post by 86ivar »

Makes sense! I always wondered how the radius difference on the disk was handeled.

The disk (2tb) is still formatting, I think. Atleast it is blinking, making some hdd noise once every two seconds, and reads from the usb key. Hope it will be done soon.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Use Lvm on new install?

Post by Gordon »

If I remember correctly, originally the layout pretty much resembled old records: long grooves on the outside and much denser grooves on the inside, giving the same amount of information with each completed circle. You can find this still reflected in disk parameters describing disk capacity as cylinders x heads x sectors (CHS), even though these have no relation to the physical layout on modern disks that will use as much of the surface capacity as possible. As a rule you'll find sectors to be 63 in CHS, which is the result from conversion from the current standard LBA.

Come to think about it: throughput being sort of constant throughout the first quart of the disk may actually be the result of "intellispeed", allowing the disk to rotate at a lower speed (cooler!) when the heads are close to the outer rim.
Post Reply