Gentoo Archives: gentoo-user

From: Joost Roeleveld <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] grub and what happens exactly when booting.
Date: Fri, 16 Sep 2011 18:03:24
Message-Id: 3932855.rUVi2b63CE@eve
In Reply to: Re: [gentoo-user] grub and what happens exactly when booting. by Dale
1 On Friday, September 16, 2011 11:58:11 AM Dale wrote:
2 > Alan McKinnon wrote:
3 > > On Fri, 16 Sep 2011 10:47:01 -0500
4 > >
5 > > Dale<rdalek1967@×××××.com> wrote:
6 > >> Mick wrote:
7 > >>> You will need to patch your kernel (in your sdb test OS) and then
8 > >>> you will also need to make a reiser4 fs on your sdb partition(s)
9 > >>> (for that you'll need to emerge sys-fs/reiser4progs). If you want
10 > >>> to be able to mount reiser4 from within your sda OS, you will need
11 > >>> of course to patch your current kernel to start with, alternatively
12 > >>> use a LiveCD like sysrescue which comes already patched. For
13 > >>> patches look in here:
14 > >>> http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4
15 > >>> -for-2.6/ The way I do what you are trying to do is start with the
16 > >>> existing OS on sda, partition sdb, tar contents of sda partitions
17 > >>> into
18 > >>> corresponding sdb partitions and then modify fstab. Depending on
19 > >>> what you want to test you may not need grub installed into sdb's
20 > >>> MBR and you may not need a /boot in sdb. As long as you are not
21 > >>> going to remove sda from the machine you should be able to add a
22 > >>> couple of lines in the original grub.conf to select to
23 > >>> boot /dev/sdb, while using sda's MBR and /boot partition. HTH.
24 > >>
25 > >> I could have swore reiserfs4 was in the kernel. Sure enough, it
26 > >> ain't. I'll wait then. I don't want to take the chance that
27 > >> something goes belly up then not have a bootable way to fix things.
28 > >
29 > > reiser4 was never in the kernel and the odds of it ever making it there
30 > > were about zero (coding style issues and many other things that pissed
31 > > Linux off). And that was in the days when Hans was physically located
32 > > in a place where he was allowed to code.
33 > >
34 > > For all practical purposes Reiser4 is dead. I haven't heard a peep out
35 > > of anyone claiming to maintain it for a few years now.
36 >
37 > New question. I'm playing with LVM. What is the best file system to
38 > use that with? I know LVM can shrink and grow so a file system should
39 > be able to do the same, online would be great but not required. That
40 > would be good for a / partition but not needed for the rest. I can
41 > always go to single user and resize things.
42
43 LVM is great, when installing a large package, downloading large files or
44 finding out I need a lot more diskspace for the VMs I am running to do some
45 testing, I can simply increase the LV (LVM-partition) and then increase the
46 filesystem to match. All this while the filesystem is being written to.
47
48 > I don't want XFS tho. I used it before and it was a total disaster. I
49 > have a UPS but I also recall having to pull the plug when hal showed up
50 > too. No need for a repeat.
51
52 I know from personal experience that the following support online resizing:
53 ext2/3, reiserfs (v3), XFS, JFS.
54 I would expect ext4 to also support that.
55
56 One thing to remember, the online resizing only allows growing of the
57 filesystem. For shrinking, you still need to umount it first.
58 Also, XFS and JFS don't support shrinking at all.
59
60 For testing, I would suggest starting with ext3 and/or reiserfs. Both work.
61 I haven't tried ext4 yet, maybe someone who runs that on top of LVM can
62 comment?
63
64 > Hmm, maybe I am thinking of ext4? Life's confusing. :/
65
66 I think you might be thinking of ext4.
67
68 Btw, a brief description on how resizing would work.
69 When growing the filesystem:
70 1) lvextend .....
71 2) "resizefs" (different filesystems, different commands)
72 This will work for all filesystems supporting online resizing. (I know of one
73 that actually only allows growing when it IS mounted)
74
75 When shrinking a filesystem:
76 1) umount
77 2) "resizefs" to less then what you want to shrink it to
78 3) lvreduce ....
79 4) "resizefs"
80
81 The "resizefs" will default to growing to the full extend of the partition/LV
82 it resides on.
83
84 --
85 Joost
86
87 PS. With LVM, I find it easier to make the partitions smaller to start with
88 and leave un-assigned space in the VG for the LVs to grow.