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 root 4400 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 > Format lvm2 > Metadata Areas 1 > Metadata Sequence No 2 > VG Access read/write > VG Status resizable > MAX LV 0 > Cur LV 1 > Open LV 0 > Max PV 0 > Cur PV 1 > Act PV 1 > 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 Name sdb-vg > LV UUID mixhOb-La6D-BwG4-Uz3l-P0ci-oGg5-YI3mN8 > LV Write Access read/write > LV Status available > # open 0 > LV Size 50.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