Re: [gentoo-user] LVM for data drives but not the OS
On Fri, 08 Apr 2011 18:36:28 -0500, Dale wrote: A little time saver, if you have only one VG, set $LVM_VG_NAME to its name and you can leave the VG name out of any lv* commands. I'll have more than one before long so may as well learn the long way. Neat to know tho. I'm hoping for about a 2Tb or maybe a 1.5Tb drive. That should last me a while but I'm going to put my current 750Gb on there too. No matter how many drives you have, I doubt you'll need more than one volume group. -- Neil Bothwick Top Oxymorons Number 7: Definite maybe signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
On Saturday 09 April 2011 09:52:01 Neil Bothwick wrote: No matter how many drives you have, I doubt you'll need more than one volume group. ...although I did find not long ago that a second VG for another, temporary distro kept things tidy.. This is not to contradict you though. -- Rgds Peter
Re: [gentoo-user] LVM for data drives but not the OS
On Sat, 9 Apr 2011 10:43:12 +0100, Peter Humphrey wrote: No matter how many drives you have, I doubt you'll need more than one volume group. ...although I did find not long ago that a second VG for another, temporary distro kept things tidy.. This is not to contradict you though. Oh yes, and I have two VGs on my desktop, because I want to keep backups completely separate. But for the usage Dale has mentioned, one VG is best. If for no other reason that multiple VGs reduce the flexibility of LVM. -- Neil Bothwick We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the works of Shakespeare. Now, thanks to the Internet, we know this is not true. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Fri, 08 Apr 2011 18:36:28 -0500, Dale wrote: A little time saver, if you have only one VG, set $LVM_VG_NAME to its name and you can leave the VG name out of any lv* commands. I'll have more than one before long so may as well learn the long way. Neat to know tho. I'm hoping for about a 2Tb or maybe a 1.5Tb drive. That should last me a while but I'm going to put my current 750Gb on there too. No matter how many drives you have, I doubt you'll need more than one volume group. Ah, I see what you are saying now. I may have two or three PV's, and several LV's but only one VG. My bulb got a little brighter. I could end up putting /usr, /var, and such on LVM one day. I wouldn't want to go as far as having to have the initrd thingy tho. Basically a minimal / with some of the other growing stuff on LVM. Still trying to grasp making it larger while still online. Plain weird. O_O Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Sat, 9 Apr 2011 10:43:12 +0100, Peter Humphrey wrote: No matter how many drives you have, I doubt you'll need more than one volume group. ...although I did find not long ago that a second VG for another, temporary distro kept things tidy.. This is not to contradict you though. Oh yes, and I have two VGs on my desktop, because I want to keep backups completely separate. But for the usage Dale has mentioned, one VG is best. If for no other reason that multiple VGs reduce the flexibility of LVM. And I wouldn't put another distro on here anyway. I wuv my Gentoo. dale hugs the Gentoo bytes on the drive platters lol I think for me, just one would be enough. One more question. When I buy another drive, I use pvcreate to get the new drive ready for LVM. What command adds it to the VG? Is it vgcreate with some option? I was sort of looking for something like vgadd or something but no luck finding that. Maybe I am missing it on the howtos. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Dale wrote: Neil Bothwick wrote: On Sat, 9 Apr 2011 10:43:12 +0100, Peter Humphrey wrote: No matter how many drives you have, I doubt you'll need more than one volume group. ...although I did find not long ago that a second VG for another, temporary distro kept things tidy.. This is not to contradict you though. Oh yes, and I have two VGs on my desktop, because I want to keep backups completely separate. But for the usage Dale has mentioned, one VG is best. If for no other reason that multiple VGs reduce the flexibility of LVM. And I wouldn't put another distro on here anyway. I wuv my Gentoo. dale hugs the Gentoo bytes on the drive platters lol I think for me, just one would be enough. One more question. When I buy another drive, I use pvcreate to get the new drive ready for LVM. What command adds it to the VG? Is it vgcreate with some option? I was sort of looking for something like vgadd or something but no luck finding that. Maybe I am missing it on the howtos. Dale :-) :-) That would be vgextend wouldn't it? I just read another bit in another howto. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Apparently, though unproven, at 12:48 on Saturday 09 April 2011, Dale did opine thusly: the new drive ready for LVM. What command adds it to the VG? Is it vgcreate with some option? I was sort of looking for something like vgadd or something but no luck finding that. Maybe I am missing it on the howtos. Dale :-) :-) That would be vgextend wouldn't it? I just read another bit in another howto. Yes. PVs, VGs, LVs all have a concept of extend|resize|reduce. What that means depends on what you are working with, but they all make the thing bigger or smaller. For a PV it means the underlying device's size changed, so the PV must change to match. Take a 500G drive, create 1 partition on it of 100G and make it a PV. Now enlarge the partition to 200G, you must extend the PV to match. A VG isn't a single thing, it's a collection of things. Extending it means to add more PVs, reducing it means to take PVs out of the VG. Hopefully you will always remember to migrate the data off a PV before removing it from a VG :-) Extend/Reduce an LV means to make the device larger/smaller. It is exactly the same thing as changing a partition size using fdisk. Obviously, you need to tweak the filesystem at the same time -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] LVM for data drives but not the OS
Alan McKinnon wrote: Apparently, though unproven, at 12:48 on Saturday 09 April 2011, Dale did opine thusly: Yes. PVs, VGs, LVs all have a concept of extend|resize|reduce. What that means depends on what you are working with, but they all make the thing bigger or smaller. For a PV it means the underlying device's size changed, so the PV must change to match. Take a 500G drive, create 1 partition on it of 100G and make it a PV. Now enlarge the partition to 200G, you must extend the PV to match. A VG isn't a single thing, it's a collection of things. Extending it means to add more PVs, reducing it means to take PVs out of the VG. Hopefully you will always remember to migrate the data off a PV before removing it from a VG :-) Extend/Reduce an LV means to make the device larger/smaller. It is exactly the same thing as changing a partition size using fdisk. Obviously, you need to tweak the filesystem at the same time So, when I get me a new drive, I use pvcreate to get it ready for LVM, then use vgextend to add it to the VG, then it is available for whatever LV I want to extend or to make a new LV? I think I am catching on here. It was just difficult for me to grasp how things are layered for some reason. Some of the pictures I found helped a good bit tho. Just helped me picture what the commands are doing exactly. I did learn the hard way to resize the file system tho. I forgot that earlier. Sort of had me scratching my head for a bit. lol Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Friday 08 April 2011 16:30:03 Dale wrote: J. Roeleveld wrote: On Fri, April 8, 2011 11:01 pm, Dale wrote: root@fireball / # I'm still trying to figure out how the naming part works tho. Now to mount it and put something on it. See if it works. Naming part, there are 2 ways of finding it. 1: /dev/VolumeGroupName/LogicalVolumeName 2: /dev/mapper/VolumeGroupName-LogicalVolumeName You included a - in your VG-name, this is replaced with -- under /dev/mapper/ Let me know if something doesn't look right. Otherwise, I'll keep playing around with it. Looks fine so far, don't forget to put a filesystem on /dev/sdb-vg/test to be able to mount it somewhere :) -- Joost The naming I was talking about was sort of like a label. I wanted to use test, where I might use say data in real use, but ended up with this: root@fireball / # df Filesystem 1K-blocks Used Available Use% Mounted on SNIP /dev/mapper/sdb--vg-test 51606140184268 48800432 1% /mnt/temp root@fireball / # I don't mind the sdb--vg part tho. I guess that sort of points to what all is needed to get to that point. Might come in handy if I needed to remove something tho. Sort of tells me what is what. True :) I tend to start my VGs with vg_something. That way I know what they're for. Also, it's a good idea to not name them vg as then you can get naming conflicts if you ever put the drive into another machine that also has a VG called that. As example for the way I name them: vg_hostname. On my server, I actually have 2 Volume Groups. One for the OS-parts (including VMs) and the other for the data. I did try to mount it before putting a file system on it. I sort of missed that part somewhere. I knew it needed it, just forgot to do it. Mount sort of puked on my keyboard to remind me. lol Hehe :) I forget as well sometimes. Whew !! Progress. Oh, someone posted a link to a site that had pictures. That helped a good bit. It needed more detail tho. I'm going to do some google image searches and see what I can find. I think I posted more then 1 link, actually :) Thanks much. You're welcome -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Saturday 09 April 2011 00:28:20 Dale wrote: OK. I learned something. Check this out: root@fireball / # df Filesystem 1K-blocks Used Available Use% Mounted on SNIP /dev/mapper/sdb--vg-test 51606140 48910048 74652 100% /mnt/temp root@fireball / # This is what I am doing here. As I posted a while ago, I created a 50Gb LV. I attempted to copy about 75Gbs to it which filled it up but I wanted to make sure it would. lol Then I used lvextend -L100G /dev/mapper/sdb--vg-test to make it larger. I read I could do the same thing with lvresize but the example I was reading showed lvextend. This is what I got now: root@fireball / # lvdisplay --- Logical volume --- LV Name/dev/sdb-vg/test VG Namesdb-vg LV UUIDmixhOb-La6D-BwG4-Uz3l-P0ci-oGg5-YI3mN8 LV Write Accessread/write LV Status available # open 1 LV Size100.00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 root@fireball / # So, according to that it is 100Gbs which is what I wanted. Thing was, it didn't work. So, h. Light bulb moment. Resize the file system silly. After that, success. So, I created something that wasn''t big enough, filled it up, made it bigger, fixed the file system and now it is working. All while online too. That is the weird part. Still not comfy putting a OS on it but it is cool so far. Nice :) Btw, instead of specifying final size after resizing, you can actually tell it to add 20GB by doing: lvrextend -L+20G /dev/sdb-vg/test -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Saturday 09 April 2011 06:43:25 Dale wrote: Alan McKinnon wrote: Apparently, though unproven, at 12:48 on Saturday 09 April 2011, Dale did opine thusly: Yes. PVs, VGs, LVs all have a concept of extend|resize|reduce. What that means depends on what you are working with, but they all make the thing bigger or smaller. For a PV it means the underlying device's size changed, so the PV must change to match. Take a 500G drive, create 1 partition on it of 100G and make it a PV. Now enlarge the partition to 200G, you must extend the PV to match. A VG isn't a single thing, it's a collection of things. Extending it means to add more PVs, reducing it means to take PVs out of the VG. Hopefully you will always remember to migrate the data off a PV before removing it from a VG :-) Extend/Reduce an LV means to make the device larger/smaller. It is exactly the same thing as changing a partition size using fdisk. Obviously, you need to tweak the filesystem at the same time So, when I get me a new drive, I use pvcreate to get it ready for LVM, then use vgextend to add it to the VG, then it is available for whatever LV I want to extend or to make a new LV? I think I am catching on here. It was just difficult for me to grasp how things are layered for some reason. Some of the pictures I found helped a good bit tho. Just helped me picture what the commands are doing exactly. I did learn the hard way to resize the file system tho. I forgot that earlier. Sort of had me scratching my head for a bit. lol That's an easy one to miss :) You do seem to be catching on quick on this. -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Friday 08 April 2011 16:30:03 Dale wrote: The naming I was talking about was sort of like a label. I wanted to use test, where I might use say data in real use, but ended up with this: root@fireball / # df Filesystem 1K-blocks Used Available Use% Mounted on SNIP /dev/mapper/sdb--vg-test 51606140184268 48800432 1% /mnt/temp root@fireball / # I don't mind the sdb--vg part tho. I guess that sort of points to what all is needed to get to that point. Might come in handy if I needed to remove something tho. Sort of tells me what is what. True :) I tend to start my VGs with vg_something. That way I know what they're for. Also, it's a good idea to not name them vg as then you can get naming conflicts if you ever put the drive into another machine that also has a VG called that. As example for the way I name them: vg_hostname. On my server, I actually have 2 Volume Groups. One for the OS-parts (including VMs) and the other for the data. I wish it was like file system labels but I guess any clues is better than nothing. I did try to mount it before putting a file system on it. I sort of missed that part somewhere. I knew it needed it, just forgot to do it. Mount sort of puked on my keyboard to remind me. lol Hehe :) I forget as well sometimes. Whew !! Progress. Oh, someone posted a link to a site that had pictures. That helped a good bit. It needed more detail tho. I'm going to do some google image searches and see what I can find. I think I posted more then 1 link, actually :) Thanks much. You're welcome -- Joost You did. I think a couple of them had some pictures to but google image search found some more that helped. Of course, reading the commands to see how they work helped too. I just needed a picture to see how this was built up. I learned a lot in the past couple days. Still don't want my OS on it tho. ;-) Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: Nice :) Btw, instead of specifying final size after resizing, you can actually tell it to add 20GB by doing: lvrextend -L+20G /dev/sdb-vg/test -- Joost So that was what the howto meant. If I know the total I need then I can specify it but if I know the amount of extra space I need, I can just do +XX and it adds it. That's neat. Some coder had his/her thinking hat on that day. Thanks. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Apparently, though unproven, at 13:43 on Saturday 09 April 2011, Dale did opine thusly: So, when I get me a new drive, I use pvcreate to get it ready for LVM, then use vgextend to add it to the VG, then it is available for whatever LV I want to extend or to make a new LV? Yup, that's really what it's all about. LVM will decide for itself what bits of what PV to use for each LV, you should just let it go ahead and make it's own decisions. The man page describes options where you can control stuff - like striping and mirroring. I find this just confuses the issue though and makes stuff needlessly complex. A much better viewpoint is you deal with your striping and performance issues at a lower layer - RAID - and treat LVM as something that creates a gigantic storage bucket where you take out how much you need and don't care where it is. If two drives have vastly different performance characteristics and you find yourself having to dictate to LVM what to do, then they really should not be in the same VG at all. -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] LVM for data drives but not the OS
On Sat, 09 Apr 2011 08:00:49 -0500, Dale wrote: I wish it was like file system labels but I guess any clues is better than nothing. It is like filesystem labels in that you can give VGs and LVs meaningful names. You can use filesystem labels too, if you feel the need. A logical volume is just a block device, like /dev/sda1, you can do the same to either in terms of filesystems. -- Neil Bothwick You know how dumb the average person is? Well, statistically, half of them are even dumber than that - Lewton, P.I. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Saturday 09 April 2011 06:43:25 Dale wrote: Alan McKinnon wrote: Apparently, though unproven, at 12:48 on Saturday 09 April 2011, Dale did opine thusly: Yes. PVs, VGs, LVs all have a concept of extend|resize|reduce. What that means depends on what you are working with, but they all make the thing bigger or smaller. For a PV it means the underlying device's size changed, so the PV must change to match. Take a 500G drive, create 1 partition on it of 100G and make it a PV. Now enlarge the partition to 200G, you must extend the PV to match. A VG isn't a single thing, it's a collection of things. Extending it means to add more PVs, reducing it means to take PVs out of the VG. Hopefully you will always remember to migrate the data off a PV before removing it from a VG :-) Extend/Reduce an LV means to make the device larger/smaller. It is exactly the same thing as changing a partition size using fdisk. Obviously, you need to tweak the filesystem at the same time So, when I get me a new drive, I use pvcreate to get it ready for LVM, then use vgextend to add it to the VG, then it is available for whatever LV I want to extend or to make a new LV? I think I am catching on here. It was just difficult for me to grasp how things are layered for some reason. Some of the pictures I found helped a good bit tho. Just helped me picture what the commands are doing exactly. I did learn the hard way to resize the file system tho. I forgot that earlier. Sort of had me scratching my head for a bit. lol That's an easy one to miss :) You do seem to be catching on quick on this. -- Joost I think I am too. Since folks know I am disabled anyway, I went to the Dr the other day. The new meds aren't perfect but it is better. When I go back, he may change it to another med. He just wanted to try this first. It does sort of help me to get a better grasp on things tho. Sort of weird in a way. That part is like a side effect. :/ I'm just needing to find me a good LARGE drive to put in here. I'm checking out the reviews but it just seems most have issues. May just have to buy one, work the stuffing out of it with a script or something to see if it holds up. I see some of the large drives spin slower, some a lot slower. Given the density of the data, are they about as fast as a drive that spins at 7200? My main drives for my OS and the large drive I already have turn at 7200 rpms. I'm just curious if that would be slower or because of the density of the data, it doesn't matter. I get about 80 to 100Mb/sec on my current drives. I have 3gbs/sec drives which is what my mobo maxes out at. I thought about getting a 6Gb/sec just in case I upgrade my mobo later. My data drive mostly has audio/video stuff but does contain pictures I took with my camera and some documents, mostly saved web pages or OOo stuff. My 750Gb drives plays audio/video stuff just fine, even the HD stuff. I just wouldn't want to get a drive that is slow enough to cause pauses and such. I see newegg has 3Tb drives too. he he he he O_O Thoughts? Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
on 04/09/2011 04:33 PM Dale wrote the following: snip I'm just needing to find me a good LARGE drive to put in here. I'm checking out the reviews but it just seems most have issues. snip Thoughts? I think you should be safe with WD1002FAEX, WD1502FAEX and WD2002FAEX.
Re: [gentoo-user] LVM for data drives but not the OS
On Sat, Apr 9, 2011 at 6:33 AM, Dale rdalek1...@gmail.com wrote: SNIP I think I am too. Since folks know I am disabled anyway, I went to the Dr the other day. The new meds aren't perfect but it is better. When I go back, he may change it to another med. He just wanted to try this first. It does sort of help me to get a better grasp on things tho. Sort of weird in a way. That part is like a side effect. :/ I'm just needing to find me a good LARGE drive to put in here. I'm checking out the reviews but it just seems most have issues. May just have to buy one, work the stuffing out of it with a script or something to see if it holds up. I see some of the large drives spin slower, some a lot slower. Given the density of the data, are they about as fast as a drive that spins at 7200? My main drives for my OS and the large drive I already have turn at 7200 rpms. I'm just curious if that would be slower or because of the density of the data, it doesn't matter. I get about 80 to 100Mb/sec on my current drives. I have 3gbs/sec drives which is what my mobo maxes out at. I thought about getting a 6Gb/sec just in case I upgrade my mobo later. My data drive mostly has audio/video stuff but does contain pictures I took with my camera and some documents, mostly saved web pages or OOo stuff. My 750Gb drives plays audio/video stuff just fine, even the HD stuff. I just wouldn't want to get a drive that is slow enough to cause pauses and such. I see newegg has 3Tb drives too. he he he he O_O Thoughts? Dale Good thread Dale. I've been busy this week so I finally read the whole thing, start to finish, this morning. Good LVM info which I expect I'll use one of these days myself. Personally II think one thing you might want to consider, given your concerns about not losing important personal data, is to investigate RAID with the same level of focus that you are doing with LVM. Instead of buying very large drives (3TB) you can build a large RAID6 or RAID5 out of smaller 500GB or 1TB drives. Personally my home compute server, which runs 4 copies of Windows 7 in VMWare and Virtualbox for trading in the futures market, is set up this way: - Five 500GB WD RAID Edition physical drives - /boot is just a 100MB partition on /dev/sda, but I've saved more partition space on other drives with various kernel images should /dev/sda fail. - Gentoo is on a 50GB 5-drive RAID1. That's a LOT of redundancy. I can technically lose 4 drives and the system continues to work fine. For the OS that's essentially unkillable short of someting like a power supply failure taking out all the drives or the MB. - /home is on a 5-drive RAID6 using 50GB partitions. That gives me a total of 150GB storage personally for my pictures, videos, code, etc., and allows 2 drives to fail without losing data. - /VirtualMachines is on a 5-drive RAID6 using the remaining 400GB on each drive, so that's 1.2TB with redundancy of a 2-drive loss being protected. I then have a few external eSATA hard drives that I use for backups. /home to one pair, /VirtualMachines to another pair. I think if I was to set up this system from scratch again I might consider one large RAID6 using 450GB and putting /home in one LV and /VirtualMachines in another. The advantage would be that over time, if my personal needs increased, I could resize the LVs more easily than resizing the RAIDs. (Which is also possible but beyond the scope of this thread...) Anyway, it's just another idea about how you can use the same hardware in a different configuration. Five 1TB drives as a RAID6 gives you both 3TB of storage as well as far more reliability. One 3TB drive by itself can die and everything is gone. Congrats on your learning experience and I hope it continues to be successful for you. Cheers, Mark
Re: [gentoo-user] LVM for data drives but not the OS
On Saturday 09 April 2011 08:04:19 Dale wrote: Joost Roeleveld wrote: Nice :) Btw, instead of specifying final size after resizing, you can actually tell it to add 20GB by doing: lvrextend -L+20G /dev/sdb-vg/test -- Joost So that was what the howto meant. If I know the total I need then I can specify it but if I know the amount of extra space I need, I can just do +XX and it adds it. That's neat. Some coder had his/her thinking hat on that day. For completeness, I just want to add that if there is not sufficient space available in the VG. The command will fail with a message telling you there is not enough room :) -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
I been reading this howto: http://www.tldp.org/HOWTO/LVM-HOWTO/index.html It hasn't been updated in several years now. Should I be reading this or is it up to date enough that I wont end up confused because of changes that have occurred since that howto has been updated? I don't want to learn something just to find out that there has been changes and then get my brain turned to soup. Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. I'm hoping for some nice pictures before to long to help explain this some more. lol Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. No. A physical volume is an area of disk. It can be the whole disk but it more usually a partition. -- Neil Bothwick Top Oxymorons Number 18: Taped live signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
On Friday 08 April 2011 05:42:59 Dale wrote: I been reading this howto: http://www.tldp.org/HOWTO/LVM-HOWTO/index.html It hasn't been updated in several years now. Should I be reading this or is it up to date enough that I wont end up confused because of changes that have occurred since that howto has been updated? I don't want to learn something just to find out that there has been changes and then get my brain turned to soup. Not sure about the commands there. The basic theory is, from a quick glance, still valid. That it still mentions LVM1 isn't usefull for you as you'll automatically be using LVM2. (yes, new version came out sometimes in 2.6.x :) ) As for more current howtos: https://wiki.archlinux.org/index.php/LVM http://www.gentoo.org/doc/en/lvm2.xml And via a blog posting ( http://www.vm-aware.com/2008/08/how-to-linux-lvm/ ) I found 2 more: http://www.ntlug.org/Articles/LVM http://www.howtoforge.com/linux_lvm Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. Eerh... Nearly there :) Most people use partitions on a physical drive for the physical volumes. I'm hoping for some nice pictures before to long to help explain this some more. lol You ask, wikipedia delivers: http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29 -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. No. A physical volume is an area of disk. It can be the whole disk but it more usually a partition. Ooooh. Still some progress tho. lol So, if I was going to use LVM, I create a partition first, either whole drive or part of it then use LVM on that? Then comes in the rest of the stuff that I am still trying to get a grip on. This reminds me of catching a catfish. It's slimy and hard to get a grip on. lol Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Friday 08 April 2011 15:40:18 Dale wrote: Neil Bothwick wrote: On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. No. A physical volume is an area of disk. It can be the whole disk but it more usually a partition. Ooooh. Still some progress tho. lol So, if I was going to use LVM, I create a partition first, either whole drive or part of it then use LVM on that? Then comes in the rest of the stuff that I am still trying to get a grip on. Yes. Here's the sequence: 1. Start with some sort of storage device (disk, partition, whatever - it must just be a block device) 2. Run pvcreate on it. This is like making swapspace - it adds a signature to the beginning of the block device so that LVM knows it can use the device 3. Add the pv to a volume group (vg). A vg is a collection of one or more pv's, they are so that you can build big vgs and create volumes larger than any one disk. On desktop with one drive or one RAID device, then vg often only has 1 pv in it 4. Allocate space from the vg. This is a logical volume, it is a block device just like any other and as far as the kernel and you are concerned you use it. mkfs it and mount it just like any other block device. Each of these elements (pv, vg, lv) can be added to, created, extended, reduced and the command systax is much the same for each. What that means exactly depends on what the thing is: PV: creating it starts it from scratch, the LVM data on it is gone. You only extend/reduce a PV if you changed the size of the underlying partition so that LVM know it's true size. VG: You don't really create a VG as such (it's a collection of things, not a single thing). Creating it means adding the first PV to the VG. Extending and reducing a VG means adding and removing PVs from the collection. When you reduce a VG, it's an excellent idea to have migrated all the data on the PV away first :-) LV: Make the LV larger or smaller. This is conceptually exactly the same as modifying a regular partition with fdisk, and you must take the same precautions: Extend: Make the LV bigger then grow the fs on it to use all the space Reduce: Shrink the fs on it then reduce the LV to the same size It's all very simple and logical really. It you grok what create/extend/reduce and so on means for each element then you won't go wrong. People get confused by LVM because tutorials on it, Red Hat training materials[1] and GUI tools try very hard to fudge the concept, hide the bits and present it like the partition, PV, VG, LV and filesystem on it and somehow all the same thing. Which is completely not true of course. [1] Especially Red Hat training materials. These caused more confusion about it than anything else I have ever seen. Including Gnome tools. And that's saying something. -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] LVM for data drives but not the OS
On Fri, Apr 8, 2011 at 6:40 AM, Dale rdalek1...@gmail.com wrote: Neil Bothwick wrote: On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. No. A physical volume is an area of disk. It can be the whole disk but it more usually a partition. Ooooh. Still some progress tho. lol So, if I was going to use LVM, I create a partition first, either whole drive or part of it then use LVM on that? Then comes in the rest of the stuff that I am still trying to get a grip on. This reminds me of catching a catfish. It's slimy and hard to get a grip on. lol Dale Dale, As for the 'whole disk' hint, I think what Neil means is that the drive doesn't need to be partitioned at all. I.e., instead of mke2fs -j /dev/sda3 think mke2fs -j /dev/sda - Mark
Re: [gentoo-user] LVM for data drives but not the OS
On Friday 08 April 2011 08:40:18 Dale wrote: Neil Bothwick wrote: On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. No. A physical volume is an area of disk. It can be the whole disk but it more usually a partition. Ooooh. Still some progress tho. lol So, if I was going to use LVM, I create a partition first, either whole drive or part of it then use LVM on that? Yes. correct. Don't forget to set the partition type to Linux LVM (8e). Then comes in the rest of the stuff that I am still trying to get a grip on. I'm confident you'll get there. This reminds me of catching a catfish. It's slimy and hard to get a grip on. lol So are most fish, I believe... Do you fish with your bare hands? -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Friday 08 April 2011 08:40:18 Dale wrote: Neil Bothwick wrote: On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Little light bulb here. physical volume is the same as a physical drive? If I understand it correctly, it is the whole thing unpartitioned. No. A physical volume is an area of disk. It can be the whole disk but it more usually a partition. Ooooh. Still some progress tho. lol So, if I was going to use LVM, I create a partition first, either whole drive or part of it then use LVM on that? Yes. correct. Don't forget to set the partition type to Linux LVM (8e). That would be done in cfdisk I presume. I think that is where I saw that. Then comes in the rest of the stuff that I am still trying to get a grip on. I'm confident you'll get there. One of these days. This reminds me of catching a catfish. It's slimy and hard to get a grip on. lol So are most fish, I believe... Do you fish with your bare hands? -- Joost I love to fish. I have issues with stress which is why I try to avoid it when I can so fishing is good for me plus I like to eat fish. I fish with a rod and a hook but they usually don't like when you start pulling the hook out. He tends to want to get away. That's where the slimy part comes in. I'm not sure where you are from but in some parts of the USA, some bright people do fish with their hands, usually very large catfish too. I saw it on TV and I wish I could catch one of those, even if I would need a new rod. A fish that size would likely break my rod unless I was using the deep sea fishing rod. Those fish weigh 30 lbs and some LOTS more. It's like pulling a teenager out of the water. O_O They are big. OK. Back to LVM. lol Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Friday 08 April 2011 09:45:48 Dale wrote: Joost Roeleveld wrote: On Friday 08 April 2011 08:40:18 Dale wrote: Neil Bothwick wrote: On Fri, 08 Apr 2011 05:42:59 -0500, Dale wrote: Yes. correct. Don't forget to set the partition type to Linux LVM (8e). That would be done in cfdisk I presume. I think that is where I saw that. Or in fdisk. Basically any decent partitioning tool can do it. Then comes in the rest of the stuff that I am still trying to get a grip on. I'm confident you'll get there. One of these days. :) This reminds me of catching a catfish. It's slimy and hard to get a grip on. lol So are most fish, I believe... Do you fish with your bare hands? -- Joost I love to fish. I have issues with stress which is why I try to avoid it when I can so fishing is good for me plus I like to eat fish. I fish with a rod and a hook but they usually don't like when you start pulling the hook out. Ok... Only time I ever went fishing was in some fishing farm in France. The fish there were quite good at eating the bait of the hooks. It ended up being a timing contest: - Bait on hook - Hook in water for less then a second - Pull out hook If you timed it right, the fish would be hooked. Too quick, and fish wouldn't bite. Too slow, and fish would be gone, with bait He tends to want to get away. That's where the slimy part comes in. I'm not sure where you are from but in some parts of the USA, some bright people do fish with their hands, usually very large catfish too. I saw it on TV and I wish I could catch one of those, even if I would need a new rod. A fish that size would likely break my rod unless I was using the deep sea fishing rod. Those fish weigh 30 lbs and some LOTS more. It's like pulling a teenager out of the water. O_O They are big. That's a small teenager then. Only 30lbs (less then 25 kilos) :) FYI: I'm in the Netherlands, Europe and looking forward to the weekend, hope the weather stays like this (sunny, clear sky, hardly any wind) OK. Back to LVM. lol Oki... -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Fri, 08 Apr 2011 15:50:03 +0200, Dale wrote about Re: [gentoo-user] LVM for data drives but not the OS: [snip] Ooooh. Still some progress tho. lol So, if I was going to use LVM, I create a partition first, either whole drive or part of it then use LVM on that? You use pvcreate to create a physical volume from the partition; this formats the partition for LVM use, rather than for a filesystem. When you have enough physical volumes on enough disks -- it's usually one large PV per disk -- you then use vgcreate to amalgamate those physical volumes into a volume group. You can then use lvcreate to allocate logical volumes within that volume group. After that, you use mkfs to format each logical volume, as if it were a partition. You can then add them to /etc/fstab and mount them as needed. Note that the amalgamation of physical volumes into a volume group allows you to do some neat things: you can stripe a logical volume across multiple physical volumes to improve its I/O bandwidth; your volume group is what DASD managers call a concatenation set, which means its effective size is the sum of the physical volume sizes, so you can create a logical volume that is bigger than any of the physical volumes involved. But before you do any of that fancy stuff, get used to using LVM2 as a smarter partition manager. -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* dwn...@ntlworld.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Friday 08 April 2011 09:45:48 Dale wrote: He tends to want to get away. That's where the slimy part comes in. I'm not sure where you are from but in some parts of the USA, some bright people do fish with their hands, usually very large catfish too. I saw it on TV and I wish I could catch one of those, even if I would need a new rod. A fish that size would likely break my rod unless I was using the deep sea fishing rod. Those fish weigh 30 lbs and some LOTS more. It's like pulling a teenager out of the water. O_O They are big. That's a small teenager then. Only 30lbs (less then 25 kilos) :) FYI: I'm in the Netherlands, Europe and looking forward to the weekend, hope the weather stays like this (sunny, clear sky, hardly any wind) OK. Back to LVM. lol Oki... -- Joost The part about the teenager was in reference to the LOTS more. They have caught fish that was close to 100 lbs. I have a friend that even where we are has caught fish over 50 or 60 lbs. To me tho, they don't taste good. We have a fish called shad here. They love to clean the hook too. They have learned to come in from the side of the hook and they don't get caught. That's where a small treble hook comes in tho. It doesn't have sides. lol The shads are small but they make good bait. Never heard of anybody eating them tho. They are pretty small. Well, gas is going up. Going to go fill up my car and a couple jugs. Already got my 55 gallon drum full. See, I ain't stupid. :-p Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Thursday 07 April 2011 08:57:40 Dale wrote: Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) Joost, I see your point. This is my life saying. If it wasn't for bad luck, I wouldn't have any luck at all. I hope for the best but expect the worst. You should see my dining room. Full of food stuff just in case. After my last visit to the grocery store, I'm thinking I may not have enough yet. o_O I also have a generator and some gas stored too. I also have a big garden to grow food as well. I may be disabled but I ain't stupid. I just try to keep the bad things that can happen in the back of my mind and keep a plan going, just in case it does hit the fan. The Internet is a mixed blessing. We only see what people type. But have difficulty understanding their personal situation because we don't see it. Up untill the point you mentioned you're disabled, I was like Hmm... I know a few people like that :) I would call that self-sufficient and quite clever. I would like to be able to move somewhere where I could just enjoy life and life of some piece of land. I would not consider you stupid, you've shown, at least in my opinion, that you're not :) I'm sort of wanting to use this as a learning experience. If I can get things set up, working and understand what the heck things do, then I may try some more stuff. Right now, my light bulb is pretty dim on LVM. I don't understand how it works and what the heck those commands do. I'll have my light bulb moment eventually. Since I don't have the new drive ordered yet, I got time to read, listen and try to grasp it all. The beginning of wisdom is admitting you don't have it ;) Just a old dog trying to learn new tricks. lol I'm lousy at training dogs (or other animals), but lets see if I can make LVM, or at least the way I use it, a bit clearer. If anything isn't clear, please ask. We've already discussed the benefits of using it in a previous thread. So I'll just skip those for now. With LVM, you end up with 1 or more VGs (Volume Group) Each VG consists of 1 or more PV (Physical Volume) Each VG can contain 1 or more LV (Logical Volume) In simple graphic: PV- VG- LV A PV is either an entire physical disk or a partition on a physical disk. This is why they're called Physical Volume A VG is a collection of Physical Volumes. The size of this depends equals the total size of all the PVs in this group. An LV is a partition on this Volume Group. Now, here comes the nice part. It is possible to extend a VG and LV. A VG is extended by adding a PV. It can also be reduced in size by removing a PV. NOTE: when removing a PV, ensure it is not used. (Tools exist for this) An LV can be extended as long as the VG has room for this. No movement of LVs is necessary, just like files on a filesystem, they get spread over available space. NOTE: Yes, this does lead to fragmentation (Tools exist to assist in defragmenting LVM) You can also reduce the size of an LV. (Again, make sure reducing the LV in size does not lead to loss of data) On top of an LV, any filesystem (Ext2/3/4, Reiserfs, XFS, JFS,) can be placed. Once an LV is created, the filesystem tools can simply access it just like any other block device (eg. physical disk) When selecting a filesystem to put on top of an LV, do check wether or not it at least supports increasing the size after creation. Most filesystems in use do support this even while the filesystem is mounted. Reducing the size of the filesystem is, in my use, less common. And I tend to simply copy data to a temporary location when I do need to reduce the size. I hope the above makes it a bit clearer on how it works. The actual commands for creating and managing an LVM-system, I'll leave for another time if and when they are needed. -- Joost I'm going to give this a stab here. I go buy a new drive. I use cfdisk to make it ready for LVM, the 8E thingy. I then tell LVM to make it a Physical Volume, either in whole or in part. I then tell LVM to make it a Volume Group and if I already had a drive using LVM I could then add the new drive to it. After that, I create Logical Volumes and put file systems on it for use sort of like the old partitions. Am I sort of getting on the right track? Did someone mention a GUI for this? ^-^ Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Apparently, though unproven, at 18:25 on Friday 08 April 2011, Dale did opine thusly: I'm going to give this a stab here. I go buy a new drive. I use cfdisk to make it ready for LVM, the 8E thingy. Yes I then tell LVM to make it a Physical Volume, either in whole or in part. Yes I then tell LVM to make it a Volume Group No. You add the PV to a Volume Group (which will be created if necessary) and if I already had a drive using LVM I could then add the new drive to it. Yes. After that, I create Logical Volumes and put file systems on it for use sort of like the old partitions. Yes. Once you have made the LV, you then do this: mkfs /dev/mapper/whatever instead of mkfs /dev/sda1 The kernel sees /dev/mapper/whatever as just another block device (aka something it can mkfs) Am I sort of getting on the right track? Spot on Did someone mention a GUI for this? ^-^ Piffle. GUIs for LVM confuse the issue. Stay away from them like the plague. -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] LVM for data drives but not the OS
Alan McKinnon wrote: Apparently, though unproven, at 18:25 on Friday 08 April 2011, Dale did opine thusly: I'm going to give this a stab here. I go buy a new drive. I use cfdisk to make it ready for LVM, the 8E thingy. Yes I then tell LVM to make it a Physical Volume, either in whole or in part. Yes I then tell LVM to make it a Volume Group No. You add the PV to a Volume Group (which will be created if necessary) Yea, I didn't type that in the way I meant it. PV is the bottom level, then VG goes on top of that then the LV. I think I am typing that in right. Basically, I create the PV first, then the VG then the LV. scratches head a bit I think I get it but may need better wording. and if I already had a drive using LVM I could then add the new drive to it. Yes. After that, I create Logical Volumes and put file systems on it for use sort of like the old partitions. Yes. Once you have made the LV, you then do this: mkfs /dev/mapper/whatever instead of mkfs /dev/sda1 The kernel sees /dev/mapper/whatever as just another block device (aka something it can mkfs) So when I get ready to make a file system, say ext3, then it would be mkfs.ext3 /dev/mapper/whatever. Then it would be ready to put stuff on. Am I sort of getting on the right track? Spot on Did someone mention a GUI for this? ^-^ Piffle. GUIs for LVM confuse the issue. Stay away from them like the plague. That is likely a good idea too. I get used to the GUI then if the GUI can't work, maybe X won't come up or something, then I have no idea where to start. Good advice. Thanks. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Apparently, though unproven, at 19:39 on Friday 08 April 2011, Dale did opine thusly: [snip] Yea, I didn't type that in the way I meant it. PV is the bottom level, then VG goes on top of that then the LV. I think I am typing that in right. Basically, I create the PV first, then the VG then the LV. scratches head a bit I think I get it but may need better wording. Nah, you got it already ;-) The kernel sees /dev/mapper/whatever as just another block device (aka something it can mkfs) So when I get ready to make a file system, say ext3, then it would be mkfs.ext3 /dev/mapper/whatever. Then it would be ready to put stuff on. Yup. You'll have to poke around /dev/ a bit to see how your udev does it today but you got the gist of it -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] LVM for data drives but not the OS
Alan McKinnon wrote: Apparently, though unproven, at 19:39 on Friday 08 April 2011, Dale did opine thusly: [snip] Yea, I didn't type that in the way I meant it. PV is the bottom level, then VG goes on top of that then the LV. I think I am typing that in right. Basically, I create the PV first, then the VG then the LV. scratches head a bit I think I get it but may need better wording. Nah, you got it already ;-) The kernel sees /dev/mapper/whatever as just another block device (aka something it can mkfs) So when I get ready to make a file system, say ext3, then it would be mkfs.ext3 /dev/mapper/whatever. Then it would be ready to put stuff on. Yup. You'll have to poke around /dev/ a bit to see how your udev does it today but you got the gist of it root@fireball / # pvcreate /dev/sdb Physical volume /dev/sdb successfully created root@fireball / # Step one done. It didn't puke on my keyboard. lol Now to see what else I can get into. Not going to put anything important on it tho. Just a temporary thing right now. Just getting my feet wet. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Dale wrote: root@fireball / # pvcreate /dev/sdb Physical volume /dev/sdb successfully created root@fireball / # Step one done. It didn't puke on my keyboard. lol Now to see what else I can get into. Not going to put anything important on it tho. Just a temporary thing right now. Just getting my feet wet. Dale :-) :-) More progress. root@fireball / # ls -al /dev/mapper/ total 0 drwxr-xr-x 2 root root 80 Apr 8 15:56 . drwxr-xr-x 16 root root4400 Apr 8 15:56 .. crw-rw 1 root root 10, 236 Apr 8 04:39 control lrwxrwxrwx 1 root root 7 Apr 8 15:56 sdb--vg-test - ../dm-0 root@fireball / # pvdisplay --- Physical volume --- PV Name /dev/sdb VG Name sdb-vg PV Size 232.83 GiB / not usable 2.58 MiB Allocatable yes PE Size 4.00 MiB Total PE 59604 Free PE 46804 Allocated PE 12800 PV UUID kopUKm-lXy1-7tiq-FuQ2-Xhs5-tGqN-Ls4R1v root@fireball / # vgdisplay --- Volume group --- VG Name sdb-vg System ID Formatlvm2 Metadata Areas1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV0 Cur LV1 Open LV 0 Max PV0 Cur PV1 Act PV1 VG Size 232.83 GiB PE Size 4.00 MiB Total PE 59604 Alloc PE / Size 12800 / 50.00 GiB Free PE / Size 46804 / 182.83 GiB VG UUID 5OSiWZ-rWza-uKJ2-rVMO-f38G-NBHx-dmAE1K root@fireball / # lvdisplay --- Logical volume --- LV Name/dev/sdb-vg/test VG Namesdb-vg LV UUIDmixhOb-La6D-BwG4-Uz3l-P0ci-oGg5-YI3mN8 LV Write Accessread/write LV Status available # open 0 LV Size50.00 GiB Current LE 12800 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 root@fireball / # I'm still trying to figure out how the naming part works tho. Now to mount it and put something on it. See if it works. Let me know if something doesn't look right. Otherwise, I'll keep playing around with it. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Fri, April 8, 2011 11:01 pm, Dale wrote: Dale wrote: root@fireball / # pvcreate /dev/sdb Physical volume /dev/sdb successfully created root@fireball / # Step one done. It didn't puke on my keyboard. lol Now to see what else I can get into. Not going to put anything important on it tho. Just a temporary thing right now. Just getting my feet wet. Dale :-) :-) More progress. root@fireball / # ls -al /dev/mapper/ total 0 drwxr-xr-x 2 root root 80 Apr 8 15:56 . drwxr-xr-x 16 root root4400 Apr 8 15:56 .. crw-rw 1 root root 10, 236 Apr 8 04:39 control lrwxrwxrwx 1 root root 7 Apr 8 15:56 sdb--vg-test - ../dm-0 Looks good :) root@fireball / # pvdisplay --- Physical volume --- PV Name /dev/sdb VG Name sdb-vg PV Size 232.83 GiB / not usable 2.58 MiB Allocatable yes PE Size 4.00 MiB Total PE 59604 Free PE 46804 Allocated PE 12800 PV UUID kopUKm-lXy1-7tiq-FuQ2-Xhs5-tGqN-Ls4R1v Looks fine root@fireball / # vgdisplay --- Volume group --- VG Name sdb-vg System ID Formatlvm2 Metadata Areas1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV0 Cur LV1 Open LV 0 Max PV0 Cur PV1 Act PV1 VG Size 232.83 GiB PE Size 4.00 MiB Total PE 59604 Alloc PE / Size 12800 / 50.00 GiB Free PE / Size 46804 / 182.83 GiB VG UUID 5OSiWZ-rWza-uKJ2-rVMO-f38G-NBHx-dmAE1K Looks ok, 50GB of 232.83 assigned root@fireball / # lvdisplay --- Logical volume --- LV Name/dev/sdb-vg/test VG Namesdb-vg LV UUIDmixhOb-La6D-BwG4-Uz3l-P0ci-oGg5-YI3mN8 LV Write Accessread/write LV Status available # open 0 LV Size50.00 GiB Current LE 12800 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 Here is the 50GB... root@fireball / # I'm still trying to figure out how the naming part works tho. Now to mount it and put something on it. See if it works. Naming part, there are 2 ways of finding it. 1: /dev/VolumeGroupName/LogicalVolumeName 2: /dev/mapper/VolumeGroupName-LogicalVolumeName You included a - in your VG-name, this is replaced with -- under /dev/mapper/ Let me know if something doesn't look right. Otherwise, I'll keep playing around with it. Looks fine so far, don't forget to put a filesystem on /dev/sdb-vg/test to be able to mount it somewhere :) -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
Apparently, though unproven, at 23:01 on Friday 08 April 2011, Dale did opine thusly: Dale wrote: root@fireball / # pvcreate /dev/sdb Physical volume /dev/sdb successfully created root@fireball / # Step one done. It didn't puke on my keyboard. lol Now to see what else I can get into. Not going to put anything important on it tho. Just a temporary thing right now. Just getting my feet wet. Dale :-) :-) More progress. root@fireball / # ls -al /dev/mapper/ total 0 drwxr-xr-x 2 root root 80 Apr 8 15:56 . drwxr-xr-x 16 root root4400 Apr 8 15:56 .. crw-rw 1 root root 10, 236 Apr 8 04:39 control lrwxrwxrwx 1 root root 7 Apr 8 15:56 sdb--vg-test - ../dm-0 root@fireball / # pvdisplay --- Physical volume --- PV Name /dev/sdb VG Name sdb-vg PV Size 232.83 GiB / not usable 2.58 MiB Allocatable yes PE Size 4.00 MiB Total PE 59604 Free PE 46804 Allocated PE 12800 PV UUID kopUKm-lXy1-7tiq-FuQ2-Xhs5-tGqN-Ls4R1v root@fireball / # vgdisplay --- Volume group --- VG Name sdb-vg System ID Formatlvm2 Metadata Areas1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV0 Cur LV1 Open LV 0 Max PV0 Cur PV1 Act PV1 VG Size 232.83 GiB PE Size 4.00 MiB Total PE 59604 Alloc PE / Size 12800 / 50.00 GiB Free PE / Size 46804 / 182.83 GiB VG UUID 5OSiWZ-rWza-uKJ2-rVMO-f38G-NBHx-dmAE1K root@fireball / # lvdisplay --- Logical volume --- LV Name/dev/sdb-vg/test VG Namesdb-vg LV UUIDmixhOb-La6D-BwG4-Uz3l-P0ci-oGg5-YI3mN8 LV Write Accessread/write LV Status available # open 0 LV Size50.00 GiB Current LE 12800 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 root@fireball / # I'm still trying to figure out how the naming part works tho. Now to mount it and put something on it. See if it works. Naming can vary a lot depending on udev rules. There will be one canonical name and one or more other things that symlink to it. Likely the canonical stuff will be /dev/mapper/. and the symlinks will be in /dev/sdb-vg/. cd and ls will see you right :-) Let me know if something doesn't look right. Otherwise, I'll keep playing around with it. Cool. So now you have a 250G PV, and it's the the only PV in it's volume group. You've made a 50G LV called test Cool so far. Now make a few more LVs (check the man pages, I'm doing this from memory): lvcreate -L 20G -n test2 sdb-vg lvcreate -L 30G -n test3 sdb-vg mkfs them: mkfs.your_choice /dev/sdb-vg/test{,2,3} mount points: mkdir /mnt/test{,2,3} mount them: mount /dev/sdb-vg/test /mnt/test Whoop-dee-doo. Now you can copy stuff there and do whatever you do with filesystems. Let's assume you have music on the first one test. Let's also assume you get more music and it's more than 50G; say you need another 20. Easy-peasy, grow the filesystem, grow the LV: lvextend -L +20G /dev/sdb-vg/test resize2fs /dev/sdb-vg/test That's it. Nothing more. Without LVM, you'd be off down to the 'puter store looking to buy 70 CDs to do that :-) It's important to remember that once you've made /dev/sdb into a PV, you will never touch that device again. You will especially never fdisk or mkfs it - all that is done on the block device that LVM gives you - /dev/sdb-vg/test -- alan dot mckinnon at gmail dot com
Re: [gentoo-user] LVM for data drives but not the OS
J. Roeleveld wrote: On Fri, April 8, 2011 11:01 pm, Dale wrote: root@fireball / # I'm still trying to figure out how the naming part works tho. Now to mount it and put something on it. See if it works. Naming part, there are 2 ways of finding it. 1: /dev/VolumeGroupName/LogicalVolumeName 2: /dev/mapper/VolumeGroupName-LogicalVolumeName You included a - in your VG-name, this is replaced with -- under /dev/mapper/ Let me know if something doesn't look right. Otherwise, I'll keep playing around with it. Looks fine so far, don't forget to put a filesystem on /dev/sdb-vg/test to be able to mount it somewhere :) -- Joost The naming I was talking about was sort of like a label. I wanted to use test, where I might use say data in real use, but ended up with this: root@fireball / # df Filesystem 1K-blocks Used Available Use% Mounted on SNIP /dev/mapper/sdb--vg-test 51606140184268 48800432 1% /mnt/temp root@fireball / # I don't mind the sdb--vg part tho. I guess that sort of points to what all is needed to get to that point. Might come in handy if I needed to remove something tho. Sort of tells me what is what. I did try to mount it before putting a file system on it. I sort of missed that part somewhere. I knew it needed it, just forgot to do it. Mount sort of puked on my keyboard to remind me. lol Whew !! Progress. Oh, someone posted a link to a site that had pictures. That helped a good bit. It needed more detail tho. I'm going to do some google image searches and see what I can find. Thanks much. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Fri, 8 Apr 2011 20:38:21 +0200, Alan McKinnon wrote: So when I get ready to make a file system, say ext3, then it would be mkfs.ext3 /dev/mapper/whatever. Then it would be ready to put stuff on. Yup. You'll have to poke around /dev/ a bit to see how your udev does it today but you got the gist of it Normally, each LV appears as /dev/vgname/lvname, which is slightly easier to work with than /dev/mapper/vgname-lvname. As for GUIs, they have two problems. They hide the working from you, which is counter-productive, and all the current ones suck. -- Neil Bothwick Welcome to the world of Windows 95. Stay a while -- stay foooreveeer. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
On Fri, 8 Apr 2011 23:23:20 +0200, Alan McKinnon wrote: Cool so far. Now make a few more LVs (check the man pages, I'm doing this from memory): lvcreate -L 20G -n test2 sdb-vg lvcreate -L 30G -n test3 sdb-vg A little time saver, if you have only one VG, set $LVM_VG_NAME to its name and you can leave the VG name out of any lv* commands. -- Neil Bothwick Criminal Lawyer is a redundancy. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Fri, 8 Apr 2011 23:23:20 +0200, Alan McKinnon wrote: Cool so far. Now make a few more LVs (check the man pages, I'm doing this from memory): lvcreate -L 20G -n test2 sdb-vg lvcreate -L 30G -n test3 sdb-vg A little time saver, if you have only one VG, set $LVM_VG_NAME to its name and you can leave the VG name out of any lv* commands. I'll have more than one before long so may as well learn the long way. Neat to know tho. I'm hoping for about a 2Tb or maybe a 1.5Tb drive. That should last me a while but I'm going to put my current 750Gb on there too. My new rig is still growing. lol Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Thu, Apr 7, 2011 at 5:22 AM, Dale rdalek1...@gmail.com wrote: Hi, Quick question about LVM. I have a 750Gb drive that has miscellaneous stuff on it. Stuff likes videos, music, pictures, ISO files and a few other things. It's not full yet but it is working on it. I have my OS on sda. The large drive is on sdc. If I buy another drive it should be sdd. I think this is possible from what I have read but want to make sure. Could I put sdc and sdd on LVM but the OS remain as it is with LVM not involved at all? Basically, my OS stays just like it is and is not touched my LVM at all but the two larger drives are managed by LVM. I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. If there is a better solution to link two large drives, I'm open to those ideas as well. LVM is all I can think of is why I mention it. Thanks. Dale :-) :-) I know I'm late to the game with a reply, but a couple of months ago, I setup a data box running Gentoo in the following configuration: OS drive: 250 GB PATA LVM2 data drives: 2 x WD Caviar Black 3 TB, raid1, LVM2 Had to partition those drives using parted, though. If that setup works fine -- and it does -- you'll have no issues.
Re: [gentoo-user] LVM for data drives but not the OS
OK. I learned something. Check this out: root@fireball / # df Filesystem 1K-blocks Used Available Use% Mounted on SNIP /dev/mapper/sdb--vg-test 51606140 48910048 74652 100% /mnt/temp root@fireball / # This is what I am doing here. As I posted a while ago, I created a 50Gb LV. I attempted to copy about 75Gbs to it which filled it up but I wanted to make sure it would. lol Then I used lvextend -L100G /dev/mapper/sdb--vg-test to make it larger. I read I could do the same thing with lvresize but the example I was reading showed lvextend. This is what I got now: root@fireball / # lvdisplay --- Logical volume --- LV Name/dev/sdb-vg/test VG Namesdb-vg LV UUIDmixhOb-La6D-BwG4-Uz3l-P0ci-oGg5-YI3mN8 LV Write Accessread/write LV Status available # open 1 LV Size100.00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 root@fireball / # So, according to that it is 100Gbs which is what I wanted. Thing was, it didn't work. So, h. Light bulb moment. Resize the file system silly. After that, success. So, I created something that wasn''t big enough, filled it up, made it bigger, fixed the file system and now it is working. All while online too. That is the weird part. Still not comfy putting a OS on it but it is cool so far. Dale :-) :-)
[gentoo-user] LVM for data drives but not the OS
Hi, Quick question about LVM. I have a 750Gb drive that has miscellaneous stuff on it. Stuff likes videos, music, pictures, ISO files and a few other things. It's not full yet but it is working on it. I have my OS on sda. The large drive is on sdc. If I buy another drive it should be sdd. I think this is possible from what I have read but want to make sure. Could I put sdc and sdd on LVM but the OS remain as it is with LVM not involved at all? Basically, my OS stays just like it is and is not touched my LVM at all but the two larger drives are managed by LVM. I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. If there is a better solution to link two large drives, I'm open to those ideas as well. LVM is all I can think of is why I mention it. Thanks. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 05:22:41 Dale wrote: Hi, Quick question about LVM. I have a 750Gb drive that has miscellaneous stuff on it. Stuff likes videos, music, pictures, ISO files and a few other things. It's not full yet but it is working on it. I have my OS on sda. The large drive is on sdc. If I buy another drive it should be sdd. I think this is possible from what I have read but want to make sure. Could I put sdc and sdd on LVM but the OS remain as it is with LVM not involved at all? Basically, my OS stays just like it is and is not touched my LVM at all but the two larger drives are managed by LVM. Simple (and complete answer): Yes, you can use LVM only for a subset of the drives you have inside a system. You will need to do it in the following steps though: - create PV, LVM and LV on the new drive - copy data over - create PV on old drive and add it to LVM Contact me or list if you need help with the actual commands and syntax. (There are plenty of howtos around) I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. Interesting argument. You don't trust LVM, so you put your personal files on there, but not the easily replacable stuff like OS? :) If there is a better solution to link two large drives, I'm open to those ideas as well. LVM is all I can think of is why I mention it. RAID-0 (if they're same size) or linking them together. Compared to those, I would always recommend LVM as that is easier to maintain then JBOD or RAID-0. There might also be filesystems that include disk-spanning, but if you're already not convinced about LVM being reliable, I wouldn't use one of these filesystems then. Please note, I have not lost data related to issues with LVM. I have, in the distant past, lost data related to issues with filesystems. Because of the latter, I rely on a combination of RAID-subsystems with LVM on top and reliable backups :) -- Joost Roeleveld
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Thursday 07 April 2011 05:22:41 Dale wrote: Hi, Quick question about LVM. I have a 750Gb drive that has miscellaneous stuff on it. Stuff likes videos, music, pictures, ISO files and a few other things. It's not full yet but it is working on it. I have my OS on sda. The large drive is on sdc. If I buy another drive it should be sdd. I think this is possible from what I have read but want to make sure. Could I put sdc and sdd on LVM but the OS remain as it is with LVM not involved at all? Basically, my OS stays just like it is and is not touched my LVM at all but the two larger drives are managed by LVM. Simple (and complete answer): Yes, you can use LVM only for a subset of the drives you have inside a system. You will need to do it in the following steps though: - create PV, LVM and LV on the new drive - copy data over - create PV on old drive and add it to LVM Contact me or list if you need help with the actual commands and syntax. (There are plenty of howtos around) I was reading the howto on a couple sites and it sounded like this could be done. Glad to know I would have to copy the files over to a LVM drive tho. That info was something I didn't know. I was hoping for some magic. lol I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. Interesting argument. You don't trust LVM, so you put your personal files on there, but not the easily replacable stuff like OS? :) I like my OS setup and don't want to have to reinstall. Although Gentoo has never let me down yet, I don't want to add to the confusion. If I can boot and get to my email, I can get help to fix LVM if needed. I also keep a backup of my personal files. I could recover the things I don't backup tho. Most of my concern is my lack of experience with LVM. If I was a guru on it, I might feel better about it. If there is a better solution to link two large drives, I'm open to those ideas as well. LVM is all I can think of is why I mention it. RAID-0 (if they're same size) or linking them together. Compared to those, I would always recommend LVM as that is easier to maintain then JBOD or RAID-0. There might also be filesystems that include disk-spanning, but if you're already not convinced about LVM being reliable, I wouldn't use one of these filesystems then. Please note, I have not lost data related to issues with LVM. I have, in the distant past, lost data related to issues with filesystems. Because of the latter, I rely on a combination of RAID-subsystems with LVM on top and reliable backups :) -- Joost Roeleveld Unless someone has a better idea, I think LVM is about all I can find that would do this. The drives won't be even close to each other. I hope I can find a nice 2Tb drive that I can afford. ;-) Maybe that will last a while. The 750Gb drive did last a pretty good while. I'm not sure after that tho. Thanks for the info. It did add to my knowledge and settle one of my questions. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. -- Neil Bothwick Advanced: (adj.) doesn't work yet, but it's pretty close. See: bug, glitch. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. It does to me. I want to keep things so that if there is a problem, I know how to fix it or can at least get to a point that I can get help on it. If LVM fails and I can't boot, then I loose everything on LVM because I would have to reinstall from scratch. If it fails just on my data stuff, I can get help and fix it because I can still boot up and get to my email program. Also, I have the important stuff backed up to DVD. I would only loose things that I can download again. I would just rather avoid that and I'm sure ATT would agree. That's a lot of downloading. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Dale writes: Quick question about LVM. I have a 750Gb drive that has miscellaneous stuff on it. Stuff likes videos, music, pictures, ISO files and a few other things. It's not full yet but it is working on it. I have my OS on sda. The large drive is on sdc. If I buy another drive it should be sdd. I think this is possible from what I have read but want to make sure. Could I put sdc and sdd on LVM but the OS remain as it is with LVM not involved at all? Basically, my OS stays just like it is and is not touched my LVM at all but the two larger drives are managed by LVM. I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. # create some partitions, or a single one. I prefer to have multiple ones, just in case I want to put other stuff there, like another OS. cfdisk /dev/sdd # create physical volumes (assuming you have /dev/sdd5 to /dev/sdd8) pvcreate /dev/sdd[5678] # create volume group 'stuff', using all those partitions vgcreate stuff /dev/sdd[5678] # create logical volumes. You probably will only have a single one, but here's how you would do this if you want three. lvcreate -L 300G -n musicstuff lvcreate -L 100G -n pictures stuff lvcreate -L 100G -n otherstuff # create file systems for fs in music pictures other do mke2fs -j -m 1 -L $fs /dev/stuff/$fs done If there is a better solution to link two large drives, I'm open to those ideas as well. LVM is all I can think of is why I mention it. RAID would be another solution. Beware, when one drive fails, all data can be lost. # mount the filesystems, and move stuff from sdc to them # call cfdisk and partition sdc (if you like) # create physical volumes: pvcreate /dev/sdc* # extend volume group vgextend stuff /dev/sdc* # want to enlarge file systems? lvresize -L 1000G /dev/stuff/other resize2fs /dev/stuff/other Use pvscan, lvscan and vgscan to check what physical/logical volumes and volume groups you have. {pv,lv,vg}dispklay give more verbose information. You might want to have more than one volume group. Maybe one for not so important data, that spans over two disks, and one or two that reside on a single drive only. So in case one drive fails, you do not lose too much data. What about a volume group that stores backups of each file system on sda? Wonko
Re: [gentoo-user] LVM for data drives but not the OS
On Thu, 07 Apr 2011 06:28:40 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. It does to me. I want to keep things so that if there is a problem, I know how to fix it or can at least get to a point that I can get help on it. If LVM fails and I can't boot, then I loose everything on LVM because I would have to reinstall from scratch. If it fails just on my data stuff, I can get help and fix it because I can still boot up and get to my email program. We have these things called live CDs and webmail :P Bear in mind that LVM has been around for years. It is proven and reliable. Once setup, you don't have to touch it, so you can't break it. The least trustworthy part of your system remains the user. -- Neil Bothwick First Law of Laboratory Work: Hot glass looks exactly the same as cold glass. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 06:12:40 Dale wrote: Joost Roeleveld wrote: On Thursday 07 April 2011 05:22:41 Dale wrote: You will need to do it in the following steps though: - create PV, LVM and LV on the new drive - copy data over - create PV on old drive and add it to LVM Contact me or list if you need help with the actual commands and syntax. (There are plenty of howtos around) I was reading the howto on a couple sites and it sounded like this could be done. Glad to know I would have to copy the files over to a LVM drive tho. That info was something I didn't know. I was hoping for some magic. lol As far as I know, there is no automatic conversion tool for most of these. Switching from non-raid to RAID-1 (mirroring) is the only one I think that might work. I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. Interesting argument. You don't trust LVM, so you put your personal files on there, but not the easily replacable stuff like OS? :) I like my OS setup and don't want to have to reinstall. Although Gentoo has never let me down yet, I don't want to add to the confusion. If I can boot and get to my email, I can get help to fix LVM if needed. I also keep a backup of my personal files. I could recover the things I don't backup tho. Most of my concern is my lack of experience with LVM. If I was a guru on it, I might feel better about it. Worst case I had: the metadata was incorrect. This was back with 2.6.18 kernels though. That was also easily recovered as all the LVM-tools, with default configuration, backup the metadata to a text-file before/after making any chances. You can then easily recover if anything goes wrong :) Please note, I have not lost data related to issues with LVM. I have, in the distant past, lost data related to issues with filesystems. Because of the latter, I rely on a combination of RAID-subsystems with LVM on top and reliable backups :) -- Joost Roeleveld Unless someone has a better idea, I think LVM is about all I can find that would do this. The drives won't be even close to each other. I hope I can find a nice 2Tb drive that I can afford. ;-) Maybe that will last a while. The 750Gb drive did last a pretty good while. I'm not sure after that tho. I've got 6 * 1.5TB drives in RAID-5 for documents and media and we have about 2TB left. But with our usage, I'll probably have to look into extending that later this year. Thanks for the info. It did add to my knowledge and settle one of my questions. Always glad to help. -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
In linux.gentoo.user, you wrote: Neil Bothwick wrote: On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. It does to me. I want to keep things so that if there is a problem, I know how to fix it or can at least get to a point that I can get help on it. If LVM fails and I can't boot, then I loose everything on LVM because I would have to reinstall from scratch. If it fails just on my data stuff, I can get help and fix it because I can still boot up and get to my email program. Also, I have the important stuff backed up to DVD. I would only loose things that I can download again. I would just rather avoid that and I'm sure ATT would agree. That's a lot of downloading. I have all my partitions on LVM except the boot partition. I've used LVM for more years than I could count and have *never* had a failure related to LVM. I backup my machines to an external drive (2 backup drives actually) using rsync. If I have a failure and cannot boot then I just put in my Gentoo Minimal CD (which has all the LVM tools available) and I can fix the damage. If the damage isn't fixable then I can just copy over the backups. LVM snapshots make live backups a breeze. Backups are always in a consistent state and I've tested them and they *work*. -- Regards, Gregory.
Re: [gentoo-user] LVM for data drives but not the OS
Gregory Shearman wrote: In linux.gentoo.user, you wrote: Neil Bothwick wrote: On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. It does to me. I want to keep things so that if there is a problem, I know how to fix it or can at least get to a point that I can get help on it. If LVM fails and I can't boot, then I loose everything on LVM because I would have to reinstall from scratch. If it fails just on my data stuff, I can get help and fix it because I can still boot up and get to my email program. Also, I have the important stuff backed up to DVD. I would only loose things that I can download again. I would just rather avoid that and I'm sure ATT would agree. That's a lot of downloading. I have all my partitions on LVM except the boot partition. I've used LVM for more years than I could count and have *never* had a failure related to LVM. I backup my machines to an external drive (2 backup drives actually) using rsync. If I have a failure and cannot boot then I just put in my Gentoo Minimal CD (which has all the LVM tools available) and I can fix the damage. If the damage isn't fixable then I can just copy over the backups. LVM snapshots make live backups a breeze. Backups are always in a consistent state and I've tested them and they *work*. If you know how to do that, then that works. Right now, I have no experience with LVM. All I know is what I have read which is about as clear as mud. ;-) Dale :-) :-) P. S. I wonder why this reply was not threaded with the rest? I see this happen sometimes with other threads. Always been curious about that.
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Thu, 07 Apr 2011 06:28:40 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. It does to me. I want to keep things so that if there is a problem, I know how to fix it or can at least get to a point that I can get help on it. If LVM fails and I can't boot, then I loose everything on LVM because I would have to reinstall from scratch. If it fails just on my data stuff, I can get help and fix it because I can still boot up and get to my email program. We have these things called live CDs and webmail :P Bear in mind that LVM has been around for years. It is proven and reliable. Once setup, you don't have to touch it, so you can't break it. The least trustworthy part of your system remains the user. Since I have no experience with LVM, that is the part I am worried about. If I knew everything you, Alan, Joost and others knew, I'd just install everything on it and hope for the best. I'm concerned that if something did go wrong and I couldn't get help, I'd loose everything. I don't have any way to back up this much data. I hate webmail. I guess I could but that would just get on my nerves something bad. Why is it that whenever I think I have found a good drive that is in the 1 to 2Tb range, it has awful reviews? Things like DOA, died after a few hours, days or weeks of use. This has me concerned. I have yet to have a drive go bad but are they making crap nowadays or what? Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 07:49:55 Dale wrote: Neil Bothwick wrote: On Thu, 07 Apr 2011 06:28:40 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. It does to me. I want to keep things so that if there is a problem, I know how to fix it or can at least get to a point that I can get help on it. If LVM fails and I can't boot, then I loose everything on LVM because I would have to reinstall from scratch. If it fails just on my data stuff, I can get help and fix it because I can still boot up and get to my email program. We have these things called live CDs and webmail :P Bear in mind that LVM has been around for years. It is proven and reliable. Once setup, you don't have to touch it, so you can't break it. The least trustworthy part of your system remains the user. Since I have no experience with LVM, that is the part I am worried about. If I knew everything you, Alan, Joost and others knew, I'd just install everything on it and hope for the best. I'm concerned that if something did go wrong and I couldn't get help, I'd loose everything. I don't have any way to back up this much data. I hate webmail. I guess I could but that would just get on my nerves something bad. GMails webmail isn't too bad, tbh :) I agree though, it's difficult to back up all the data and I have actually decided to only back-up a subset of what I have on the server. It also helps to have more then 1 system when something does go wrong. Even a small laptop (netbook-style) that can connect is of great help. I don't think I know everything, but I do tend to be lucky enough to be able to find the info I need online. Then again, internet usage is a bit more widespread where I live. Why is it that whenever I think I have found a good drive that is in the 1 to 2Tb range, it has awful reviews? Things like DOA, died after a few hours, days or weeks of use. This has me concerned. I have yet to have a drive go bad but are they making crap nowadays or what? Short answer: yes :) Long answer: the drives are getting a higher density the whole time which makes them more difficult to produce. Also, companies have found it's cheaper to offer free warranty-replacements then make more reliable drives in the first place. Never mind most people only have the computer running for a few hours a day. Not like some of us who have them running 24/7 :) I currently use WD's Green drives in my server and they do tend to be reliable as long as they can be kept decently cooled. -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Thu, 07 Apr 2011 07:49:55 -0500, Dale wrote: Bear in mind that LVM has been around for years. It is proven and reliable. Once setup, you don't have to touch it, so you can't break it. The least trustworthy part of your system remains the user. Since I have no experience with LVM, that is the part I am worried about. If I knew everything you, Alan, Joost and others knew, I'd just install everything on it and hope for the best. I'm concerned that if something did go wrong and I couldn't get help, I'd loose everything. I don't have any way to back up this much data. I hate webmail. I guess I could but that would just get on my nerves something bad. In that case, set up a small physical volume and create a volume group that holds nothing important. Do you best to break it and only when you fail should you consider putting anything of any importance on there. -- Neil Bothwick Any sufficiently advanced bug is indistinguishable from a feature. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
- Original Message From: Neil Bothwick n...@digimed.co.uk On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. Makes perfect sense to me as well. Having installed LVM - and then removed it due to issues; namely, the fact that one of the hard drives died taking out the whole LVM group, leaving the OS unbootable, and not easily fixable. There was a thread on that (started by me) a while back (over a year). So, perhaps if I had a RAID to underly so I could mirror drives under LVM for recovery I'd move to it again. But otherwise it is just a PITA waiting to happen. Ben
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 14:04:05 Neil Bothwick wrote: On Thu, 07 Apr 2011 07:49:55 -0500, Dale wrote: Bear in mind that LVM has been around for years. It is proven and reliable. Once setup, you don't have to touch it, so you can't break it. The least trustworthy part of your system remains the user. Since I have no experience with LVM, that is the part I am worried about. If I knew everything you, Alan, Joost and others knew, I'd just install everything on it and hope for the best. I'm concerned that if something did go wrong and I couldn't get help, I'd loose everything. I don't have any way to back up this much data. I hate webmail. I guess I could but that would just get on my nerves something bad. In that case, set up a small physical volume and create a volume group that holds nothing important. Do you best to break it and only when you fail should you consider putting anything of any importance on there. Eeerh... Neil I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 06:20:55 BRM wrote: - Original Message From: Neil Bothwick n...@digimed.co.uk On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. Makes perfect sense to me as well. Having installed LVM - and then removed it due to issues; namely, the fact that one of the hard drives died taking out the whole LVM group, leaving the OS unbootable, and not easily fixable. There was a thread on that (started by me) a while back (over a year). So, perhaps if I had a RAID to underly so I could mirror drives under LVM for recovery I'd move to it again. But otherwise it is just a PITA waiting to happen. Ben Unfortunately, any method that spreads a filesystem over multiple disks can be affected if one of those disks dies unless there is some mechanism in place that can handle the loss of a disk. For that, RAID (with the exception of striping, eg. RAID-0) provides that. Just out of curiousity, as I never had the need to look into this, I think that, in theory, it should be possible to recover data from LVs that were not using the failed drive. Is this assumption correct or wrong? -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) -- Neil Bothwick Blessed be the pessimist for he hath made backups. signature.asc Description: PGP signature
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 14:31:43 Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) LOL :) Seriously, if all the Open Source developers would make the software reliable enough to pass his testing methods, there wouldn't be any grounds for discussion :) It would just work, always -- Joost PS. I actually enjoy having people on the list with different levels and types of experience. I think I probably learn more stuff via questions from so-called beginners then from the old-timers ;)
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 15:41:00 Joost Roeleveld wrote: On Thursday 07 April 2011 14:31:43 Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) LOL :) Seriously, if all the Open Source developers would make the software reliable enough to pass his testing methods, there wouldn't be any grounds for discussion :) It would just work, always -- Joost PS. I actually enjoy having people on the list with different levels and types of experience. I think I probably learn more stuff via questions from so-called beginners then from the old-timers ;) Actually, thinking about it. Dale, please do try what Neil suggested. Preferably also document what you do so we have a few test cases :) -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
- Original Message From: Joost Roeleveld jo...@antarean.org On Thursday 07 April 2011 06:20:55 BRM wrote: - Original Message From: Neil Bothwick n...@digimed.co.uk On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. Makes perfect sense to me as well. Having installed LVM - and then removed it due to issues; namely, the fact that one of the hard drives died taking out the whole LVM group, leaving the OS unbootable, and not easily fixable. There was a thread on that (started by me) a while back (over a year). So, perhaps if I had a RAID to underly so I could mirror drives under LVM for recovery I'd move to it again. But otherwise it is just a PITA waiting to happen. Ben Unfortunately, any method that spreads a filesystem over multiple disks can be affected if one of those disks dies unless there is some mechanism in place that can handle the loss of a disk. For that, RAID (with the exception of striping, eg. RAID-0) provides that. Just out of curiousity, as I never had the need to look into this, I think that, in theory, it should be possible to recover data from LVs that were not using the failed drive. Is this assumption correct or wrong? If you have the LV configuration information, then yes. Since I managed to find the configuration information, I was able to remove the affected PVs from the VG, and get it back up. I might still have it running, but I'll back it out on the next rebuild - or if I have a drive large enough to do so with in the future. I was wanting to use LVM as a bit of a software RAID, but never quite got that far in the configuration before it failed. It does do a good job at what it's designed for, but I would not trust the OS to it either since the LVM configuration is very important to keep around. If not, good luck as far as I can tell. Ben
Re: [gentoo-user] LVM for data drives but not the OS
Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) Joost, I see your point. This is my life saying. If it wasn't for bad luck, I wouldn't have any luck at all. I hope for the best but expect the worst. You should see my dining room. Full of food stuff just in case. After my last visit to the grocery store, I'm thinking I may not have enough yet. o_O I also have a generator and some gas stored too. I also have a big garden to grow food as well. I may be disabled but I ain't stupid. I just try to keep the bad things that can happen in the back of my mind and keep a plan going, just in case it does hit the fan. I'm sort of wanting to use this as a learning experience. If I can get things set up, working and understand what the heck things do, then I may try some more stuff. Right now, my light bulb is pretty dim on LVM. I don't understand how it works and what the heck those commands do. I'll have my light bulb moment eventually. Since I don't have the new drive ordered yet, I got time to read, listen and try to grasp it all. Just a old dog trying to learn new tricks. lol Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
Joost Roeleveld wrote: On Thursday 07 April 2011 15:41:00 Joost Roeleveld wrote: On Thursday 07 April 2011 14:31:43 Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) LOL :) Seriously, if all the Open Source developers would make the software reliable enough to pass his testing methods, there wouldn't be any grounds for discussion :) It would just work, always -- Joost PS. I actually enjoy having people on the list with different levels and types of experience. I think I probably learn more stuff via questions from so-called beginners then from the old-timers ;) Actually, thinking about it. Dale, please do try what Neil suggested. Preferably also document what you do so we have a few test cases :) -- Joost I did this many years ago. When I built my very first rig, I installed Mandriva. Don't shoot me, I hadn't heard of Gentoo yet. I only knew about Redhat and Mandriva at the time. Anyway, I had one heck of a time installing the nvidia drivers. Lots of people had issues where their GUI wouldn't come back up when they installed the drivers. So, since I was a fool at the time, I made notes and such as to how I did mine. When it worked, I did a howto on it from a fools point of view. I put it on about three different sites. LQ, JL and one other one. It had a HUGE amount of views. If followed, it worked. I think me explaining from a beginners perspective helped a lot of people, plus I tried to keep it simple, like me. lol I think some of the reason I haven't grasped LVM is that it is somewhat complicated and it is explained by folks that know the nuts and bolts of it. It's like explaining Gentoo Linux to a windoze user who has never seen Linux or even knows what a kernel is. I'm still looking up howtos in hope of having a light bulb moment. I'll have one, it's just a matter of when. Alex, I saw your post. I read it a couple times already and am trying to grasp it before replying. It has a lot of good info. May take me a bit. Dale :-) :-)
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 06:52:26 BRM wrote: - Original Message From: Joost Roeleveld jo...@antarean.org On Thursday 07 April 2011 06:20:55 BRM wrote: - Original Message From: Neil Bothwick n...@digimed.co.uk On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. Makes perfect sense to me as well. Having installed LVM - and then removed it due to issues; namely, the fact that one of the hard drives died taking out the whole LVM group, leaving the OS unbootable, and not easily fixable. There was a thread on that (started by me) a while back (over a year). So, perhaps if I had a RAID to underly so I could mirror drives under LVM for recovery I'd move to it again. But otherwise it is just a PITA waiting to happen. Ben Unfortunately, any method that spreads a filesystem over multiple disks can be affected if one of those disks dies unless there is some mechanism in place that can handle the loss of a disk. For that, RAID (with the exception of striping, eg. RAID-0) provides that. Just out of curiousity, as I never had the need to look into this, I think that, in theory, it should be possible to recover data from LVs that were not using the failed drive. Is this assumption correct or wrong? If you have the LV configuration information, then yes. Since I managed to find the configuration information, I was able to remove the affected PVs from the VG, and get it back up. I might still have it running, but I'll back it out on the next rebuild - or if I have a drive large enough to do so with in the future. I was wanting to use LVM as a bit of a software RAID, but never quite got that far in the configuration before it failed. It does do a good job at what it's designed for, but I would not trust the OS to it either since the LVM configuration is very important to keep around. If not, good luck as far as I can tell. Ben LVM isn't actually RAID. Not in the sense that one gets redundancy. If you consider it to be a flexible partitioning method, that can span multiple disks, then yes. But when spanning multiple disks, it will simply act like JBOD or RAID0. Neither protects someone from a single disk failure. On critical systems, I tend to use: DISK - RAID - LVM - Filesystem The disks are as reliable as Google says they are. They fail or they don't. RAID protects against single disk-failure LVM makes the partitioning flexible Filesystems are picked depending on what I use the partition for -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 08:57:40 Dale wrote: Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) Joost, I see your point. This is my life saying. If it wasn't for bad luck, I wouldn't have any luck at all. I hope for the best but expect the worst. You should see my dining room. Full of food stuff just in case. After my last visit to the grocery store, I'm thinking I may not have enough yet. o_O I also have a generator and some gas stored too. I also have a big garden to grow food as well. I may be disabled but I ain't stupid. I just try to keep the bad things that can happen in the back of my mind and keep a plan going, just in case it does hit the fan. The Internet is a mixed blessing. We only see what people type. But have difficulty understanding their personal situation because we don't see it. Up untill the point you mentioned you're disabled, I was like Hmm... I know a few people like that :) I would call that self-sufficient and quite clever. I would like to be able to move somewhere where I could just enjoy life and life of some piece of land. I would not consider you stupid, you've shown, at least in my opinion, that you're not :) I'm sort of wanting to use this as a learning experience. If I can get things set up, working and understand what the heck things do, then I may try some more stuff. Right now, my light bulb is pretty dim on LVM. I don't understand how it works and what the heck those commands do. I'll have my light bulb moment eventually. Since I don't have the new drive ordered yet, I got time to read, listen and try to grasp it all. The beginning of wisdom is admitting you don't have it ;) Just a old dog trying to learn new tricks. lol I'm lousy at training dogs (or other animals), but lets see if I can make LVM, or at least the way I use it, a bit clearer. If anything isn't clear, please ask. We've already discussed the benefits of using it in a previous thread. So I'll just skip those for now. With LVM, you end up with 1 or more VGs (Volume Group) Each VG consists of 1 or more PV (Physical Volume) Each VG can contain 1 or more LV (Logical Volume) In simple graphic: PV - VG - LV A PV is either an entire physical disk or a partition on a physical disk. This is why they're called Physical Volume A VG is a collection of Physical Volumes. The size of this depends equals the total size of all the PVs in this group. An LV is a partition on this Volume Group. Now, here comes the nice part. It is possible to extend a VG and LV. A VG is extended by adding a PV. It can also be reduced in size by removing a PV. NOTE: when removing a PV, ensure it is not used. (Tools exist for this) An LV can be extended as long as the VG has room for this. No movement of LVs is necessary, just like files on a filesystem, they get spread over available space. NOTE: Yes, this does lead to fragmentation (Tools exist to assist in defragmenting LVM) You can also reduce the size of an LV. (Again, make sure reducing the LV in size does not lead to loss of data) On top of an LV, any filesystem (Ext2/3/4, Reiserfs, XFS, JFS,) can be placed. Once an LV is created, the filesystem tools can simply access it just like any other block device (eg. physical disk) When selecting a filesystem to put on top of an LV, do check wether or not it at least supports increasing the size after creation. Most filesystems in use do support this even while the filesystem is mounted. Reducing the size of the filesystem is, in my use, less common. And I tend to simply copy data to a temporary location when I do need to reduce the size. I hope the above makes it a bit clearer on how it works. The actual commands for creating and managing an LVM-system, I'll leave for another time if and when they are needed. -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 09:11:35 Dale wrote: Joost Roeleveld wrote: On Thursday 07 April 2011 15:41:00 Joost Roeleveld wrote: On Thursday 07 April 2011 14:31:43 Neil Bothwick wrote: On Thu, 07 Apr 2011 15:21:33 +0200, Joost Roeleveld wrote: I think Dale will probably succeed in breaking it :) Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) But not on any project you wanted to finish on time ;-) LOL :) Seriously, if all the Open Source developers would make the software reliable enough to pass his testing methods, there wouldn't be any grounds for discussion :) It would just work, always -- Joost PS. I actually enjoy having people on the list with different levels and types of experience. I think I probably learn more stuff via questions from so-called beginners then from the old-timers ;) Actually, thinking about it. Dale, please do try what Neil suggested. Preferably also document what you do so we have a few test cases :) -- Joost I did this many years ago. When I built my very first rig, I installed Mandriva. Don't shoot me, Why would I? :) I first played with Linux in 1997. First distro I tried was slackware and then Redhat. When redhat started moving more towards Gnome, and I was hit by rpm- dependencies once too many, I started looking. It was then that I noticed Gentoo and after a bit of playing with it, moved to Gentoo fully. If, at that time, Ubuntu had been around, I might have missed Gentoo alltogether. I hadn't heard of Gentoo yet. I only knew about Redhat and Mandriva at the time. Anyway, I had one heck of a time installing the nvidia drivers. Lots of people had issues where their GUI wouldn't come back up when they installed the drivers. So, since I was a fool at the time, I made notes and such as to how I did mine. When it worked, I did a howto on it from a fools point of view. I put it on about three different sites. LQ, JL and one other one. It had a HUGE amount of views. If followed, it worked. I think me explaining from a beginners perspective helped a lot of people, plus I tried to keep it simple, like me. lol Simple-worded howtos tend to be the best. Unfortunately, people who really know and understand the subject tend to become unable to properly word it all in such a way that mere mortals understand it as well. I think some of the reason I haven't grasped LVM is that it is somewhat complicated and it is explained by folks that know the nuts and bolts of it. It's like explaining Gentoo Linux to a windoze user who has never seen Linux or even knows what a kernel is. Hmm... I've given up on those conversations ;) I'll simply wait till people get curious about what I'm doing with computers and why I never complain about them crashing all the time ;) I'm still looking up howtos in hope of having a light bulb moment. I'll have one, it's just a matter of when. Well... I'm confident that light bulb can be lit... -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
- Original Message From: Joost Roeleveld jo...@antarean.org On Thursday 07 April 2011 06:52:26 BRM wrote: - Original Message From: Joost Roeleveld jo...@antarean.org On Thursday 07 April 2011 06:20:55 BRM wrote: - Original Message From: Neil Bothwick n...@digimed.co.uk On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. Makes perfect sense to me as well. Having installed LVM - and then removed it due to issues; namely, the fact that one of the hard drives died taking out the whole LVM group, leaving the OS unbootable, and not easily fixable. There was a thread on that (started by me) a while back (over a year). So, perhaps if I had a RAID to underly so I could mirror drives under LVM for recovery I'd move to it again. But otherwise it is just a PITA waiting to happen. Ben Unfortunately, any method that spreads a filesystem over multiple disks can be affected if one of those disks dies unless there is some mechanism in place that can handle the loss of a disk. For that, RAID (with the exception of striping, eg. RAID-0) provides that. Just out of curiousity, as I never had the need to look into this, I think that, in theory, it should be possible to recover data from LVs that were not using the failed drive. Is this assumption correct or wrong? If you have the LV configuration information, then yes. Since I managed to find the configuration information, I was able to remove the affected PVs from the VG, and get it back up. I might still have it running, but I'll back it out on the next rebuild - or if I have a drive large enough to do so with in the future. I was wanting to use LVM as a bit of a software RAID, but never quite got that far in the configuration before it failed. It does do a good job at what it's designed for, but I would not trust the OS to it either since the LVM configuration is very important to keep around. If not, good luck as far as I can tell. Ben LVM isn't actually RAID. Not in the sense that one gets redundancy. If you consider it to be a flexible partitioning method, that can span multiple disks, then yes. But when spanning multiple disks, it will simply act like JBOD or RAID0. Neither protects someone from a single disk failure. On critical systems, I tend to use: DISK - RAID - LVM - Filesystem The disks are as reliable as Google says they are. They fail or they don't. RAID protects against single disk-failure LVM makes the partitioning flexible Filesystems are picked depending on what I use the partition for The attraction to LVM for me was that from what I could tell it supported and implemented a software-RAID so that I could help protect from disk-failure. I never got around to configuring that side of it, but that was my goal. Or are you saying I was misunderstanding and LVM _does not_ contain software-RAID support? Ben
Re: [gentoo-user] LVM for data drives but not the OS
On Thu, April 7, 2011 7:31 pm, BRM wrote: - Original Message From: Joost Roeleveld jo...@antarean.org On Thursday 07 April 2011 06:52:26 BRM wrote: - Original Message From: Joost Roeleveld jo...@antarean.org On Thursday 07 April 2011 06:20:55 BRM wrote: - Original Message From: Neil Bothwick n...@digimed.co.uk On Thu, 07 Apr 2011 05:22:41 -0500, Dale wrote: I want to do it this way because I don't trust LVM enough to put my OS on. Just my personal opinion on LVM. This doesn't make sense. Your OS can be reinstalled in an hour or two, your photos etc. are irreplaceable. Makes perfect sense to me as well. Having installed LVM - and then removed it due to issues; namely, the fact that one of the hard drives died taking out the whole LVM group, leaving the OS unbootable, and not easily fixable. There was a thread on that (started by me) a while back (over a year). So, perhaps if I had a RAID to underly so I could mirror drives under LVM for recovery I'd move to it again. But otherwise it is just a PITA waiting to happen. Ben Unfortunately, any method that spreads a filesystem over multiple disks can be affected if one of those disks dies unless there is some mechanism in place that can handle the loss of a disk. For that, RAID (with the exception of striping, eg. RAID-0) provides that. Just out of curiousity, as I never had the need to look into this, I think that, in theory, it should be possible to recover data from LVs that were not using the failed drive. Is this assumption correct or wrong? If you have the LV configuration information, then yes. Since I managed to find the configuration information, I was able to remove the affected PVs from the VG, and get it back up. I might still have it running, but I'll back it out on the next rebuild - or if I have a drive large enough to do so with in the future. I was wanting to use LVM as a bit of a software RAID, but never quite got that far in the configuration before it failed. It does do a good job at what it's designed for, but I would not trust the OS to it either since the LVM configuration is very important to keep around. If not, good luck as far as I can tell. Ben LVM isn't actually RAID. Not in the sense that one gets redundancy. If you consider it to be a flexible partitioning method, that can span multiple disks, then yes. But when spanning multiple disks, it will simply act like JBOD or RAID0. Neither protects someone from a single disk failure. On critical systems, I tend to use: DISK - RAID - LVM - Filesystem The disks are as reliable as Google says they are. They fail or they don't. RAID protects against single disk-failure LVM makes the partitioning flexible Filesystems are picked depending on what I use the partition for The attraction to LVM for me was that from what I could tell it supported and implemented a software-RAID so that I could help protect from disk-failure. I never got around to configuring that side of it, but that was my goal. Or are you saying I was misunderstanding and LVM _does not_ contain software-RAID support? Unless I am mistaken, LVM does not provide redundancy. It provides disk-spanning (JBOD) and basic striping (RAID-0). For redundancy, I would use a proper RAID (either hardware or software). On top of this, you can then decide to have a single filesystem, LVM or even partition this. I think the confusion might have come from the fact that both LVM and Linux Software Raid use the Device Mapper interface in the kernel config and they are in the same part. Also, part of the problem is that striping is also called RAID-0. That, to people who don't fully understand it yet, makes it sound like it is a RAID. It actually isn't as it doesn't provide any redundancy. I do hope you didn't loose too much important data when you had this issue. -- Joost
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 14:21:33 Joost Roeleveld wrote: Dale, this comment isn't meant as an insult. I honestly think you would be perfect for some QA or Testing job :) pedant QA != Testing QA is the features of a company organisation that give it the characteristic of not introducing faults. /pedant -- Rgds Peter
Re: [gentoo-user] LVM for data drives but not the OS
- Original Message From: J. Roeleveld jo...@antarean.org On Thu, April 7, 2011 7:31 pm, BRM wrote: The attraction to LVM for me was that from what I could tell it supported and implemented a software-RAID so that I could help protect from disk-failure. I never got around to configuring that side of it, but that was my goal. Or are you saying I was misunderstanding and LVM _does not_ contain software-RAID support? Unless I am mistaken, LVM does not provide redundancy. It provides disk-spanning (JBOD) and basic striping (RAID-0). For redundancy, I would use a proper RAID (either hardware or software). On top of this, you can then decide to have a single filesystem, LVM or even partition this. I think the confusion might have come from the fact that both LVM and Linux Software Raid use the Device Mapper interface in the kernel config and they are in the same part. Also, part of the problem is that striping is also called RAID-0. That, to people who don't fully understand it yet, makes it sound like it is a RAID. It actually isn't as it doesn't provide any redundancy. I think the issue comes from the fact that LVM2 supports Mirroring without an underlying RAID controller: http://tinyurl.com/3woh2d7 http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29 http://www.gossamer-threads.com/lists/gentoo/performance/59776 Which would be a redundancy. I do hope you didn't loose too much important data when you had this issue. No, I didn't loose any important data (fortunately). If I did, I would have paid for the drive to be recovered; it was mostly portage, var/tmp, some extra sandbox stuff, kind of things. Ben
Re: [gentoo-user] LVM for data drives but not the OS
On Thursday 07 April 2011 11:35:42 BRM wrote: - Original Message From: J. Roeleveld jo...@antarean.org I think the issue comes from the fact that LVM2 supports Mirroring without an underlying RAID controller: http://tinyurl.com/3woh2d7 http://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29 http://www.gossamer-threads.com/lists/gentoo/performance/59776 Which would be a redundancy. Ok, I wasn't aware of that bit. From the first hit in the google-list, I do think that LVM-mirror isn't really ready. Especially as the read-performance is less then using software raid. I don't find mdadm difficult to use though. It's a vast improvement over the old raidtools. I do hope you didn't loose too much important data when you had this issue. No, I didn't loose any important data (fortunately). If I did, I would have paid for the drive to be recovered; it was mostly portage, var/tmp, some extra sandbox stuff, kind of things. Glad to hear that. -- Joost