[mdlug] Create an XFS file system in freespace

Robert Meier list1c30fe42 at bellsouth.net
Wed Jul 16 23:38:10 EDT 2008


R,

> I want to create an XFS in the freespace available on my hard drive
> for storing MPEG video files created by MythTV.
> Apparently MythTV does not work well with ReiserFS (Ver3) that I have.
> If I understand correctly to do this, I have to 

> 1) Create a partition using 'cfdisk'.
> But cfdisk presents a lot of file system types (default is Linux? type 82)
> but not XFS. Which one do I choose?

linux nominally uses
0x82 - swap
0x83 - data (xfs, and most other filesystems, are layered on top)
0x85 - extended

Consequently for storing video files, you want to use partition type 83.

See http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
for further details.

> 2) Create a file system using 'mkfs -t xfs /dev/sda10'[.]

There is some ambiguity here.  I believe /dev/sda10 refers to the 6th
extended partition, not to a primary partition.  See hd(4) and sd(4)
for details.

An extended partition is a section of a primary partition delineated
by an "extended boot record" stored in the primary partition.

It is analagous to a big file stored in the primary partition and
mounted loopback.
If the primary partition (or table entry) is damaged,
you probably lose the extended partition, 

It differs from a loopack file,
in that the parent "filesystem" data is read only once,
at mount-time, rather than potentially at each disk access.
This shaves a few microseconds off each disk access,
at the cost of potentially more disk fragmentation.

Assuming your video files have more value than average files on your
hard disk, I suggest creating a primary partition, or directory within
a primary partition.  To achieve this, you may need to copy current
contents to a temporary location, reformat the primary partition
as xfs, then copy the current contents back into a directory that
you can symlink if desired.

> Are there any options that I should use?

In addition to -t xfs, I recommend -c to check for bad sectors before
writing the filesystem.

See mkfs.xfs(8) for further details.

-- 
Bob

  "To announce that there must be no criticism of the president,
   or that we are to stand by the president, right or wrong,
   is not only unpatriotic and servile, but is morally
   treasonable to the American public."
         -- Theodore Roosevelt




More information about the mdlug mailing list