Skip to contentSkip to conversation

Placing the root partition on an XFS filesystem is not supported

DISCUSSION Marcos Mello 4 participants 12 messages Jan 29, 2012 – Feb 7, 2012

lore
Share & tools
lore
#1 lore raw
Quoted 4 lines · Marcos Mello

http://git.fedorahosted.org/git/?p=anaconda.git;a=commit;h=b3e19d43840f6c4015fab75411853003fcf26a63

Does someone knows why? I'm trying to get rid of EXT* partitions on my new CentOS 6.2 installs but apparently it will not be possible.

I'm unsure what this Fedora commit is all about, but in the general Linux case you can put root on XFS, with a minor caveat. See:

http://www.xfs.org/index.php/XFS_FAQ#Q:_Can_XFS_be_used_for_a_root_filesystem.3F

Signature · 6 lines
Stan

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
Quoted 3 lines · Stan Hoeppner <stan <at> hardwarefreak.com> writes:
Quoted 1 line · Marcos Mello

http://git.fedorahosted.org/git/?p=anaconda.git;a=commit;h=b3e19d43840f6c4015fab75411853003fcf26a63

Quoted 9 lines
Quoted 3 lines

Does someone knows why? I'm trying to get rid of EXT* partitions on my new CentOS 6.2 installs but apparently it will not be possible.

I'm unsure what this Fedora commit is all about, but in the general Linux case you can put root on XFS, with a minor caveat. See:

http://www.xfs.org/index.php/XFS_FAQ#Q:_Can_XFS_be_used_for_a_root_filesystem.3F

Yeah, some time ago I run XFS as my / on Arch. But Anaconda doesn't allow it now. So we're still forced to have an EXT partition for the root filesystem in the Red Hat land.

Found this
http://pastebin.com/gHqGGkSp

Marcos

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

#3 lore raw
In reply to Marcos Mello
Quoted 4 lines · Marcos Mello

http://git.fedorahosted.org/git/?p=anaconda.git;a=commit;h=b3e19d43840f6c4015fab75411853003fcf26a63

Does someone knows why? I'm trying to get rid of EXT* partitions on my new CentOS 6.2 installs but apparently it will not be possible.

Was done for RHEL, AFAIK.

In general there is no problem with xfs on a root partition. However, the installer may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that honestly).

-Eric

Quoted 7 lines

Marcos

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

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

#4 lore raw
Quoted 2 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:

In general there is no problem with xfs on a root partition. However, the

installer

Quoted 3 lines

may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that

honestly).

Quoted 2 lines

-Eric

Same thing on Fedora 16. Let's hope some day Anaconda will change that.

About GRUB with a XFS /boot the problem was with GRUB Lagacy, wasn't it? Or GRUB2 is still buggy?

Marcos

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

#5 lore raw
Quoted 5 lines · Marcos Mello
Quoted 2 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:

In general there is no problem with xfs on a root partition. However, the

installer

Quoted 8 lines
Quoted 3 lines

may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that

honestly).

Quoted 2 lines

-Eric

Same thing on Fedora 16. Let's hope some day Anaconda will change that.

F16 prevents it? I didn't see it in the upstream tree. That should not be so. :/

Quoted 2 lines

About GRUB with a XFS /boot the problem was with GRUB Lagacy, wasn't it? Or GRUB2 is still buggy?

I have no idea, actually. I delved into grub a bit, it was disturbing enough that I have not tried to look at grub2. :)

-Eric

Quoted 7 lines

Marcos

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

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

#6 lore raw
Quoted 15 lines · Eric Sandeen
Quoted 5 lines · Marcos Mello
Quoted 2 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:

In general there is no problem with xfs on a root partition. However, the

installer

Quoted 8 lines
Quoted 3 lines

may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that

honestly).

Quoted 2 lines

-Eric

Same thing on Fedora 16. Let's hope some day Anaconda will change that.

Quoted 8 lines

F16 prevents it? I didn't see it in the upstream tree. That should not be so. :/

Quoted 2 lines

About GRUB with a XFS /boot the problem was with GRUB Lagacy, wasn't it? Or GRUB2 is still buggy?

I have no idea, actually. I delved into grub a bit, it was disturbing enough that I have not tried to look at grub2. :)

Certainly the problem exists with legacy grub - it assumes that it can write to the first sector or any disk or partition which overwrites the XFS superblock...

The grub2 manual:

