Operating System - HP-UX
1833568 Members
4271 Online
110061 Solutions
New Discussion

Safe to delete /etc/lvmconf/vg*conf.old files?

 
SOLVED
Go to solution
Ralph Grothe
Honored Contributor

Safe to delete /etc/lvmconf/vg*conf.old files?

Hi,

I am a bit tight with disk space in / on this box.
I looked for candidates of files which possibly could be removed and found quite a few lvmconf backup files in /etc/lvmconf which take up considerable amount of space.
I wonder if it was safe to remove those with the .old extensions.
If I look at what vgcfgrestore outputs if applied on those the only difference seems to be in the first line where the deviating name of the backup file with .old suffix appears.

[root@warnow(Z01):/etc/lvmconf]
# vgcfgrestore -l -f vgsapz01.conf.old|sed -n 2,\$p|cksum
1663276796 1135
[root@warnow(Z01):/etc/lvmconf]
# vgcfgrestore -l -f vgsapz01.conf|sed -n 2,\$p|cksum
1663276796 1135
Madness, thy name is system administration
8 REPLIES 8
Robert-Jan Goossens
Honored Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

Hi Ralph,

Why not link /etc/lvmconf to new filesystem inside vg00 (if you have enough space).

Regards,
Robert-Jan
Torsten.
Acclaimed Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

The *.conf.old files are just a backup of the backup. I think you can remove them if you are sure you won't need them (many changes in the past done?).

You may also save them anywhere else.

Anyway, normally you'll save a couple of kb only (unless you have very large LVM configs).

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Ralph Grothe
Honored Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

Theoretically I still have sufficient free PEs to create a new LV.

$ /usr/sbin/vgdisplay vg00|grep -e Size -e Free
PE Size (Mbytes) 8
Free PE 844
$ echo $((8*422))
3376


But I thought that contents of /etc/lvmconf needed to be integral part of /dev/vg00/lvol3 (e.g. in maintenance mode)?
Madness, thy name is system administration
Torsten.
Acclaimed Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

You should always have *1* backup of the config.

You can also check the contents, for example:

# vgcfgrestore -f /etc/lvmconf/vg00.conf.old -l
Volume Group Configuration information in "/etc/lvmconf/vg00.conf.old"
VG Name /dev/vg00
---- Physical volumes : 1 ----
/dev/rdsk/c0t6d0 (Bootable)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Ralph Grothe
Honored Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

Hi Torsten,

haven't done not many LVM changes in the past on this box.
But because there are shared VGs with many SAN PVs only the backup files come close to 22 MB,
which is more than 10% of /.

[root@warnow(Z01):/root]
# ll /etc/lvmconf/*old|awk '$5>0{s+=$5};END{printf"%10.2f\n",s/2^20}'
21.87


I will relocate the /etc/lvmconf/*old files to another filesystem and remove them from here.

Thanks for your help.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

> You can also check the contents, for example:

see my cksums above.
The outputs only differ in the 1st line with the conf file name (certainly).
Madness, thy name is system administration
James R. Ferguson
Acclaimed Contributor
Solution

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

Hi Ralph:

By default every time an LVM modification is made a 'vgcfgbackup' is run. Too, when an Ignite recovery backup is made, 'vgcfgbackup' is run.

If you are short on space, I think you can quite safely remove the ".old" files. After all, if you needed to perform a 'vgcfgrestore' you would be using the most current backup.

Regards!

...JRF...
Ralph Grothe
Honored Contributor

Re: Safe to delete /etc/lvmconf/vg*conf.old files?

Hi James,

that was it, I hadn't Ignite on the agenda.
Now I know where the backup files originate from.
Thanks for the reminder.
Madness, thy name is system administration