Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] grub and what happens exactly when booting.
Date: Sat, 17 Sep 2011 11:36:09
Message-Id: 4E7485DE.50509@gmail.com
In Reply to: Re: [gentoo-user] grub and what happens exactly when booting. by Peter Humphrey
1 Peter Humphrey wrote:
2 >
3 > On Friday 16 September 2011 17:58:11 Dale wrote:
4 >
5 >
6 > > Hmm, maybe I am thinking of ext4? Life's confusing. :/
7 >
8 >
9 > In case it helps, here's the relevant part of my fstab:
10 >
11 >
12 > /dev/sda1 /boot ext2 noatime,noauto 1 2
13 >
14 > /dev/md3 / ext4 noatime 1 1
15 >
16 > /dev/vg1/home /home ext4 noatime 1 2
17 >
18 > /dev/vg1/common /home/prh/common ext4 noatime 1 3
19 >
20 > /dev/vg1/boinc /home/prh/boinc ext4 noatime 1 3
21 >
22 > /dev/vg1/virt /home/prh/.VirtualBox ext4 noatime 1 3
23 >
24 > /dev/vg1/portage /usr/portage ext4 noatime 1 2
25 >
26 > /dev/vg1/packages /usr/portage/packages ext4 noatime 1 3
27 >
28 > /dev/vg1/distfiles /usr/portage/distfiles ext4 noatime 1 3
29 >
30 > /dev/vg1/local /usr/local ext4 noatime 1 2
31 >
32 > /dev/vg1/opt /opt ext4 noatime 1 2
33 >
34 > /dev/vg1/srv /srv ext4 noatime 1 2
35 >
36 > /dev/vg1/chroot /mnt/atom ext4 noatime 1 2
37 >
38 >
39 > The common partition is where I keep my user stuff that is common
40 > among distros. Boinc is where boinc runs, and virt is where VirtualBox
41 > runs. I don't know why I still have a srv there, as Gentoo doesn't use
42 > it (maybe I should reallocate it to /var or /var/tmp). Chroot is where
43 > I mount my Atom box's portage directory so that I can use the
44 > workstation to build packages for binary installation on the Atom box
45 > - saves oodles of time and heat.
46 >
47 >
48 > I have a /dev/vg2 as well, for experimental installation of other
49 > distros; those that can be installed into virtual partitions, that is.
50 >
51 >
52 > The following commands would re-create those partitions and file
53 > systems, having created the physical volume and the volume group vg1:
54 >
55 >
56 > lvcreate -L 10G -n opt vg1
57 >
58 > lvcreate -L 12G -n distfiles vg1
59 >
60 > lvcreate -L 12G -n srv vg1
61 >
62 > lvcreate -L 15G -n home vg1
63 >
64 > lvcreate -L 15G -n virt vg1
65 >
66 > lvcreate -L 20G -n boinc vg1
67 >
68 > lvcreate -L 20G -n chroot vg1
69 >
70 > lvcreate -L 20G -n packages vg1
71 >
72 > lvcreate -L 2G -n local vg1
73 >
74 > lvcreate -L 50G -n common vg1
75 >
76 > lvcreate -L 8G -n portage vg1
77 >
78 > mkfs.ext4 -j -O dir_index /dev/vg1/boinc
79 >
80 > mkfs.ext4 -j -O dir_index /dev/vg1/chroot
81 >
82 > mkfs.ext4 -j -O dir_index /dev/vg1/common
83 >
84 > mkfs.ext4 -j -O dir_index /dev/vg1/distfiles
85 >
86 > mkfs.ext4 -j -O dir_index /dev/vg1/home
87 >
88 > mkfs.ext4 -j -O dir_index /dev/vg1/local
89 >
90 > mkfs.ext4 -j -O dir_index /dev/vg1/opt
91 >
92 > mkfs.ext4 -j -O dir_index /dev/vg1/packages
93 >
94 > mkfs.ext4 -j -O dir_index /dev/vg1/portage
95 >
96 > mkfs.ext4 -j -O dir_index /dev/vg1/srv
97 >
98 > mkfs.ext4 -j -O dir_index /dev/vg1/virt
99 >
100 >
101 > That list was created by David Noon's zsh script, which he posted here
102 > recently. In fact I have file-systm labels written by mkfs.ext4 as
103 > well, but David's script doesn't notice those.
104 >
105 >
106 > Sda and sdb are 1TB SATA Samsung devices.
107 >
108 >
109 > HTH.
110 >
111 >
112 > --
113 >
114 > Rgds
115 >
116 > Peter Linux Counter 5290, 1994-04-23
117 >
118 >
119
120 Interesting read and it helps. I sort of understand LVM and realize its
121 benefits but just concerned about something breaking and me sitting here
122 with no clue how to fix it. Of course, Knoppix and gmails web mail may
123 help tho. ;-) Thanks for posting fstab too. That gives me some clues
124 on how to do mine. Clues are good.
125
126 I have copied over with the following:
127
128 /boot on its partition
129 / on its partition
130 /home on LVM
131 /usr on LVM
132 /var on LVM
133
134 Then I ran into this:
135
136 /dev/sdb3 9614148 1526468 7599304 17% /mnt/gentoo
137 /dev/sdb1 280003 11568 253979 5% /mnt/gentoo/boot
138 /dev/mapper/test-home
139 51606140 10289244 38695456 22% /mnt/gentoo/home
140 /dev/mapper/test-usr 14449712 10841540 2874172 80% /mnt/gentoo/usr
141 /dev/mapper/test-var 12385456 6405360 5350952 55% /mnt/gentoo/var
142
143
144 Ooops, /usr is almost full. Well that ain't good at all is it? Well
145 looky here:
146
147 /dev/sdb3 9614148 1526468 7599304 17% /mnt/gentoo
148 /dev/sdb1 280003 11568 253979 5% /mnt/gentoo/boot
149 /dev/mapper/test-home
150 51606140 10289244 38695456 22% /mnt/gentoo/home
151 /dev/mapper/test-usr 20642428 10845076 8748856 56% /mnt/gentoo/usr
152 /dev/mapper/test-var 12385456 6405360 5350952 55% /mnt/gentoo/var
153
154 That was like 5 minutes later and it was mounted the whole time too.
155 Yep, it's pretty neat. Now to work on this init crap. I read a couple
156 howtos but it is still murky. It'll sort out as I get started I guess.
157
158 I'm using ext4 by the way. It's been out a while and sounds like it is
159 stable.
160
161 Does LVM make the heads move around more or anything like that? I'm
162 just thinking it would depending on what lv are on what drives. I
163 dunno, just curious.
164
165 Thanks.
166
167 Dale
168
169 :-) :-)

Replies

Subject Author
Re: [gentoo-user] grub and what happens exactly when booting. Peter Humphrey <peter@××××××××××××××.org>