LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2008, 03:21 AM   #1
geekasaurus
LQ Newbie
 
Registered: Apr 2008
Posts: 12

Rep: Reputation: 0
Fedora 8 Disk Lock--cannot mkfs


I cannot, for love or money, build a filesystem on my second hard disk. Here is the output from fdisk -l:
# fdisk -l
===================================================================
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00029c25

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 4865 38877300 8e Linux LVM

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xffffffff

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/dm-0: 338.6 GB, 338698436608 bytes
255 heads, 63 sectors/track, 41177 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table

===================================================================
When I run mkfs.ext3 /dev/sdb1
mke2fs 1.40.4 (31-Dec-2007)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!

I have tried using gparted, every variant of the fdisk command I can think of, and still there is some process that has a lock on /dev/sdb and I cannot build a filesystem on it.

lsof /dev/sdb1 returns nothing.

I have turned of the automounter, and looked through the process table and there is nothing apparently running that is accessing it.

I have even tried to vgreduce the disk from the volume group.
I've tried pvcreate, pvmove, and pvremove.
===================================================================
Here is the output of vgdisplay -v VolGroup00

Using volume group(s) on command line
Finding volume group "VolGroup00"
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 316.50 GB
PE Size 32.00 MB
Total PE 10128
Alloc PE / Size 10126 / 316.44 GB
Free PE / Size 2 / 64.00 MB
VG UUID pY4sUu-FYUH-cvGk-mVd1-ef2g-D1SN-AoaT6Z

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID AwEgSy-baAD-ixnq-wP23-Cm1D-0jJk-QAv6Ev
LV Write Access read/write
LV Status available
# open 1
LV Size 315.44 GB
Current LE 10094
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID 3rqvUF-hXZd-0ssk-lS6Y-6AEP-Cmy8-E6Mjv2
LV Write Access read/write
LV Status available
# open 1
LV Size 1.00 GB
Current LE 32
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

--- Physical volumes ---
PV Name /dev/sdb1
PV UUID tqgfyY-eq1Y-LZyg-Wx5n-uSPL-L8bR-GGqk00
PV Status allocatable
Total PE / Free PE 8942 / 0

PV Name /dev/sda2
PV UUID 2F1dIW-8B07-GDjz-yxAB-gl0E-q0Mf-YPWCoC
PV Status allocatable
Total PE / Free PE 1186 / 2
===================================================================

So /dev/sdb1 is part of the volume group, but I cannot vgreduce it out.
The error is " Physical volume "/dev/sdb1" still in use"

So somewhere, some process has a lock on this disk. And nothing I am doing can override the lock. Can anyone advise me as to how to unlock the damn thing? I guess I can boot off the rescue disk. Is that the only recourse left?


Thanks in advance.
Geekasaurus
 
Old 04-13-2008, 05:05 AM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
You have to build a partition before you file system on it (same as in windows).
 
Old 04-14-2008, 02:00 AM   #3
geekasaurus
LQ Newbie
 
Registered: Apr 2008
Posts: 12

Original Poster
Rep: Reputation: 0
As I said: I used fdisk, gparted and every disk partitioning tool available. The disk was held locked by the volume group and nothing I could do would unlock it. Evendently, Linux LVM is designed to seize disks and never allow them to be used for anything productive.

I ended up flattening the box...twice. The second time, I disconnected the IDE cable from the second hard disk while installing the OS and overwriting everything. After the 2 hour wait for all the patches to install, I rebooted it again from the Rescue CD. I then partitioned the disk, made an ext3 filesystem on it, then edited /etc/fstab. After rebooting again, the drive mounted as I wanted it to and everything was groovy.

Installing FC8 was the biggest pain-in-the-nether regions I've had the displeasure of in a long, long time. Maybe Win95 compares. I spent the first week just trying to get jigdo to work on my WinXP system, so I could get the ISO's to download. I eventually gave up and was able to make jigdo work on my laptop. I then tried to burn the CD's with the burner in my laptop....HUGE mistake. I probably burned 20 disks trying to make disks 1, 2, and 3. The installation would start, then hang while installing some package (a different package every time). I eventually network-shared the ISO's over to my desktop system, and used the burner there. The first several times I burned the CD's at the rated speed of 4x, and even with read-after-write confirmation, could not get a set of CD's to load. Eventually, I slowed it down to 1x speed, with read-after-write confirmation. Finally I was able to create 3 disks that would load the OS.

Then this disk problem occurred because I accepted the defaults. The LVM would not permit me to create logical volumes. I could not remove the disk, I could do nothing with the 2nd disk.

However, now that the damn thing is up and running, I've already started to configure the applications I wanted to. Streamripper is very cool. My ultimate goal is to convert it into a MIDI sound module.

My estimate is that I have spent over 100 hours of my time installing FC8. I am NOT a happy camper.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Installation help - spin lock recursion! rbkool Fedora - Installation 0 12-10-2006 06:29 AM
.X0-lock problem with Fedora Core 6 kaplan71 Fedora 1 11-08-2006 04:04 PM
LILO / boot disk / WinXP all lock on bootup Sniper667 Linux - Software 2 03-09-2005 04:10 AM
fedora core 2 system lock-up leon_leon Linux - Newbie 1 11-15-2004 01:47 PM
Fedora 2.0 installation...lock ups...? cbjhawks Linux - General 0 08-16-2004 02:08 PM


All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration