[Top] [All Lists]

Re: Use whole disk

To: Ramon Hofer <ramonhofer@xxxxxxxxxx>
Subject: Re: Use whole disk
From: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>
Date: Tue, 03 Jul 2012 03:46:59 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <jsu88p$t01$1@xxxxxxxxxxxxxxx>
References: <jsu88p$t01$1@xxxxxxxxxxxxxxx>
Reply-to: stan@xxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
On 7/3/2012 2:50 AM, Ramon Hofer wrote:
> Hi all

Hi Ramon, welcome to XFS.

> 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. ;)

> 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?

> ~# mkfs.xfs /dev/sdk

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

> 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.


<Prev in Thread] Current Thread [Next in Thread>