Extend lvm partition online dating weblog sex n fun
Firstly, from (edit: old) documentation that I've read about LVM and the relationship between Volume Groups and Physical Extents, if you want to grow a VG to larger than 256GB you must have a PE size larger than 4MB.
An example is from this article where it displays a message saying "" with 4MB PEs.
There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Type to get a list of all commands: Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Now we delete partition no. 1: Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) p Partition number (1-4): 1 Now comes the crucial part - we are asked about the size of the new partition. It appears that resize3fs may not support ext3 in any way for some or all of the 2.4kernel series. 8 Move contents of the next partition (sda12 as I recall) to the expanded sda8. Repeat for each partition until sda8 covers all the space of the old sda8 sda9. And no way to upgrade it on the reasd-only rescue system.
The first cylinder is no problem, it is the one from the : Command (m for help): w The partition table has been altered! WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The man page says it supports 'onlne' (ie while mounted) resizing of ext3 with 2.6- implying (I thought) but not saying that it swould support umounted resizing of ext3 for other kernel series. sda7 210Gb to 180Gb, only display 175Gbdf -h Filesystem Size Used Avail Use% Mounted on/dev/sda5 9.7G 2.0G 7.3G 21% //dev/sda8 996M 55M 890M 6% /tmp/dev/sda7 175G 49G 118G 30% /home/dev/sdb1 227G 163G 53G 76% /backup/dev/sda3 9.7G 7.9G 1.4G 86% /usr/dev/sda2 9.7G 8.8G 425M 96% /var/dev/sda1 99M 23M 72M 24% /boottmpfs 2.0G 7.9M 2.0G 1% /dev/shm Problem can't detect free space.fdisk /dev/sda The number of cylinders for this disk is set to 30515. I don't do resizing of partitions often enough to remember all the necessary steps. I followed these instructions (except for the 'margin', 3% of 1 TB is much space !!! It *might* work for a primary partition but it would fail for an extended partition. The step right after writing the table, And seeing all the other comments of things gone wrong, I should have been more careful. I actually skipped the comments for I cared not for the contents of the partition or the whole drive really.
First we gather some details on our original system: df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 9859036 4234908 5123304 46% / varrun 9548 1% /var/run varlock 95480 0 95480 0% /var/lock udev 10240 52 10188 1% /dev devshm 95480 0 95480 0% /dev/shm lrm 95480 17580 77900 19% /lib/modules/2.6.17-10-generic/volatile df -B 4k Filesystem 4K-blocks Used Available Use% Mounted on /dev/sda1 2464759 1058727 1280826 46% / varrun 23870 33 23837 1% /var/run varlock 23870 0 23870 0% /var/lock udev 2560 13 2547 1% /dev devshm 23870 0 23870 0% /dev/shm lrm 23870 4395 19475 19% /lib/modules/2.6.17-10-generic/volatile df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 9.5G 4.1G 4.9G 46% / varrun 94M 132K 94M 1% /var/run varlock 94M 0 94M 0% /var/lock udev 10M 52K 10M 1% /dev devshm 94M 0 94M 0% /dev/shm lrm 94M 18M 77M 19% /lib/modules/2.6.17-10-generic/volatile fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1247 10016496 83 Linux /dev/sda2 1248 1305 465885 5 Extended /dev/sda5 1248 1305 465853 82 Linux swap / Solaris fdisk -s /dev/sda1 10016496 Then we shut down the system and boot into our Knoppix Live-CD (or your rescue system) (if the partition you want to resize doesn't hold any system files, you can do everything from the original system; the steps are the same, just omit booting into Knoppix/your rescue system). There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): d Selected partition 1 Command (m for help): 11: unknown command Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): p Disk /dev/sdb: 375.8 GB, 375809638400 bytes255 heads, 63 sectors/track, 45689 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4)p Partition number (1-4): 1First cylinder (1-45689, default 1): Using default value 1Last cylinder or size or size M or size K (1-45689, default 45689): Using default value 45689 Command (m for help): w The partition table has been altered! Syncing disks.[[email protected] ~]# partprobe[[email protected] ~]# resize2fs /dev/sdb1resize2fs 1.35 (28-Feb-2004)resize2fs: Bad magic number in super-block while trying to open /dev/sdb1Couldn't find valid filesystem superblock.[[email protected] ~]# e2fsck -f /dev/sdb1e2fsck 1.35 (28-Feb-2004)Couldn't find ext2 superblock, trying backup blocks...e2fsck: Bad magic number in super-block while trying to open /dev/sdb1 The superblock could not be read or does not describe a correct ext2filesystem.
just a simple reboot will pick up the new size and you can pvextend immediately after.
I used to be able to do these tasks with my eyes closed with AIX and other version of Linux and Unix.
This could mean that removing the journal before resizing and recreating it afterwards is the way to go in this case - I will try that. There is better driver support for hardware in 2.6and these kernels have significantly different internals but it would be a misnomer to describe 2.4as obsolete just yet. I have followed all steps mentioned in the article ..article thanks for that. I ran a `fsck -f` on the filesystem afterwards without problems. All the messing about significantly increases risk of dataloss; use gparted and do it right. Oh and in case it's not clear anything over 4 isn't a primary so no clue how I got it to work. Followed the instruction exactly as outlined and everything worked well on first try.
Suggest: Try it out on test partitions before trying this on real data with the 2.4kernel. My initial size of / partition was 14GB by command 'df -kh' I reduced it by 5GB by following all steps and now when I do 'df -kh ' my size of / partition is 9GB ...OK..when I do check it by command #fdisk -s /dev/sda1 ......again showing 14GB.... To verify my claim you can resize2fs on your 3%-5% larger filesystem and then take the number of blocks returned by resize2fs, multiply them by 4 and you will see your actual partition size in fdisk. After this fsck (which failed using the other method complaining about a mis-match between the device and file system sizes.), I re-ran 'resize2fs /dev/sda1', resizing the ext2 filesystem to use the full size of the allocated partition. For lvm it's trivial, just: lvextend /dev/xenvg/everything -L 5Gresize2fs /dev/xenvg/everything I'd just like to say that this information allowed me to merge 2 partitions and ths make use of some unused space. Resized a linux (Raspian) ext3 Partition (second SD) from 15.1GB down to 7.1GB.
Search for extend lvm partition online dating:
The way I get around this is to shrink the filesystem to less than my final desired size, then resize the partition to the final size, and issue one last resize2fs to expand the filesystem to fill the paritition. Thor I found the 'calculation' and fudge of 3-5% to not work for me. I then re-ran the fsck command and followed all the steps. For historical reasons I had a 1Tb disk wih a 150Gb partition (/dev/sda8) followed by a 750Gb partions (/dev/sda9). The procedure I used was: 1, Move as much as possible from sda9 to sda8 2. 4 Shrink sda9 and create a new empty partition (sda10 again, te old sda10 got renumber to sda11!