how to deactivate vg hosting root filesystem
So I set up an initrd that starts raid and lvm before doing a pivot_root and execing init. This has been working fine for a long time.
The only problem I have is that the only way I know of to free up the vg for deactivation is to make init exit, which panics the kernel. How do I do this safely?
Quoted 6 lines · Joe Harvell
So I set up an initrd that starts raid and lvm before doing a
pivot_rootand execing init. This has been working fine for a long time.The only problem I have is that the only way I know of to free up the vg for deactivation is to make init exit, which panics the kernel. How do I do this safely?
At the moment there is no need to deactivate the root VG.
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
[linux-lvm] success report 2.4.10 + 1.0.1-rc2 + diff
In reply to Joe Harvellfwiw,
Im pleased to report success using linux-2.4.10, LVM-1.0.1-rc2, and this patch: http://incandescent.mp3revolution.net/lvm/inline_fix.diff
on a basically stock RH-7.1 installation.
I made 1 minor patch to /etc/rc.d/rc.sysinit, probably theres a better way..
+ # LVM initialization
+ action "loading LVM:" /sbin/insmod lvm-mod
if [ -e /proc/lvm -a -x /sbin/vgchange -a -f /etc/lvmtab ]; then
action $"Setting up LVM:" /sbin/vgscan && /sbin/vgchange -a y
fi
and possibly a couple manual edits to lvm-*.c;min(z,x,y) -> min(x,y), max() too
so now, bootup works, and shows results as follows
[jimc@groucho jimc]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
.../dev/hdc5 4031656 3762168 64692 99% /home/dev/_vgb/vl_tmp 495844 24 470220 1% /tmp/dev/_vgb/vl_t2 1511856 326156 1108900 23% /mnt/new
[root@groucho /root]# vgdisplay
--- Volume group ---
VG Name _vgb VG Access read/write VG Status available/resizable VG # 0 MAX LV 255 Cur LV 2 Open LV 2 MAX LV Size 255.99 GB Max PV 255 Cur PV 1 Act PV 1 VG Size 9.36 GB PE Size 4.00 MB Total PE 2397 Alloc PE / Size 500 / 1.95 GB Free PE / Size 1897 / 7.41 GB VG UUID 6w4vI8-x2Qp-rqFg-soa6-eYOF-2Uwp-8sB7z8
[root@groucho /root]# lvdisplay /dev/_vgb/vl_t*
--- Logical volume ---
LV Name /dev/_vgb/vl_t2 VG Name _vgb LV Write Access read/write LV Status available LV # 1 # open 1 LV Size 1.46 GB Current LE 375 Allocated LE 375 Allocation next free Read ahead sectors 120 Block device 58:0
--- Logical volume ---
LV Name /dev/_vgb/vl_tmp VG Name _vgb LV Write Access read/write LV Status available LV # 2 # open 1 LV Size 500.00 MB Current LE 125 Allocated LE 125 Allocation next free Read ahead sectors 120 Block device 58:1
the only hitch I had configing was using lvrename, vgrename; IIRC. I had to mv the /dev/_vgb special files myself, causing a couple of fstab-umount-reboot-to-single sessions to clean up errs. I used the 2nd cmd-form, "vgrename vg02 my_volume_group", if that matters.
Perhaps a FAQ entry explaining what I may have mis-understood:
{lv,vg} rename dont change names of /dev/ special-files,
nor corresponding entries in /etc/fstab. You must manually edit your mount points.
looking forward, I plan to fix the problem with 99% on /home
thanks for great software.