On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
The security issue is trivially dealt with. Install Webmin and configure it to listen on 127.0.0.1 using its standard port TCP10000. Install Firefox on the same host and then run firefox from an 'ssh -Y' session using the --noremote option. If you are totally paranoid then firewall TCP10000 as well, configure Webmin to use https only, and then only start the webmin service when you are performing maintenance.
There are less draconian measures that are in my opinion equally secure from a practical standpoint but I am sure that you can figure those out on your own.
The transparency issue is really unanswerable. There exists a school of thought that if you are going to administer a Linux system (or OS of the proponent's choice) then you should learn the command syntax of every command that you are called upon to use. This is the one-and-only path to enlightenment. Like upholding motherhood and promoting the wholesomeness of apple-pie this sort of moralizing really brooks no answer. You can guess my opinion on that line of puritanism.
As you have painfully discovered, infrequently used utilities and commands are difficult to deal with. The process of learning, or relearning, the correct arcana is particularly noisome given the notorious inconsistency of syntaxes across different utilities and the spotty coverage of up-to-date documentation. Google can be a dangerous guide given the wide variation of practice across differing flavours of *nix and the widespread aversion to providing dates on writings. In consequence I consign transparency arguments and their proponents to the religious fanatic file. Nothing personal but there is no point in arguing belief systems.
If you want to get infrequently performed sysadmin tasks done reliably and with a minimum of fuss use something like Webmin and get on with the rest of your life.
On 06/25/2015 11:03 AM, James B. Byrne wrote:
On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
The security issue is trivially dealt with. Install Webmin and configure it to listen on 127.0.0.1 using its standard port TCP10000. Install Firefox on the same host and then run firefox from an 'ssh -Y' session using the --noremote option. If you are totally paranoid then firewall TCP10000 as well, configure Webmin to use https only, and then only start the webmin service when you are performing maintenance.
There are less draconian measures that are in my opinion equally secure from a practical standpoint but I am sure that you can figure those out on your own.
The transparency issue is really unanswerable. There exists a school of thought that if you are going to administer a Linux system (or OS of the proponent's choice) then you should learn the command syntax of every command that you are called upon to use. This is the one-and-only path to enlightenment. Like upholding motherhood and promoting the wholesomeness of apple-pie this sort of moralizing really brooks no answer. You can guess my opinion on that line of puritanism.
As you have painfully discovered, infrequently used utilities and commands are difficult to deal with. The process of learning, or relearning, the correct arcana is particularly noisome given the notorious inconsistency of syntaxes across different utilities and the spotty coverage of up-to-date documentation. Google can be a dangerous guide given the wide variation of practice across differing flavours of *nix and the widespread aversion to providing dates on writings. In consequence I consign transparency arguments and their proponents to the religious fanatic file. Nothing personal but there is no point in arguing belief systems.
If you want to get infrequently performed sysadmin tasks done reliably and with a minimum of fuss use something like Webmin and get on with the rest of your life.
That is fine until suddenly you find yourself without your crutch.
James B. Byrne wrote:
On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
<snip> Back in '06 or '07, I installed webmin on the RHEL systems I was working on. It was a tremendous help installing and configuring openLDAP, whose tools, at least through '08, were very definitely *NOT* ready for prime time. Webmin let me beat it into submission.
mark
At Thu, 25 Jun 2015 11:03:18 -0400 CentOS mailing list centos@centos.org wrote:
On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
The security issue is trivially dealt with. Install Webmin and configure it to listen on 127.0.0.1 using its standard port TCP10000. Install Firefox on the same host and then run firefox from an 'ssh -Y' session using the --noremote option. If you are totally paranoid then firewall TCP10000 as well, configure Webmin to use https only, and then only start the webmin service when you are performing maintenance.
There are less draconian measures that are in my opinion equally secure from a practical standpoint but I am sure that you can figure those out on your own.
The transparency issue is really unanswerable. There exists a school of thought that if you are going to administer a Linux system (or OS of the proponent's choice) then you should learn the command syntax of every command that you are called upon to use. This is the one-and-only path to enlightenment. Like upholding motherhood and promoting the wholesomeness of apple-pie this sort of moralizing really brooks no answer. You can guess my opinion on that line of puritanism.
HA! You only really need to learn *one* command: the man command. The man provides 'enlightenment' for all other commands:
man vgdisplay man lvdisplay man lvcreate man lvextend man lvresize man lvreduce man lvremove man e2fsck man resize2fs
These are the only LVM commands I use regularly (yes there a a pile more, but most are rarely used and a handful only used in startup/shutdown scripts or when rescuing) and I often end up use the man command to refresh my memory of the command options.
As you have painfully discovered, infrequently used utilities and commands are difficult to deal with. The process of learning, or relearning, the correct arcana is particularly noisome given the notorious inconsistency of syntaxes across different utilities and the spotty coverage of up-to-date documentation. Google can be a dangerous guide given the wide variation of practice across differing flavours of *nix and the widespread aversion to providing dates on writings. In consequence I consign transparency arguments and their proponents to the religious fanatic file. Nothing personal but there is no point in arguing belief systems.
Right, expecting a *web search* to give *correct* command documentation is problematical. Using the local system man pages often works better, since the man pages installed with the installed utilities will cover the *installed* version and not the version that might be installed on a *different* distro, etc.
If you want to get infrequently performed sysadmin tasks done reliably and with a minimum of fuss use something like Webmin and get on with the rest of your life.
On Thu, 2015-06-25 at 11:50 -0400, Robert Heller wrote:
At Thu, 25 Jun 2015 11:03:18 -0400 CentOS mailing list < centos@centos.org> wrote:HA! You only really need to learn *one* command: the man command. The man provides 'enlightenment' for all other commands: man vgdisplay man lvdisplay man lvcreate man lvextend man lvresize man lvreduce man lvremove man e2fsck man resize2fs
These are the only LVM commands I use regularly (yes there a a pile more, but most are rarely used and a handful only used in startup/shutdown scripts or when rescuing)
There may be numerous commands... but isn't it pretty obvious what each one of them do? Often lv<tab><tab> is plenty of hinting to get to the right thing. And each of the commands uses the same syntax for options.
spotty coverage of up-to-date documentation. Google can be a dangerous guide given the wide variation of practice across differing..
Yes, exactly. DO NOT USE GOOGLE - USE THE &^@&$^* DOCUMENTATION!
Right, expecting a *web search* to give *correct* command documentation is problematical. Using the local system man pages often works better, since the man pages installed with the installed utilities will cover the *installed* version and not the version that might be installed on a *different*
+1
If you want to get infrequently performed sysadmin tasks done reliably and with a minimum of fuss use something like Webmin and get on with the rest of your life.
And take notes! You are sitting at a computer after all.
-- Adam Tauno Williams mailto:awilliam@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA
Once upon a time, Adam Tauno Williams awilliam@whitemice.org said:
There may be numerous commands... but isn't it pretty obvious what each one of them do? Often lv<tab><tab> is plenty of hinting to get to the right thing. And each of the commands uses the same syntax for options.
The key thing is to know the LVM architecture. Once you have a basic grasp of that, the rest is usually pretty easy to figure out.
At the bottom, you have some block device. This is most often a standard disk partition (e.g. /dev/sda2); in some cases, it may be a whole disk (e.g. /dev/sdb).
The first layer of LVM is the physical volume (PV). This is basically "importing" a block device into the LVM stack; the PV uses the name of the underlying block device (so still /dev/sda2 or /dev/sdb).
You put one or more PVs into a volume group (VG), and give it a name (e.g. "vg_myhost", but there's nothing special about putting "vg_" at the front, that's just something some people do). This is where the functionality and flexibility starts to come into play. A VG can have multiple PVs and spread data across them, do RAID, move blocks from one PV to another, etc.
You then divide up a VG into logical volumes (LVs), also giving them names (e.g. "lv_root"; again, "lv_" is just a common naming scheme, not a requirement). This is where you can do snapshots, thin provisioning, etc.
At that point, you'll have a new block device, like /dev/vg_myhost/lv_root, and you can make filesystems, assign to VMs, set up swap, etc.
The commands at each layer of LVM follow a similar scheme, so there's pvcreate, vgcreate, and lvcreate for example. The arguments also follow a common scheme. For the regular admin stuff, you can typically figure out with a "--help" what you need (using the man page as a refresher or extended reference).
It's basically a way to assemble one arbitrary set of block devices and then divide them into another arbitrary set of block devices, but now separate from the underlying physical structure.
Regular partitions have various limitations (one big one on Linux being that modifying the partition table of a disk with in-use partitions is a PITA and most often requires a reboot), and LVM abstracts away some of them. LVM is a set of commands and modules layered on top of the Linux kernel's "device mapper" system. DM is just a way to map block A of virtual device X to block B of physical device Y; at one point, there was some discussion of kicking partition handling out of the kernel and just going with DM for everything (requires some form of init ramdisk though which complicates some setups).
On 06/25/2015 01:20 PM, Chris Adams wrote:
...It's basically a way to assemble one arbitrary set of block devices and then divide them into another arbitrary set of block devices, but now separate from the underlying physical structure.
Regular partitions have various limitations (one big one on Linux being that modifying the partition table of a disk with in-use partitions is a PITA and most often requires a reboot), and LVM abstracts away some of them. ....
I'll give an example. I have a backup server, and for various reasons (hardlinks primarily) all the data needs to be in a single filesystem. However, this is running on an older VMware ESX server, and those have a 2TB LUN size limit. So, even though my EMC Clariion arrays can deal with 10TB LUNs without issue, the VMware ESX and all of its guests cannot. So, I have a lot of RDMs for the guests. The backup server's LVM looks like this: [root@backup-rdc ~]# pvscan PV /dev/sdd1 VG vg_opt lvm2 [1.95 TB / 0 free] PV /dev/sde1 VG vg_opt lvm2 [1.95 TB / 0 free] PV /dev/sdf1 VG vg_opt lvm2 [1.95 TB / 0 free] PV /dev/sda2 VG VolGroup00 lvm2 [39.88 GB / 0 free] PV /dev/sdg1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdh1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdi1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdj1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdk1 VG bak-rdc lvm2 [1.47 TB / 0 free] PV /dev/sdl1 VG bak-rdc lvm2 [1.47 TB / 0 free] PV /dev/sdm1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdn1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdo1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdp1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdq1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdr1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdb1 VG bak-rdc lvm2 [1.95 TB / 0 free] PV /dev/sdc1 VG bak-rdc lvm2 [1.95 TB / 0 free] Total: 18 [32.27 TB] / in use: 18 [32.27 TB] / in no VG: 0 [0 ] [root@backup-rdc ~]# lvscan ACTIVE '/dev/vg_opt/lv_backups' [5.86 TB] inherit ACTIVE '/dev/VolGroup00/LogVol00' [37.91 GB] inherit ACTIVE '/dev/VolGroup00/LogVol01' [1.97 GB] inherit ACTIVE '/dev/bak-rdc/cx3-80' [26.37 TB] inherit [root@backup-rdc ~]#
It's just beautiful the way I can take another 1.95 TB LUN, add it to the volume group, expand the logical volume, and then expand the underlying filesystem (XFS) and just dynamically add storage. Being on an EMC Clariion foundation, I don't have to worry about the RAID, either, as the RAID6 and hotsparing is done by the array. SAN and LVM were made for each other. And, if and when I either migrate the guest over to physical hardware on the same SAN or migrate to some other virtualization, I can use LVM's tools to migrate from all those 1.95 and 1.47 TB LUNs over to a few larger LUNs and blow away the smaller LUNs while the system is online. And the EMC Clariion FLARE OE software allows me great flexibility in moving LUNs around in the array for performance and other reasons.
Robert Heller wrote:
At Thu, 25 Jun 2015 11:03:18 -0400 CentOS mailing list centos@centos.org wrote:
On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
<snip>
HA! You only really need to learn *one* command: the man command. The man provides 'enlightenment' for all other commands:
man vgdisplay man lvdisplay man lvcreate man lvextend man lvresize man lvreduce man lvremove man e2fsck man resize2fs
<snip>
You missed one: man man.
mark
On Thu, June 25, 2015 12:18 pm, m.roth@5-cent.us wrote:
Robert Heller wrote:
At Thu, 25 Jun 2015 11:03:18 -0400 CentOS mailing list centos@centos.org wrote:
On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
<snip> > HA! You only really need to learn *one* command: the man command. The > man provides 'enlightenment' for all other commands: > > man vgdisplay > man lvdisplay > man lvcreate > man lvextend > man lvresize > man lvreduce > man lvremove > man e2fsck > man resize2fs <snip>
You missed one: man man.
Cool! this makes my day! It is just itching to add two more:
man info info man
Valeri
++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
At Thu, 25 Jun 2015 13:18:04 -0400 CentOS mailing list centos@centos.org wrote:
Robert Heller wrote:
At Thu, 25 Jun 2015 11:03:18 -0400 CentOS mailing list centos@centos.org wrote:
On Wed, June 24, 2015 16:11, Chuck Campbell wrote:
Is there an easy to follow "howto" for normal LVM administration tasks. I get tired of googling every-time I have to do something I don't remember how to do regarding LVM, so I usually just don't bother with it at all.
I believe it has some benefit for my use cases, but I've been reticent to use it, since the last time I got LVM problems, I lost everything on the volume, and had to restore from backups anyway. I suspect I shot myself in the foot, but I still don't know for sure.
At the risk of some ridicule I suggest that you look at installing Webmin. It is a web based system administration tool that I find invaluable. The two most common complaints I encounter when I discuss its merits are 'security' and 'transparency'.
<snip> > HA! You only really need to learn *one* command: the man command. The > man provides 'enlightenment' for all other commands: > > man vgdisplay > man lvdisplay > man lvcreate > man lvextend > man lvresize > man lvreduce > man lvremove > man e2fsck > man resize2fs <snip>
You missed one: man man.
It is 'presumed' that one has learned the man command itself and never ever need to do a 'man man' :-). From there all other knowledge flows...
mark
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 6/25/2015 8:50 AM, Robert Heller wrote:
man vgdisplay man lvdisplay man lvcreate man lvextend man lvresize man lvreduce man lvremove man e2fsck man resize2fs
man xfs_growfs
----- Original Message ----- | On 6/25/2015 8:50 AM, Robert Heller wrote: | > man vgdisplay | > man lvdisplay | > man lvcreate | > man lvextend | > man lvresize | > man lvreduce | > man lvremove | > man e2fsck | > man resize2fs | | man xfs_growfs
You forgot man "this opinion thread is getting really long"
John R Pierce wrote:
On 6/25/2015 11:12 AM, James A. Peltier wrote:
You forgot man "this opinion thread is getting really long"
No manual entry for this opinion thread is getting really long
That's obviously not the case: it's *all* manual entry of text.... <g>
mark