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 05-30-2008, 07:54 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Rep: Reputation: 30
partition disappear


I got a brand new 500G drive from the Internet and trying to use it as a backup drive. A strange thing happen when I try to format it. I connect the drive to my computer using a usb enclosure. Then do following,
Code:
$ /sbin/fdisk /dev/sdb

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

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83

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

Calling ioctl() to re-read partition table.
Syncing disks.

[root@localhost mnt]# /sbin/fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1044     8281507+  8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       60801   488384001   83  Linux

[root@localhost mnt]# /sbin/mkfs -t ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61063168 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
3727 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@localhost mnt]# mount /dev/sdb1 /mnt/drive
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[root@localhost mnt]# /sbin/fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1044     8281507+  8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

As you can see the sdb1 is gone. I am not sure what is going on. I re-try creating a new partition using fdisk, but still not successful.

Can someone explain me if I did anything incorrectly?
 
Old 05-30-2008, 08:20 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
When you finished with fdisk, did it say something about the kernel still using the old partition table? Typically, a reboot is required for the kernel to recognize a new partition. Try making the partition, re-booting, and then creating the filesystem.

(Just a hunch)
 
Old 05-30-2008, 08:47 PM   #3
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Pixellany is right, fdisk probably calls blockdev --rereadpt before exiting but it may not work over USB. BTW, as side note, you do not need to partition if you want to create a single filesystem ... look up the definition of partition in a dictionary .
 
Old 05-30-2008, 08:55 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by Emerson View Post
Pixellany is right, fdisk probably calls blockdev --rereadpt before exiting but it may not work over USB. BTW, as side note, you do not need to partition if you want to create a single filesystem ... look up the definition of partition in a dictionary .
That's a new one---are you saying that you can create a filesystem on---eg--/dev/sda?
 
Old 05-30-2008, 09:09 PM   #5
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Why not? You can create filesystem on /dev/fdx, can't you? /dev/sda is a raw device as is /dev/fd0. I've to say I do it myself with storage drives when partitioning (dictionary meaning) is not needed, works fine.
 
Old 05-30-2008, 11:50 PM   #6
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
Thank you all for your suggestion. I will reboot my machine and see if the partition is there. can you think of any benefit of having a single partition rather than using the whole disk?
 
Old 05-31-2008, 08:27 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by ufmale View Post
Thank you all for your suggestion. I will reboot my machine and see if the partition is there. can you think of any benefit of having a single partition rather than using the whole disk?
I would never simply use the whole disk without partitioning---unless the disk is used only for data.

Given that you can format a drive without partitioning it (new one on me..) then I can't see how the system will care---ie, once it's mounted, it's going to be simply a directory to put files in.
 
Old 05-31-2008, 08:39 AM   #8
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled

I assure system does not care if a filesystem is wrapped into a partition table or not. After you mount it you won't see any difference.
 
  


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
Devices Disappear IpowerOne Fedora 1 12-05-2006 04:38 PM
After server reboot home2 partition disappear? newlinuxnewbie Linux - Hardware 1 09-23-2006 03:29 PM
sprintf value disappear syseeker Programming 8 02-17-2006 05:20 AM
files.. disappear?? dongmin Linux - Newbie 3 06-26-2004 01:50 PM
Why do some commands disappear??? mandelchan Linux - General 8 04-22-2004 01:50 PM


All times are GMT -5. The time now is 08:57 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