Malaysia organizations don't realize severity of cyberattacks http://t.co/PUCv68Rd
17 minutes ago by ALLsecuritySoft on twitter
ZDNet is available in the following editions:
Scott Reeves shows how to use two handy commands to back up and restore volume group metadata on LVM.
Two of the useful commands provided as part of Logical Volume Manager (LVM) is vgcfgbackup and vgcfgrestore. This command allows you to back up the metadata of a volume group.
This may not seem like much, but there are a few scenarios where having a backup of the volume group metadata can save some time and maybe sanity as well. A cautionary note: vgcfgbackup backs up the volume group metadata only. It does not back up the data on the logical volumes.
Running vgcfgbackup is straightforward. The option -f specifies the file to use, otherwise, the default location is in /etc/lvm/backup. It is best to back the directory /etc/lvm up to a location that is backed up to tape or to another server. If no volume group is specified, then vgcfgbackup will back up all volume groups on the system. The command string to use is vgcfgbackup -f <filename> <volume group name>. An example is as follows.
root@gudaring:/etc/lvm# vgcfgbackup -f /tmp/vg01 vg01
 Volume group "vg01" successfully backed up.
root@gudaring:/etc/lvm#
The output of the file generated in /etc/lvm/backup is shown below.
vg01 {
     id = "K6a5ta-LVA1-PEx0-Dvic-3gTt-ZdTV-Rq6oJZ"
     seqno = 42
     status = ["RESIZEABLE", "READ", "WRITE"]
     flags = []
     extent_size = 8192           # 4 Megabytes
     max_lv = 0
     max_pv = 0
     physical_volumes {
           pv0 {
                 id = "UX9v6y-kF2k-3O98-7O1j-7AKd-4dAS-9KFHyZ"
                 device = "/dev/sda6"   # Hint only
                 status = ["ALLOCATABLE"]
                 flags = []
                 dev_size = 29216768    # 13.9316 Gigabytes
                 pe_start = 384
                 pe_count = 3566  # 13.9297 Gigabytes
           }
     }
     logical_volumes {
           home {
                 id = "q9sZOd-O1N2-xn0W-8EVY-13L2-ln7d-UhcB8f"
                 status = ["READ", "WRITE", "VISIBLE"]
                 flags = []
                 segment_count = 1
                 segment1 {
                       start_extent = 0
                       extent_count = 2560    # 10 Gigabytes
                       type = "striped"
                       stripe_count = 1 # linear
                       stripes = [
                             "pv0", 0
                       ]
                 }
           }
           lvol0 {
                 id = "JPavYt-GmNX-Ve8b-v6NW-xePP-25iB-QdlOOX"
                 status = ["READ", "WRITE", "VISIBLE"]
                 flags = []
                 segment_count = 1
                 segment1 {
                       start_extent = 0
                       extent_count = 512     # 2 Gigabytes
                       type = "striped"
                       stripe_count = 1 # linear
                       stripes = [
                             "pv0", 2560
                       ]
                 }
           }
     }
}
There are a few sections here. The volume group section in this case contains the physical volume information and the logical volume information. Further information can be noted. The extent size for the volume group is shown. In the physical_volumes section the size of the device is shown. Under the logical_volumes section, information about the logical volumes in the volume group are shown. This includes which physical volumes are used by the logical volumes.
The practical step is using vgcfgrestore to recover the metadata. The options used are similar to those used for vgcfgbackup. The -f option can be used to specify a filename. One of the nice aspects of vgcfgrestore is that it can recover up to ten iterations back. The /etc/lvm/archive directory has the last ten configuration files.
To list which point you want to restore from, you can run vgcfgrestore with the -l option and the volume group. In this case, the command string used is vgcfgrestore -l vg01. This will list the last 10 restore points. The output is similar to below (only the last couple of lines are shown, for brevity).
File:Â Â Â Â Â Â /etc/lvm/archive/vg01_00043.vg
 VG name:      vg01
 Description:   Created *before* executing 'vgscan'
 Backup Time:   Mon Nov 21 22:25:23 2011
File:Â Â Â Â Â Â /etc/lvm/archive/vg01_00044.vg
 VG name:      vg01
 Description:   Created *before* executing 'vgscan'
 Backup Time:   Mon Nov 21 22:25:23 2011
File:Â Â Â Â Â Â /etc/lvm/backup/vg01
 VG name:      vg01
 Description:   Created *after* executing 'vgscan'
 Backup Time:   Mon Nov 21 22:25:23 2011
The output lists the full pathname of each backup file, along with a date stamp. Once you know which file you need to roll back to it is a matter of running the command string vgcfgrestore -f <filename>. For this example, we use the last filename.
root@gudaring:/etc/lvm# vgcfgrestore -f /etc/lvm/backup/vg01 vg01
 Restored volume group vg01
