Skip to contentSkip to conversation

Use whole disk

DISCUSSION Ramon Hofer 2 participants 4 messages Jul 3, 2012

lore
Share & tools
lore
#0 lore raw

Hi all

I hope this is the right place to ask this:

I wanted to use a 2 TB disk (as mythtv recordings drive) with the xfs filesystem. Until now I had jfs but I wanted to switch it.

Since I have two drives of the same type I formatted the new drive with xfs and copied the recordings onto it. Today I saw that I created the filesystem over the disk instead of the partition:

~# mkfs.xfs /dev/sdk

These are my two disks:

/dev/sdi1      jfs    1.9T  1.9T  3.9G 100% /mnt/recordings
/dev/sdk       xfs    1.9T  1.9T  3.3G 100% /mnt/recordings_temp

Is it ok to use the disk instead of the partition or why do I have to create the filesystem on a partition?

Best regards
Ramon

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 2 lines · Ramon Hofer

Is it ok to use the disk instead of the partition or why do I have to create the filesystem on a partition?

I was told that it's possible to use the whole disk. But it's safer because the user (me) and some tools see that the disk is already used because of the valid partition table.

Another reason would be the filesystem alignment that could cause performance issues.

Best regards
Ramon

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
In reply to Ramon Hofer
Quoted 1 line · Ramon Hofer

Hi all

Hi Ramon, welcome to XFS.

Quoted 1 line

I hope this is the right place to ask this:

It is. But I could have answered this, and any of your XFS questions, off list as well. ;)

Quoted 6 lines

I wanted to use a 2 TB disk (as mythtv recordings drive) with the xfs filesystem. Until now I had jfs but I wanted to switch it.

Since I have two drives of the same type I formatted the new drive with xfs and copied the recordings onto it. Today I saw that I created the filesystem over the disk instead of the partition:

Had you already put a partition on the disk?

Quoted 1 line

~# mkfs.xfs /dev/sdk

If yes, did mkfs.xfs throw a warning about overwriting the partition table?

Quoted 7 lines

These are my two disks:

/dev/sdi1      jfs    1.9T  1.9T  3.9G 100% /mnt/recordings
/dev/sdk       xfs    1.9T  1.9T  3.3G 100% /mnt/recordings_temp

Is it ok to use the disk instead of the partition or why do I have to create the filesystem on a partition?

It's not necessary to put a partition on the disk before formatting with XFS. And in fact, when using Advanced Format drives, it's much easier to make sure XFS is sector aligned by directly formatting the disk.

Partitioning an AF drive to get proper sector alignment can be tricky. If you don't get proper sector alignment of the partition, you end up with a read/modify/write cycle when a filesystem block is modified. This reduces the performance of the drive significantly. For a write mostly mythTV recording drive this probably isn't critical. But if you can avoid the misaligned sector problem it's best to do so. And you easily can by directly formatting the disk device.

Signature · 6 lines
Stan

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw
Quoted 9 lines · Stan Hoeppner
Quoted 1 line · Ramon Hofer

Hi all

Hi Ramon, welcome to XFS.

Quoted 1 line

I hope this is the right place to ask this:

It is. But I could have answered this, and any of your XFS questions, off list as well. ;)

Yes, I know.
But I didn't want to abuse you as my personal question answering machine ;-)

Quoted 8 lines
Quoted 6 lines

I wanted to use a 2 TB disk (as mythtv recordings drive) with the xfs filesystem. Until now I had jfs but I wanted to switch it.

Since I have two drives of the same type I formatted the new drive with xfs and copied the recordings onto it. Today I saw that I created the filesystem over the disk instead of the partition:

Had you already put a partition on the disk?

Yes, I have.

Quoted 3 lines
Quoted 1 line

~# mkfs.xfs /dev/sdk

If yes, did mkfs.xfs throw a warning about overwriting the partition table?

Yes, it did. And I was confused because I thought the warning was because the disk was in the md9 raid before. But since I have overwritten the raid partition now I realize that the warning was about the partition I created afterwards...

Quoted 12 lines
Quoted 7 lines

These are my two disks:

/dev/sdi1      jfs    1.9T  1.9T  3.9G 100% /mnt/recordings
/dev/sdk       xfs    1.9T  1.9T  3.3G 100% /mnt/recordings_temp

Is it ok to use the disk instead of the partition or why do I have to create the filesystem on a partition?

It's not necessary to put a partition on the disk before formatting with XFS. And in fact, when using Advanced Format drives, it's much easier to make sure XFS is sector aligned by directly formatting the disk.

Quoted 7 lines

Partitioning an AF drive to get proper sector alignment can be tricky. If you don't get proper sector alignment of the partition, you end up with a read/modify/write cycle when a filesystem block is modified. This reduces the performance of the drive significantly. For a write mostly mythTV recording drive this probably isn't critical. But if you can avoid the misaligned sector problem it's best to do so. And you easily can by directly formatting the disk device.

So it's better to directly format the disk and not the partition.

I will redo that :-)

Cheers
Ramon

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs