[mdlug] Create an XFS file system in freespace

Peter Bart peter at petertheplumber.net
Thu Jul 17 05:39:39 EDT 2008


On Thu, 2008-07-17 at 02:14 -0400, Raymond McLaughlin wrote:
> R. Kannan wrote:
> > Hello,
> > 
> > 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?
> 
> fdisk, and by extension cfdisk, only deal with "partition types" which 
> are defined in the partition table(s). Once defined, partitions can 
> actually be "formatted" with any filesystem type, or as swap or other 
> "raw" data, or left blank. Linux will talk to any partition type, if it 
> understands the file system.
> 
> One time, back when I was dual booting, I switched a disk partition from 
> NTFS to (I think) ReiserFS just by running mkfs and changing /etc/fstab. 
> I  left the partition type as '7' instead of changing it to 83, and 
> linux never complained.
> 
> Lke wise it's not teribly uncommon for a beginner setting up a system 
> to partition a hard drive with (c0fdisk and leave all the partition 
> types as 83 (linux), even the swap partition which should be type 82 
> (linux swap/SOLARIS). The system will use the swap space, probably 
> without complaining.
> 
> Windows, on the other hand will ignore any "unknown" partition type, 
> which makes it very easy to hide fat or ntfs filesystems just by 
> changing the partition type with (linux) fdisk.
> 
> I you want to determine the filesystem contained on a given partiton use 
> the command: file -s <device>
> 
> > 2) Create a file system using 'mkfs -t xfs /dev/sda10' Are there any options that I
> > should use?
> 
> If the device already contains a file system mkfs my refuse to write a 
> new one without the 'force' option:
> 
>      mkfs -t xfs -f /dev/sda10
> or
>      mkfs.xfs -f /dev/sda10
> 
> Of course you want to be absolutely sure about your target before 
> running mkfs.
> 

	Parted Magic; <http://partedmagic.com/wiki/PartedMagic.php>; contains
all sorts of tools along these lines. It is a live cd.

Best Regards,
-- 
Peter Bart <peter at petertheplumber.net>
http://petertheplumber.net




More information about the mdlug mailing list