Howto: Using LVM to manage your disks
The NetBSD Project
Status: Closed
Time to complete: 120 hrs
Mentors: Radoslaw Kujawa, Julian Coleman, Julian Fagir
There is already a chapter about the logical volume manager in NetBSD: http://netbsd.org/docs/guide/en/chap-lvm.html
This task is about not having a whole chapter about it, but rather a small and comprehensive howto how you would manage logical volumes with NetBSD instead of reading through the whole chapter.
I would like to work on this task.
This task has been assigned to Eric Newberry. You have 120 hours to complete this task, good luck!
What format would I write this document in?
Markdown, HTML or plain text
Actually, plain text is the preferred choice. Markdown and HTML are acceptable.
Ok. Also, where can I obtain lvm2tools and libdevmapper? I can't find them with pkgsrc.
They are a part of base system since NetBSD 6.0, you don't need to install them from pkgsrc. See "man lvm".
The work on this task is ready to be reviewed.
Ok, thanks.
I've finished the HOWTO and have submited it.
I've read what you wrote and I think it's quite good. However, I have some suggestions:
- Add information on how to find the appropriarte device name to use as physical volume (how do I know that I should use wd1d or wd2d...?).
- Add an example of creating a file system on logical volume (it might not be obvious for a person reading how-to, after all, these kind of documents are for newbies moslty).
- Add info on how to mount this new filesystem automatically during system startup.
- What should the user do if he'll run out of filesystem space? Is it possible to resize the filesystem? How to do it?
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
How would I explain finding the device names? I'm not that familiar with the naming scheme on BSD.
You still have 3 days and 8 hours to become familiar ;-). Just explain what would you do to obtain the device name after fresh installation, or receiving preconfigured NetBSD box, or after connecting a new drive to the system. Think of typical use cases.
You can always get information about devices from kernel message buffer - see dmesg(8) command. If you don't have NetBSD installed, then try it in a virtual machine. Try to connect various types of drivers, see how they appear in the system.
The nice thing about NetBSD dmesg is that almost every device driver has a man page. So for example if you see "sd0" in dmesg, then just look up "man sd".
The work on this task is ready to be reviewed.
I believe I've completed the improvements listed.
However, as I said before, I'm not exactly that familiar with BSD, so it might still need some work. ;)
Looks even better than before, but still a few minor corrections are needed:
- Saying that device name is based on port number is not entirely true. I'd rather say that device names are assigned in order of detection. So it's possible to have sd0 on controller X, sd1 on controller Y, sd2 on controller X, etc. What you wrote about devices is generally okay, but I'm under impression that you think controller port numbers have some meaning here (they don't). In most cases if you have a single controller then indeed drives will be numbered sequentially, just because there will be single driver detecting disks and it will claim first free device name. To avoid confusion I'd just call wd0 "first SATA/IDE hard disk", wd1 "second SATA/IDE hard disk", and so on (not "hard disk on second port" - that might not be true).
- Also you didn't mention how did you learn which device names are used by which disks. Provide and example of dmesg command usage and what to look for in its output.
- Are you sure that last column in /etc/fstab should be "1" in this example? I assume that this logical volume is not your / filesystem.
- What command could you use to resize FFS file system after resizing logical volume?
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
The work on this task is ready to be reviewed.
Thanks, I'm closing this task.
Congratulations, this task has been completed successfully.