After formating a sata disk, all disk names change from /dev/ad0# to /dev/ad#p1

wblock@ said:
Please show exactly what you mean.

I have a Western Digital 2TB drive, and it has the advanced format feature. I try to follow the instruction to format the drive to 4k align.

Code:
dd if=/dev/zero of=/dev/ad8 bs=1M count=10
gpt create ad8
gpt add -b 64 -s 3907029056 -t ufs /dev/ad8
newfs -S 4096 -b 32768 -f 4096 -O 2 -U -m 1 -o space -L Storage5 /dev/ad8p1

Before I format the drive, all the drives have disk name like this:
/dev/ad2
/dev/ad4
/dev/ad6

after I format it with the above command lines, the disk name change to
/dev/ad2p1
/dev/ad4p1
/dev/ad6p1

I want to change back to /dev/ad#. Is there any way to do it?
 
/dev/adX refers to the (unformatted) disk, the complete disk device.

Once you create a partition via gpart(1), then a new device node is created to point to that partition: /dev/adXpY

The original device node (/dev/adX) is still there.

IOW, everything is working correctly, and the system is doing exactly what you told it to.
 
phoenix said:
/dev/adX refers to the (unformatted) disk, the complete disk device.

Once you create a partition via gpart(1), then a new device node is created to point to that partition: /dev/adXpY

The original device node (/dev/adX) is still there.

IOW, everything is working correctly, and the system is doing exactly what you told it to.

Thank you for clearing my confusion.:)
 
Of course they are partitions, but after all slices are not partitions? As far as I know slices are what in the bios terminology are partitions. Is there an architecture where slices are something really different from a partition intended in the bios way?
 
BSD slices are BIOS partitions. They contain BSD partitions, which are similar to DOS/Windows extended-logical partitions.

GPT partitions are more or less the "modern" equivalent of BIOS partitions/BSD slices.
 
Beastie said:
BSD slices are BIOS partitions. They contain BSD partitions, which are similar to DOS/Windows extended-logical partitions.

GPT partitions are more or less the "modern" equivalent of BIOS partitions/BSD slices.

Yes I know. My former question was about a naming conflict. Having gpt the partition names like 'a', 'b'. 'c' loose their meaning.
 
fluca1978 said:
My former question was about a naming conflict. Having gpt the partition names like 'a', 'b'. 'c' loose their meaning.
And I was answering that question: GPT partitions - /dev/adXpY - are the equivalent of BIOS partitions/BSD slices - /dev/adXsY. See the difference (p VS s)?
 
GPT allows (typically) up to 128 partitions on a disk, so bsdlabel and the letter partition names are not needed.
 
fluca1978 said:
Yes I know. My former question was about a naming conflict. Having gpt the partition names like 'a', 'b'. 'c' loose their meaning.

BSD slices (sX) are sub-divided into partitions ([a-h]). There's a finite number of partitions (originally 8; DFlyBSD does 16, not sure what FreeBSD supports). Hence, device nodes look like ada0sX[a-h].

GPT partitions are not sub-divided. And you can have 128 of them, way more than there letters in the English alphabet. Hence, the new naming scheme of pX. Device nodes are simpler, just ada0pX. And you access them directly.
 
Back
Top