On Fri, 16 Sep 2011 19:06:40 -0500 Dale <[email protected]> wrote:
> Neil Bothwick wrote: > > On Fri, 16 Sep 2011 22:03:20 +0100, Peter Humphrey wrote: > > > >> In case it helps, here's the relevant part of my fstab: > >> > >> /dev/sda1 /boot ext2 noatime,noauto 1 2 > >> /dev/md3 / ext4 noatime 1 1 > >> /dev/vg1/home /home ext4 noatime > >> 1 2 > > A word of advice when starting from scratch, give your VG(s) unique > > names. I've seen what happens when someone takes a drive from > > one Fedora system and puts it in another, so there are two VGs > > called vg01. It ain't nice (only one is seen, usually not the one > > you want). > > > > I prefer to give my VGs names related to the hostname, so it's > > perfectly clear where they came from and no risk of name collisions > > if I have to attach the drive to another computer. > > > > > > I did name it pretty well. It is called "test" right now. lol > Right now, I'm just having fun. The biggest difference so far is > that I can see with my new glasses. I just wish I didn't have > arthritis in my neck and could move my head better. It's hard to > switch between normal and the bifocal thingys. > > I'm getting this LVM thing down pat tho. > > cfdisk to create partitions, if not using the whole drive. > pvcreate > vgcreate > lvcreate > then put on a file system and mount. > > I still get them confused as to what comes first but I got some > pictures to look at now. That helps to picture what I am doing, sort > of. > > Thanks to all for the advice tho. It's helping. Still nervous > about / on LVM tho. :/ Your list is upside down :-) Turn it the other way in your head and it all makes sense, fs at the top and pv at the bottom and the order makes sense. A useful mental trick is to remember that each thing in the list can't be bigger than the one below it (you can't put a 200G fs on a 100G block device for example). Take the list: fs lv vg pv disk partition raw disk To make a bigger fs, you need a bigger lv first. You have free space in the vg, so you can just extend the lv into it, then grow the fs (this is conceptually identical to making a disk partition bigger then growing the fs if you don't use LVM). To make a smaller fs, reduce the fs first then reduce the lv to match. The one slight oddity is making a vg bigger and smaller - a vg isn't like a volume that you can make bigger, it's a *group* of things, specifically pvs. To make a vg bigger, you add pvs to it. To make a vg smaller, you take pvs away (much like enlarging and reducing RAID arrays - you add and remove disks). Once you've worked it through it in your head once or twice it all makes sense. Users just gotta spend the 30 minutes doing that first. -- Alan McKinnnon [email protected]