root@gudaring:/etc/lvm#
The output indicates successful rollback.
The commands vgcfgbackup and vgcfgrestore are useful commands to use when you need to restore volume group metadata, as you may want to do if you have a failed disk in an array group, or a similar scenario. You can also use vgcfgrestore to restore an earlier version of the metadata.
Scott Reeves has been working in IT for 15 years, mostly in System Administration roles.
Malaysia organizations don't realize severity of cyberattacks http://t.co/PUCv68Rd
17 minutes ago by ALLsecuritySoft on twitterNews: Radio Costa Rica by EnjoyIT 1.0: Radio Costa Rica allows you to listen to a great var... http://t.co/BLzVT5As http://t.co/1Dhcy6ki
17 minutes ago by CostaRica_VIP on twitterThe key for mobile operators is identifying the applications that are popular with subscribers on their network. They can then work partn...
1 hour ago by camcullen on Experience trumps content in apps monetizationExperience trumps content in apps monetization | ZDNet http://t.co/gBXcjbGd
2 hours ago by DennisOosterman on twitterExperience trumps content in apps monetization - ZDNet Asia News: "What we are doing currently is not to monetiz... http://t.co/S2EZtd8m
2 hours ago by kennyfabre1 on twitterMalaysia organizations don't realize severity of cyberattacks: "Minister Maximus Johnity Ongkili said at the Sec... http://t.co/bgVlOBvx
4 hours ago by Bug2Hunt on twitter#security Malaysia organizations don't realize severity of cyberattacks: "Minister Maximus Johnity Ongkili said ... http://t.co/hkFb4zrI
4 hours ago by Wiredsec on twitterMalaysia organizations don't realize severity of cyberattacks http://t.co/EEEmRM3j via @zdnetasia
4 hours ago by RedDragon1949 on twitterMalaysia organizations don't realize severity of cyberattacks - ZDNet Asia News http://t.co/YpNMYgb5
4 hours ago by RedDragon1949 on twitterMalaysia organizations don't realize severity of cyberattacks http://t.co/FFems54Q
4 hours ago by mytech_pro on twitterChina solar cell makers seek Taiwan partnerships http://t.co/p5Hh7kJD
5 hours ago by Export2China on twitterBig data acquisitions pave way to fast, effective innovation http://t.co/hdiEfBsz via @zdnetasia
5 hours ago by jowoodley on twitterIntegration, focused investments to propel Windows Phone: By Kevin Kwang , ZDNet Asia on May 23, 2012 (2 hours a... http://t.co/E7tsZbHJ
7 hours ago by Easyforexdotcom on twitterIntegration, focused investments to propel Windows Phone http://t.co/u9TqjQ8C
7 hours ago by ashvin_9 on twitterAsiaClassifiedToday. Integration, focused investments to propel Windows Phone - ZDNet Asia: S... http://t.co/47tdjZyG #asia #google #biz
8 hours ago by ChemarieMonica on twitterSo much as we know , MTK6575 extremely integrated frequency1GHz ARM Cortex-A9 processor, the superiority of 3G / HSPA Modem, and help the...
1 day ago by y15822137359 on 5 SaaS adoption speed bumps to avoidI reckon your view: "CRM is strategy, not software", if a company replicating the approach uses in ERP implementation into CRM, what they...
2 days ago by wykoong on Gartner: Mobile CRM gives better ROI than socialThis video will teach you about the Excel fill handle but also provide you with a workook to download... http://www.youtube.com/watch?v=...
3 days ago by TradeBrother on A quick fill handle trick for Microsoft Excelwaiting...
5 days ago by eapete on What should count in a company's market value?Boy, you've opened a can of worms now.
Wait for the rants & raves.
I was puzzling before this whether to replicate the success formula we executed for a financial institute, and come out with a standard s...
5 days ago by wykoong on Drop the egos, copy ideas, then innovateThreats and malware know no boundaries. Neither should your web security. See how far Blue Coat Unified Web Security goes to protect your network.
Echelon 2012 - The Awesomer Tech Event in Asia
Echelon 2012 – SEA’s longest running tech startup event goes Awesomer. Catch 50 of Asia’s most promising startups & over 40 international speakers on June 11-12.
Startup Asia Jakarta showcases new product-ready tech startups. Plus: hackathon, exhibition, and speakers. Use promo code CBSi50 for 50% discount.
ZDNet Asia Intelligent Singapore video series
Featuring inteviews with CXOs who define "intelligence" in their markets and reveal how their companies drive business efficiencies through ICT.