Find the answer to your Linux question:
Results 1 to 3 of 3
Hi! I created filesystem XFS on partition hda8 with subvolume real-time on partition hda5: Code: mkfs.xfs -r rtdev=/dev/hda5 /dev/hda8 and i mounted it: Code: mount -t xfs -o rtdev=/dev/hda5 /dev/hda8 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2010
    Posts
    2

    [XFS] How yo use real-time subvolume


    Hi!

    I created filesystem XFS on partition hda8 with subvolume real-time on partition hda5:
    Code:
    mkfs.xfs -r rtdev=/dev/hda5 /dev/hda8
    and i mounted it:
    Code:
    mount -t xfs -o rtdev=/dev/hda5 /dev/hda8 /xfs
    But I don't know how can I use this partition hda5 with subvolume real-time. I don't know how to create directories, copy files to it and another. Thanks for all answers!

    EDIT:
    in manual it is writen:
    The realtime section is used to store the data of realtime files.These files had an attribute bit set through xfsctl(3) after file creation, before any data was written to the file.
    But I can't understand, how can I use it Can anybody give me any example how can I use function xfsctl, please?

  2. #2
    Linux Newbie unlimitedscolobb's Avatar
    Join Date
    Jan 2008
    Posts
    120
    I'm not sure whether I understand your question right, but from my reading of the manpage, the following should be a kind of a solution:

    Code:
    int fd, err;
    struct fsxattr attr;
    
    fd = open ("file", O_READ);
    /* Get the current extended file attributes.  */
    err = xfsctl ("file", fd, XFS_IOC_FSGETXATTR, (void *) &attr);
    /* Set the realtime bit.  */
    attr.fsx_xflags |= XFS_XFLAG_REALTIME;
    /* Apply new attributes.  */
    err = xfsctl ("file", fd, XFS_IOC_FSSETXATTR, (void *) &attr);
    (Note: I haven't tested this myself, this is based on reading the manpage only.)
    Last edited by unlimitedscolobb; 02-25-2010 at 06:16 AM. Reason: Added disclaimer

  3. #3
    Just Joined!
    Join Date
    May 2006
    Posts
    2
    Huh. I wonder if the caveat at the bottom of the xfs_rtcp(8) manpage still applies...

    Caveats
    Currently, realtime partitions are not supported under the Linux version of XFS, and use of a realtime partition WILL CAUSE CORRUPTION on the data partition. As such, this command is made available for curious DEVELOPERS ONLY at this point in time.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •