New disk installed and mounted LVM not working

Les hlhowell at pacbell.net
Sun Jan 14 09:40:46 UTC 2007


On Sat, 2007-01-13 at 19:21 +0200, Markku Kolkka wrote:
> Les kirjoitti viestissään (lähetysaika lauantai 13 tammikuu 2007 
> 19:00):
> > I used parted and mke2fs to create my disk partitions and
> > format them.
> (...)
> > Problem: LVM doesn't see the volume as initialized.
> 
> You set up a normal disk partition, not a LVM volume. If you 
> intended to add your new disk to LVM, you have done a lot of 
> useless work that you must undo before you can start using LVM. 
> Move your home directory back to / and remove the partition from 
> fstab.
> 
> > Either
> > new instructions or a link to something that explains it in
> > detail.
> 
> The LVM howto has instructions for adding a new drive to an 
> existing LVM system: 
> http://www.tldp.org/HOWTO/LVM-HOWTO/recipeadddisk.html
> 
> -- 
>  Markku Kolkka
>  markku.kolkka at iki.fi
> 
My ongoing disk battle...
Hi, Markku, 
	I attempted to follow the instructions on the site you quoted here, but
the command e2fsadm is not on my system.  I am running yum whatprovides
now to get it.  Here is what I have done so far:
[root at localhost ~]# fdisk /dev/hdb

The number of cylinders for this disk is set to 36481.
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined.  Delete it before re-adding it.

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)

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Selected partition 2

Command (m for help): l

 0  Empty           1e  Hidden W95 FAT1 80  Old Minix       be  Solaris
boot   
 1  FAT12           24  NEC DOS         81  Minix / old Lin bf
Solaris        
 2  XENIX root      39  Plan 9          82  Linux swap / So c1
DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  83  Linux           c4
DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     84  OS/2 hidden C:  c6
DRDOS/sec (FAT-
 5  Extended        41  PPC PReP Boot   85  Linux extended  c7
Syrinx         
 6  FAT16           42  SFS             86  NTFS volume set da  Non-FS
data    
 7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set db  CP/M /
CTOS / .
 8  AIX             4e  QNX4.x 2nd part 88  Linux plaintext de  Dell
Utility   
 9  AIX bootable    4f  QNX4.x 3rd part 8e  Linux LVM       df
BootIt         
 a  OS/2 Boot Manag 50  OnTrack DM      93  Amoeba          e1  DOS
access     
 b  W95 FAT32       51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS
R/O        
 c  W95 FAT32 (LBA) 52  CP/M            9f  BSD/OS          e4
SpeedStor      
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS
fs        
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  EFI
GPT        
10  OPUS            55  EZ-Drive        a6  OpenBSD         ef  EFI
(FAT-12/16/
11  Hidden FAT12    56  Golden Bow      a7  NeXTSTEP        f0
Linux/PA-RISC b
12  Compaq diagnost 5c  Priam Edisk     a8  Darwin UFS      f1
SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       a9  NetBSD          f4
SpeedStor      
16  Hidden FAT16    63  GNU HURD or Sys ab  Darwin boot     f2  DOS
secondary  
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fd  Linux
raid auto
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fe
LANstep        
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid ff
BBT            
1c  Hidden W95 FAT3 75  PC/IX          

Command (m for help): p

Disk /dev/hdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 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): 1
First cylinder (1-36481, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-36481, default 36481): 500

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (501-36481, default 501): 
Using default value 501
Last cylinder or +size or +sizeM or +sizeK (501-36481, default 36481):
36481

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Changed system type of partition 2 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root at localhost ~]# pvcreate /dev/hdb1
  Physical volume "/dev/hdb1" successfully created
[root at localhost ~]# pvcreate /dev/hdb2
  Physical volume "/dev/hdb2" successfully created
[root at localhost ~]# vgextend ops /dev/hdb1
  Volume group "ops" not found.
[root at localhost ~]# man vgcreate
Formatting page, please wait...
[root at localhost ~]# vgcreate second /dev/hdb1 /dev/hdb2
  Volume group "second" successfully created
[root at localhost ~]# pvscan
  PV /dev/hdb1   VG second       lvm2 [3.83 GB / 3.83 GB free]
  PV /dev/hdb2   VG second       lvm2 [275.62 GB / 275.62 GB free]
  PV /dev/hda2   VG VolGroup00   lvm2 [14.19 GB / 32.00 MB free]
  Total: 3 [293.64 GB] / in use: 3 [293.64 GB] / in no VG: 0 [0   ]
[root at localhost ~]# export E2FSADM_RESIZE_CMD=ext2resize
[root at localhost ~]# e2fsadm /dev/ops/batch  -L+500M
-bash: e2fsadm: command not found

Does anyone else have anything to add to my process here?
I am still waiting for results of the yum whatprovides e2fsadm.

Regards,
Les H




More information about the fedora-list mailing list