http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation

indicates that if you are using BIOS/MBR based booting, then grub2 still writes to the first sector of the partition that contains the grub directory to install the stage 1.5 loader. Indeed:

"boot.img

On PC BIOS systems, this image is the first part of GRUB to start. It is written to a master boot record (MBR) or to the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes.

The sole function of boot.img is to read the first sector of the core image from a local disk and jump to it. Because of the size restriction, boot.img cannot understand any file system structure, so grub-setup hardcodes the location of the first sector of the core image into boot.img when installing GRUB. "

IOWs, you have to treat grub2 identically to legacy grub in that it thinks it owns the first sector of any partition on the disk. Therefore, you need a separate /boot partition that is not formated with XFS to be safe.

There's a reason I went back to using LILO....

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#7 lore raw
Quoted 22 lines · Dave Chinner
Quoted 21 lines · Eric Sandeen
Quoted 5 lines · Marcos Mello
Quoted 2 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:

In general there is no problem with xfs on a root partition. However, the

installer

Quoted 8 lines
Quoted 3 lines

may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that

honestly).

Quoted 2 lines

-Eric

Same thing on Fedora 16. Let's hope some day Anaconda will change that.

F16 prevents it? I didn't see it in the upstream tree. That should not be so. :/

Quoted 2 lines

About GRUB with a XFS /boot the problem was with GRUB Lagacy, wasn't it? Or GRUB2 is still buggy?

Quoted 6 lines
Quoted 2 lines

I have no idea, actually. I delved into grub a bit, it was disturbing enough that I have not tried to look at grub2. :)

Certainly the problem exists with legacy grub - it assumes that it can write to the first sector or any disk or partition which overwrites the XFS superblock...

well, it was worse than that. I can work around the grub-on-a-partition problem, but what I ran into was grub reading & writing to/from the block device under a mounted filesystem - corruption and hilarity ensued.

-Eric

Quoted 26 lines

The grub2 manual:

http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation

indicates that if you are using BIOS/MBR based booting, then grub2 still writes to the first sector of the partition that contains the grub directory to install the stage 1.5 loader. Indeed:

"boot.img

On PC BIOS systems, this image is the first part of GRUB to start. It is written to a master boot record (MBR) or to the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes.

The sole function of boot.img is to read the first sector of the core image from a local disk and jump to it. Because of the size restriction, boot.img cannot understand any file system structure, so grub-setup hardcodes the location of the first sector of the core image into boot.img when installing GRUB. "

IOWs, you have to treat grub2 identically to legacy grub in that it thinks it owns the first sector of any partition on the disk. Therefore, you need a separate /boot partition that is not formated with XFS to be safe.

Quoted 5 lines

There's a reason I went back to using LILO....

Cheers,

Dave.

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

#8 lore raw
Quoted 26 lines · Eric Sandeen
Quoted 25 lines · Dave Chinner
Quoted 23 lines · Eric Sandeen
Quoted 5 lines · Marcos Mello
Quoted 2 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:

In general there is no problem with xfs on a root partition. However, the

installer

Quoted 8 lines
Quoted 3 lines

may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that

honestly).

Quoted 2 lines

-Eric

Same thing on Fedora 16. Let's hope some day Anaconda will change that.

F16 prevents it? I didn't see it in the upstream tree. That should not be so. :/

Quoted 2 lines

About GRUB with a XFS /boot the problem was with GRUB Lagacy, wasn't it? Or GRUB2 is still buggy?

I have no idea, actually. I delved into grub a bit, it was disturbing enough that I have not tried to look at grub2. :)

Quoted 7 lines
Quoted 3 lines

Certainly the problem exists with legacy grub - it assumes that it can write to the first sector or any disk or partition which overwrites the XFS superblock...

well, it was worse than that. I can work around the grub-on-a-partition problem, but what I ran into was grub reading & writing to/from the block device under a mounted filesystem - corruption and hilarity ensued.

Oh, grub2 does worse things than that - grub_probe mounts any device that appears to have a valid superblock so it can find out what devices it needs to list in it's boot menu. I found this out when I built a big DM stripe out of disks that used to have filesystems on them. grub-probe mounted every single device -inside- the stripe and ran log recovery on them, corrupting the new filesystem and quite a bit of data on the DM stripe they were part of....

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#9 lore raw
Quoted 35 lines · Dave Chinner
Quoted 26 lines · Eric Sandeen
Quoted 25 lines · Dave Chinner
Quoted 23 lines · Eric Sandeen
Quoted 5 lines · Marcos Mello
Quoted 2 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:

In general there is no problem with xfs on a root partition. However, the

installer

Quoted 8 lines
Quoted 3 lines

may not make it easy or available for you.

(I never use xfs for /boot though, I don't trust grub enough for that

honestly).

Quoted 2 lines

-Eric

Same thing on Fedora 16. Let's hope some day Anaconda will change that.

F16 prevents it? I didn't see it in the upstream tree. That should not be so. :/

Quoted 2 lines

About GRUB with a XFS /boot the problem was with GRUB Lagacy, wasn't it? Or GRUB2 is still buggy?

I have no idea, actually. I delved into grub a bit, it was disturbing enough that I have not tried to look at grub2. :)

Quoted 7 lines
Quoted 3 lines

Certainly the problem exists with legacy grub - it assumes that it can write to the first sector or any disk or partition which overwrites the XFS superblock...

well, it was worse than that. I can work around the grub-on-a-partition problem, but what I ran into was grub reading & writing to/from the block device under a mounted filesystem - corruption and hilarity ensued.

Quoted 7 lines

Oh, grub2 does worse things than that - grub_probe mounts any device that appears to have a valid superblock so it can find out what devices it needs to list in it's boot menu. I found this out when I built a big DM stripe out of disks that used to have filesystems on them. grub-probe mounted every single device -inside- the stripe and ran log recovery on them, corrupting the new filesystem and quite a bit of data on the DM stripe they were part of....

Ok, your horror story wins from a pain POV ;)

but sounds like someone should have zeroed out a bit more disk when setting up the dm stripes :(

I've always thought maybe we needed a libzero.so to zap every known signature on disk....

-Eric

Quoted 3 lines

Cheers,

Dave.

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

#10 lore raw
Quoted 3 lines · Eric Sandeen <sandeen <at> sandeen.net> writes:
Quoted 2 lines · Dave Chinner
Quoted 1 line · Eric Sandeen

On 2/5/12 6:11 PM, Dave Chinner wrote:

<snip>

Quoted 13 lines
Quoted 5 lines
Quoted 4 lines

well, it was worse than that. I can work around the grub-on-a-partition problem, but what I ran into was grub reading & writing to/from the block device under a mounted filesystem - corruption and hilarity ensued.

Quoted 7 lines

Oh, grub2 does worse things than that - grub_probe mounts any device that appears to have a valid superblock so it can find out what devices it needs to list in it's boot menu. I found this out when I built a big DM stripe out of disks that used to have filesystems on them. grub-probe mounted every single device -inside- the stripe and ran log recovery on them, corrupting the new filesystem and quite a bit of data on the DM stripe they were part of....

Quoted 8 lines

Ok, your horror story wins from a pain POV ;)

but sounds like someone should have zeroed out a bit more disk when setting up the dm stripes :(

I've always thought maybe we needed a libzero.so to zap every known signature on disk....

Thanks a lot for the explanation folks! It would be nice have this documented on the XFS FAQ
http://xfs.org/index.php/XFS_FAQ#Q:_Does_GRUB_work_with_XFS.3F

Eric, landed recently in util-linux's libblkid a function for that AFAIK
http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=commitdiff;h=2b89be6c802bdbdf6830dbd060c96e33f179b135

Marcos

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

#11 lore raw
In reply to Eric Sandeen
Quoted 11 lines · Eric Sandeen
Quoted 7 lines · Dave Chinner

Oh, grub2 does worse things than that - grub_probe mounts any device that appears to have a valid superblock so it can find out what devices it needs to list in it's boot menu. I found this out when I built a big DM stripe out of disks that used to have filesystems on them. grub-probe mounted every single device -inside- the stripe and ran log recovery on them, corrupting the new filesystem and quite a bit of data on the DM stripe they were part of....

Ok, your horror story wins from a pain POV ;)

What's the default bootloader of RHEL/Fedora? I'm not asking rhetorically. I've never used either, and I'm curios if Red Hat went the grub/grub2 route like SuSE and many/most other distros.

I use strictly Debian/LILO myself. I was quite relieved when they decided not to throw LILO out of the distro. Apparently it had been abandoned upstream. Luckily another dev took ownership at the last minute.

Signature · 6 lines
Stan

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