Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 294387 Details for
Bug 432065
RFE: Add ext4 and xfs functionality to system-config-lvm
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
initial patch
ext4_and_xfs (text/plain), 7.44 KB, created by
Eric Sandeen
on 2008-02-08 17:43:19 UTC
(
hide
)
Description:
initial patch
Filename:
MIME Type:
Creator:
Eric Sandeen
Created:
2008-02-08 17:43:19 UTC
Size:
7.44 KB
patch
obsolete
>Index: system-config-lvm-1.1.1/src/Filesystem.py >=================================================================== >--- system-config-lvm-1.1.1.orig/src/Filesystem.py >+++ system-config-lvm-1.1.1/src/Filesystem.py >@@ -42,12 +42,10 @@ def get_fs(path): > return Unknown('vfat32') > elif re.search('minix', result, re.I): > return Unknown('minix') >- elif re.search('xfs', result, re.I): >- return Unknown('xfs') > elif re.search('jfs', result, re.I): > return Unknown('jfs') >- elif re.search('raiserfs', result, re.I): >- return Unknown('raiserfs') >+ elif re.search('reiserfs', result, re.I): >+ return Unknown('reiserfs') > elif re.search('swap', result, re.I): > return Unknown('swap') > else: >@@ -56,7 +54,7 @@ def get_fs(path): > > def get_filesystems(): > # NoFS has to be first >- return [NoFS(), ext3(), ext2(), gfs2(), gfs2_clustered(), gfs(), gfs_clustered()] >+ return [NoFS(), ext4(), ext3(), ext2(), gfs2(), gfs2_clustered(), gfs(), gfs_clustered(), xfs()] > > > class Filesystem: >@@ -146,6 +144,112 @@ class Unknown(Filesystem): > 'unknown') > > >+class ext4(Filesystem): >+ def __init__(self): >+ creatable = self.check_path('/sbin/mkfs.ext3') >+ mountable = self.check_mountable('ext4dev', 'ext4dev') >+ resize_offline = self.check_paths(['/sbin/e2fsck', '/sbin/resize2fs']) >+ extend_online = self.check_path('/sbin/resize2fs') >+ >+ Filesystem.__init__(self, 'Ext4', creatable, True, mountable, >+ extend_online, resize_offline, False, resize_offline, >+ 'ext4dev') >+ >+ >+ def probe(self, path): >+ result = execWithCapture("/usr/bin/file", ['/usr/bin/file', '-s', '-L', path]) >+ if re.search('ext4', result, re.I): >+ return True >+ >+ # Note, you may need a test for new-enough e2fsprogs for ext4 >+ def create(self, path): >+ args = list() >+ args.append("/sbin/mkfs") >+ args.append("-t") >+ args.append('ext3') >+ args.append(path) >+ cmdstr = ' '.join(args) >+ msg = CREATING_FS % (self.name) >+ o,e,r = execWithCaptureErrorStatusProgress("/sbin/mkfs", args, msg) >+ if r != 0: >+ raise CommandError('FATAL', FSCREATE_FAILURE % (cmdstr,e)) >+ >+ def extend_online(self, dev_path): >+ cmd = '/sbin/resize2fs' >+ args = [cmd, dev_path] >+ cmdstr = ' '.join(args) >+ msg = RESIZING_FS % (self.name) >+ o, e, s = execWithCaptureErrorStatusProgress(cmd, args, msg) >+ if s != 0: >+ raise CommandError('FATAL', FSRESIZE_FAILURE % (cmdstr, e)) >+ >+ def reduce_online(self, dev_path, new_size_bytes): >+ # not supported >+ raise 'NOT supported' >+ >+ def extend_offline(self, dev_path): >+ # first check fs (resize2fs requirement) >+ args = list() >+ args.append('/sbin/e2fsck') >+ args.append('-f') >+ args.append('-p') # repair fs >+ args.append(dev_path) >+ cmdstr = ' '.join(args) >+ msg = CHECKING_FS % self.name >+ o,e,r = execWithCaptureErrorStatusProgress('/sbin/e2fsck', args, msg) >+ if not (r==0 or r==1): >+ raise CommandError('FATAL', FSCHECK_FAILURE % (cmdstr,e)) >+ >+ args = list() >+ args.append('/sbin/resize2fs') >+ args.append(dev_path) >+ cmdstr = ' '.join(args) >+ msg = RESIZING_FS % self.name >+ o,e,r = execWithCaptureErrorStatusProgress('/sbin/resize2fs', args, msg) >+ if r != 0: >+ raise CommandError('FATAL', FSRESIZE_FAILURE % (cmdstr,e)) >+ >+ def reduce_offline(self, dev_path, new_size_bytes): >+ # first check fs (resize2fs requirement) >+ args = list() >+ args.append('/sbin/e2fsck') >+ args.append('-f') >+ args.append('-p') # repair fs >+ args.append(dev_path) >+ cmdstr = ' '.join(args) >+ msg = CHECKING_FS % self.name >+ o,e,r = execWithCaptureErrorStatusProgress('/sbin/e2fsck', args, msg) >+ if not (r==0 or r==1): >+ raise CommandError('FATAL', FSCHECK_FAILURE % (cmdstr,e)) >+ >+ new_size_kb = new_size_bytes / 1024 >+ args = list() >+ args.append('/sbin/resize2fs') >+ args.append(dev_path) >+ args.append(str(new_size_kb) + 'K') >+ cmdstr = ' '.join(args) >+ msg = RESIZING_FS % (self.name) >+ o,e,r = execWithCaptureErrorStatusProgress('/sbin/resize2fs', args, msg) >+ if r != 0: >+ raise CommandError('FATAL', FSRESIZE_FAILURE % (cmdstr,e)) >+ >+ def get_label(self, devpath): >+ args = ['/sbin/tune2fs'] >+ args.append('-l') >+ args.append(devpath) >+ o, r = execWithCaptureStatus('/sbin/tune2fs', args) >+ if r == 0: >+ lines = o.splitlines() >+ for line in lines: >+ if re.search('volume name', line, re.I): >+ words = line.split() >+ label = words[len(words) - 1] >+ if re.match('<none>', label, re.I): >+ return None >+ else: >+ return label >+ return None >+ > class ext3(Filesystem): > def __init__(self): > creatable = self.check_path('/sbin/mkfs.ext3') >@@ -863,4 +967,64 @@ class gfs2_clustered(Filesystem): > dlg.destroy() > return rc > >+class xfs(Filesystem): >+ def __init__(self): >+ creatable = self.check_path('/sbin/mkfs.xfs') >+ mountable = self.check_mountable('xfs', 'xfs') >+ extend_online = self.check_path('/usr/sbin/xfs_growfs') >+ >+ Filesystem.__init__(self, 'XFS', creatable, True, mountable, >+ extend_online, False, False, False, >+ 'xfs') >+ >+ def probe(self, path): >+ result = execWithCapture("/usr/bin/file", ['/usr/bin/file', '-s', '-L', path]) >+ if re.search('SGI XFS', result, re.I): >+ return True >+ >+ def create(self, path): >+ args = list() >+ args.append("/sbin/mkfs") >+ args.append("-t") >+ args.append('xfs') >+ args.append(path) >+ cmdstr = ' '.join(args) >+ msg = CREATING_FS % (self.name) >+ o,e,r = execWithCaptureErrorStatusProgress("/sbin/mkfs", args, msg) >+ if r != 0: >+ raise CommandError('FATAL', FSCREATE_FAILURE % (cmdstr,e)) >+ >+ def extend_online(self, dev_path): >+ cmd = '/usr/sbin/xfs_growfs' >+ args = [cmd, dev_path] >+ cmdstr = ' '.join(args) >+ msg = RESIZING_FS % (self.name) >+ o, e, s = execWithCaptureErrorStatusProgress(cmd, args, msg) >+ if s != 0: >+ raise CommandError('FATAL', FSRESIZE_FAILURE % (cmdstr, e)) >+ >+ def reduce_online(self, dev_path, new_size_bytes): >+ # not supported >+ raise 'NOT supported' >+ >+ def extend_offline(self, dev_path): >+ # not supported >+ raise 'NOT supported' >+ >+ def reduce_offline(self, dev_path, new_size_bytes): >+ # not supported >+ raise 'NOT supported' >+ >+ def get_label(self, devpath): >+ args = ['/usr/sbin/xfs_admin'] >+ args.append('-l') >+ args.append(devpath) >+ o, r = execWithCaptureStatus('/usr/sbin/xfs_admin', args) >+ if r == 0: >+ words = o.split() >+ label = re.sub('\"', '', words[len(words) - 1]) >+ if label: >+ return label >+ return None >+ return None >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 432065
:
294387
|
319868