Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   partitioning an ssd for new installation (http://www.linux-archive.org/gentoo-user/704192-partitioning-ssd-new-installation.html)

Allan Gottlieb 09-15-2012 11:54 PM

partitioning an ssd for new installation
 
I just received a new laptop (dell 6430s) with a 256GB SSD and naturally
want to install gentoo. I have installed gentoo several times but this
is my first with an SSD.

Dell configures a small first partition and places windows on two other
partitions (one small; the other the rest of the disk).

I reinstalled windows shrinking the large partition very considerably (I
essentially never use the dell partition or windows; but they are
convenient to have if you need service from dell).

In my current system, I have

/root "native partition"
/usr lvm2
/local lvm2
/var lvm2
/tmp lvm2
/opt lvm2
/a lvm2

My plan is to have root+usr on one "native partition" (to appease the
oracle at udev) and the rest on lvm2 as in my current configuration.

Although I will install dracut and perhaps try/use it, I do not want my
partitioning scheme to *force* me to use it. I believe combining root
and usr (off lvm2) will accomplish this goal.

I was not surprised to see that the latest manual has root+usr combined,
but was surprised that they specify an additional small /boot partition.
I had thought that went out of favor a few years ago. Is it back
because of the root+usr merge? Do people here recommend a separate
/boot?

I know that it is important to have ssd partitions well aligned. It
appears that fdisk is doing this automatically (see below). Does the
following partitioning seem OK?

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x58737050

Device Boot Start End Blocks Id System
/dev/sda1 63 80324 40131 de Dell Utility
/dev/sda2 81920 1622015 770048 7 HPFS/NTFS/exFAT
/dev/sda3 1622016 64536575 31457280 7 HPFS/NTFS/exFAT
/dev/sda4 64536576 500118191 217790808 5 Extended
/dev/sda5 * 64538624 127453183 31457280 83 Linux
/dev/sda6 127455232 131649535 2097152 82 Linux swap / Solaris
/dev/sda7 131651584 341366783 104857600 8e Linux LVM

thanks,
allan

Kerin Millar 09-16-2012 01:02 AM

partitioning an ssd for new installation
 
Allan Gottlieb wrote:

I just received a new laptop (dell 6430s) with a 256GB SSD and naturally
want to install gentoo. I have installed gentoo several times but this
is my first with an SSD.

Dell configures a small first partition and places windows on two other
partitions (one small; the other the rest of the disk).

I reinstalled windows shrinking the large partition very considerably (I
essentially never use the dell partition or windows; but they are
convenient to have if you need service from dell).

In my current system, I have

/root "native partition"
/usr lvm2
/local lvm2
/var lvm2
/tmp lvm2
/opt lvm2
/a lvm2

My plan is to have root+usr on one "native partition" (to appease the
oracle at udev) and the rest on lvm2 as in my current configuration.

Although I will install dracut and perhaps try/use it, I do not want my
partitioning scheme to *force* me to use it. I believe combining root
and usr (off lvm2) will accomplish this goal.

I was not surprised to see that the latest manual has root+usr combined,
but was surprised that they specify an additional small /boot partition.
I had thought that went out of favor a few years ago. Is it back
because of the root+usr merge? Do people here recommend a separate
/boot?


It's just the way the Gentoo docs have always been. As with most things
related to Unix, retrospective justifications are commonplace. I think
it made a good deal more sense 10 years ago than it does today. Back
then, ext2 was a safer option for boot loaders and live-distros alike.
Nowadays, it generally doesn't matter and can be a source of confusion
(I always thought that the self-referencing boot symlink was silly).
There are some situations where it could afford more flexibility.
However, I no longer specify a separate /boot unless there is a clear
case for doing so.




I know that it is important to have ssd partitions well aligned. It
appears that fdisk is doing this automatically (see below). Does the
following partitioning seem OK?

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x58737050

Device Boot Start End Blocks Id System
/dev/sda1 63 80324 40131 de Dell Utility
/dev/sda2 81920 1622015 770048 7 HPFS/NTFS/exFAT
/dev/sda3 1622016 64536575 31457280 7 HPFS/NTFS/exFAT
/dev/sda4 64536576 500118191 217790808 5 Extended
/dev/sda5 * 64538624 127453183 31457280 83 Linux
/dev/sda6 127455232 131649535 2097152 82 Linux swap / Solaris
/dev/sda7 131651584 341366783 104857600 8e Linux LVM


These are all perfectly aligned except for the first partition, not that
it matters. Incidentally, no special parameters are required for tools
such as pvcreate, mkfs.ext4, mkfs.xfs and such. They will generally do
the right thing based on the information exposed by sysfs.


Cheers,

--Kerin

Philip Webb 09-16-2012 01:07 AM

partitioning an ssd for new installation
 
120915 Allan Gottlieb wrote:
> I just received a new laptop (dell 6430s) with a 256GB SSD
> and naturally want to install Gentoo. This is my first with an SSD.
> I reinstalled Windows shrinking the large partition very considerably

That much is what I did with my EEE netbook 2008 .
M$ has 2 uses : when you need to test things with your ISP,
who is familiar with the Windows configuration process ;
when you want to play bridge with the machine (no bridge for Linux !).

> My plan is to have root+usr on one "native partition" to appease
> the oracle at udev and the rest on lvm2 as in my current configuration.

Now we've moved to my current installation on my newly-built desktop box,
my 1st SSD too. It's working very well & I've dropped LVM.
My partitions on the SSD are (new box, old box assigned, old box used):

SSD sda 1 boot 0,6 0,1 0,06 /boot
2 root 30 20 3,55 / incl : opt usr var
3 swap 4 4 -- swap
5 home 30 20 6,84 /home
6 portage 15 20 3,43 /usr/portage (distfiles 2,3)
-- var -- 5 1,4 /var
7 z 41 24 1,5 /z
total 121 93,1 19,45

tmpfs -- -- -- /tmp

I've put /usr/local + /usr/src on my HDD, which your laptop lacks,
but you've got 128 GB more space on your SSD than I have
& you wb backing it up on some other machine, I assume,
so you have lots of space for more partitions for such things.
( /z is a big hangar for making ISOs, testing archives, Portage tempdir).
NB I've assigned vastly more space than I'm currently actually using.

> I know that it is important to have ssd partitions well aligned.
> It appears that fdisk is doing this automatically.

Yes, iff you partition the whole disk that way.
I don't know whether Dell + M$ located their partitions correctly
or whether Fdisk will start at the proper place when adding more.

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Kerin Millar 09-16-2012 01:28 AM

partitioning an ssd for new installation
 
Philip Webb wrote:

Yes, iff you partition the whole disk that way.
I don't know whether Dell + M$ located their partitions correctly
or whether Fdisk will start at the proper place when adding more.


Microsoft have been doing the right thing since Vista SP1, long before
the Linux ecosystem pulled its collective head out of the sand.
Regarding the available partitioning tools, fdisk from util-linux-2.18
onwards is safe. Gentoo was extremely slow on the uptake in getting this
issue resolved but that's water under the bridge now. Any release media
from around the time bug #356941 was closed will be safe.


I usually validate the starting boundary of a partition in this fashion:

echo $(( 64538624 % 8 )) # 0 == 1MiB aligned == good

Cheers,

--Kerin

Allan Gottlieb 09-16-2012 01:42 AM

partitioning an ssd for new installation
 
On Sat, Sep 15 2012, Kerin Millar wrote:

> Allan Gottlieb wrote:
>>
>> I was not surprised to see that the latest manual has root+usr combined,
>> but was surprised that they specify an additional small /boot partition.
>> I had thought that went out of favor a few years ago. Is it back
>> because of the root+usr merge? Do people here recommend a separate
>> /boot?
>
> It's just the way the Gentoo docs have always been. As with most
> things related to Unix, retrospective justifications are
> commonplace. I think it made a good deal more sense 10 years ago than
> it does today. Back then, ext2 was a safer option for boot loaders and
> live-distros alike. Nowadays, it generally doesn't matter and can be a
> source of confusion (I always thought that the self-referencing boot
> symlink was silly). There are some situations where it could afford
> more flexibility. However, I no longer specify a separate /boot unless
> there is a clear case for doing so.

Thanks. I will do the same
>
>>
>> I know that it is important to have ssd partitions well aligned. It
>> appears that fdisk is doing this automatically (see below). Does the
>> following partitioning seem OK?
>>
> These are all perfectly aligned except for the first partition, not
> that it matters. Incidentally, no special parameters are required for
> tools such as pvcreate, mkfs.ext4, mkfs.xfs and such. They will
> generally do the right thing based on the information exposed by
> sysfs.

I was actually thinking about just that as I will be using mkfs.ext4 and
many of the lvm tools, so thanks in advance.

allan

Allan Gottlieb 09-16-2012 01:48 AM

partitioning an ssd for new installation
 
On Sat, Sep 15 2012, Philip Webb wrote:

> 120915 Allan Gottlieb wrote:
>> I just received a new laptop (dell 6430s) with a 256GB SSD
>> and naturally want to install Gentoo. This is my first with an SSD.
>> I reinstalled Windows shrinking the large partition very considerably
>
> That much is what I did with my EEE netbook 2008 .
> M$ has 2 uses : when you need to test things with your ISP,
> who is familiar with the Windows configuration process ;
> when you want to play bridge with the machine (no bridge for Linux !).

I don't play bridge but do find windows also useful when dealing with
dell if there are any hardware issues.

>> My plan is to have root+usr on one "native partition" to appease
>> the oracle at udev and the rest on lvm2 as in my current configuration.
>
> It's working very well & I've dropped LVM.

I toyed with that thought after the udev business, but eventually
decided to stay with LVM.

> My partitions on the SSD are (new box, old box assigned, old box used):
>
> SSD sda 1 boot 0,6 0,1 0,06 /boot
> 2 root 30 20 3,55 / incl : opt usr var
> 3 swap 4 4 -- swap
> 5 home 30 20 6,84 /home
> 6 portage 15 20 3,43 /usr/portage (distfiles 2,3)
> -- var -- 5 1,4 /var
> 7 z 41 24 1,5 /z
> total 121 93,1 19,45
>
> tmpfs -- -- -- /tmp

I am embarrassed to say I had trouble reading the above, embarrassed
because it show provincial habits. I didn't even consider that , could
be a decimal point. Now it is clear

> I've put /usr/local + /usr/src on my HDD, which your laptop lacks,
> but you've got 128 GB more space on your SSD than I have
> & you wb backing it up on some other machine, I assume,
> so you have lots of space for more partitions for such things.

Correct.

> ( /z is a big hangar for making ISOs, testing archives, Portage tempdir).
> NB I've assigned vastly more space than I'm currently actually using.

I have the equivalent on my current system and will probably carry it
over as well.

>> I know that it is important to have ssd partitions well aligned.
>> It appears that fdisk is doing this automatically.
>
> Yes, iff you partition the whole disk that way.
> I don't know whether Dell + M$ located their partitions correctly
> or whether Fdisk will start at the proper place when adding more.

No for dell, yes for microsoft, yes for fdisk (at least emacs calc says
so).

thanks,
allan

William Kenworthy 09-16-2012 01:58 AM

partitioning an ssd for new installation
 
On Sat, 2012-09-15 at 21:42 -0400, Allan Gottlieb wrote:
> On Sat, Sep 15 2012, Kerin Millar wrote:
>
> > Allan Gottlieb wrote:
> >>
> >> I was not surprised to see that the latest manual has root+usr combined,
> >> but was surprised that they specify an additional small /boot partition.
...

Sorta related ... can someone comment on, or point to a guide about the
relationship between partitioning, LVM and filesystems? In particular,
it seems to me that if you are going to the bother of partitioning to
boundaries, whatever you put into that should also be aligned.

Would like to sort it out as my new macbook air with an SSD from work
should be arriving soon and I intend going separate /usr and LVM/btrfs
for all except the root and boot partitions.

BillK

Allan Gottlieb 09-16-2012 01:59 AM

partitioning an ssd for new installation
 
On Sat, Sep 15 2012, Kerin Millar wrote:

> Philip Webb wrote:
>> Yes, iff you partition the whole disk that way.
>> I don't know whether Dell + M$ located their partitions correctly
>> or whether Fdisk will start at the proper place when adding more.
>
> Microsoft have been doing the right thing since Vista SP1,

I remember the bad days (me et al) when it was a pain to get the windows
partition shrunk and willing to accept a grub mbr. I always allocated a
whole day (alone, since I would be grouchy) to do that and often needed
more time. I think it was around vista, where it just became easy. It
was certainly easy with the current windows 7.

> long before the Linux ecosystem pulled its collective head out of the
> sand. Regarding the available partitioning tools, fdisk from
> util-linux-2.18 onwards is safe. Gentoo was extremely slow on the
> uptake in getting this issue resolved but that's water under the
> bridge now. Any release media from around the time bug #356941 was
> closed will be safe.

I used a live CD from nov 3 2011

livecd ~ # uname -a
Linux livecd 3.0.6-gentoo #1 SMP Thu Nov 3 12:50:42 UTC 2011 x86_64 Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz GenuineIntel GNU/Linux

> I usually validate the starting boundary of a partition in this fashion:
>
> echo $(( 64538624 % 8 )) # 0 == 1MiB aligned == good

right. I used emacs calc.

allan

Kerin Millar 09-16-2012 02:08 AM

partitioning an ssd for new installation
 
William Kenworthy wrote:

On Sat, 2012-09-15 at 21:42 -0400, Allan Gottlieb wrote:

On Sat, Sep 15 2012, Kerin Millar wrote:


Allan Gottlieb wrote:

I was not surprised to see that the latest manual has root+usr combined,
but was surprised that they specify an additional small /boot partition.

...

Sorta related ... can someone comment on, or point to a guide about the
relationship between partitioning, LVM and filesystems? In particular,
it seems to me that if you are going to the bother of partitioning to
boundaries, whatever you put into that should also be aligned.


There's no bother whatsoever entailed with current release media. If you
are setting all of this up on commodity hardware, it's all taken care of
for you.


So as to satisfy your curiosity, one exception I have encountered is
with systems that use LSI MegaRAID hardware. In this case, the
information required for tools such as pvcreate and mkfs.xfs to function
optimally is not conveyed to userspace. In the unlikely event that you
need to take matters into your own hands, you may find this informative:


http://www.mysqlperformanceblog.com/2011/06/09/aligning-io-on-a-hard-disk-raid-the-theory/

Cheers,

--Kerin


All times are GMT. The time now is 02:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.