Advertisement

05.31.2008 at 08:21AM PDT, ID: 23446956
[x]
Attachment Details

How does a FS know which partition / device it belongs to

Asked by Xyptilon2 in Disk Partition Tools, Linux, Debian Linux

Tags: Debian Linux

I have a FS on a device /dev/sdb. The file system was created without any partition tables. I have since created a partition on this device so there is now a valid partition table. In /etc/fstab, i can mount it if i mount it to /dev/sdb... if i mount to the created partition /dev/sdb1 i get the following error message:

mount: wrong fs type, bad option, bad superblock on /dev/sdb, missing code page or other error

Basically what i want is to make the filesystem from "container" /dev/sdb to /dev/sdb1, because once it is a partition i can resize it. So far i have created the partition, but it is only one partition that occupies the entire drive (250 GB).. i want to repartition that to 80 GB and 2 other partitions.

I have however not been able to find where this is specified..

Looking at the MBR i see that the first 446 bytes are for bootcode, followed by 64 bits of partition table followed by a 2 byte signature.

The 64 bytes are 4 x 16 bytes. one for each primary / extended partition. These 16 bytes break down as follows:

byte 0 = Boot incidator (0x80 = active)
byte 1-3 = Starting CHS values
byte 4 = partition type descriptior
byte 5-7 = Ending CHS values
byte 8-11 = starting sector
byte 12-15 = partition size (in sectors)

This is all pretty straightforward and its not specified here. Perhaps in the first 446 bytes? though i doubt that.

Looking at the file system itself with dump2efs and debugfs i've not been able to find any hints either. My questions.. where can i see / change this? in the higher VFS layer? Where is data from the FS stored on the drive? surely somewhere it must say.. hey i belong to this and this partition / device?

Start Free Trial
[+][-]05.31.2008 at 12:46PM PDT, ID: 21684861

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 12:48PM PDT, ID: 21684867

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 12:32AM PDT, ID: 21686316

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 01:11AM PDT, ID: 21686356

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 01:28AM PDT, ID: 21686378

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.01.2008 at 01:45AM PDT, ID: 21686396

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Disk Partition Tools, Linux, Debian Linux
Tags: Debian Linux
Sign Up Now!
Solution Provided By: ixti
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.01.2008 at 02:38AM PDT, ID: 21686458

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628