LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-29-2008, 11:30 AM   #1
Karimo
Member
 
Registered: Aug 2007
Location: Valencia
Distribution: slackware64-current
Posts: 67

Rep: Reputation: 15
Growing XFS help


Hi everybody!
I've a little problem with resizing a logical xfs partition.
I've just wanted to add to my sda5 partition (logical one) 10GB more. So I deleted and recreated the partition with fdisk with the same starting point. The problem is that xfs_growfs now refuses to expand the underlying filesystem because it's not mounted; at the same time the mount command refuses to mount the volume, no discovering the filesystem (neither with the -t xfs option).

-----------------------------------------------------------
(parted) p
p
Model: ATA HTS541080G9SA00 (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 4294MB 4294MB primary ntfs boot
2 4294MB 14.3GB 10.0GB primary ext3
3 14.3GB 14.5GB 207MB primary linux-swap
4 14.5GB 80.0GB 65.5GB extended lba
5 14.5GB 80.0GB 65.5GB logical

(parted)

fdisk

Device Boot Start End Blocks Id System
/dev/sda1 * 1 522 4192933+ 7 HPFS/NTFS
/dev/sda2 523 1738 9766019+ 83 Linux
/dev/sda3 1738 1763 202313 82 Linux swap
/dev/sda4 1764 9730 63989446+ f W95 Ext'd (LBA)
/dev/sda5 1764 9730 63989415 83 Linux

root@station:~# mount /dev/sda5 /mnt/hd/
mount: you must specify the filesystem type
root@station:~# mount -t xfs /dev/sda5 /mnt/hd/
mount: wrong fs type, bad option, bad superblock on /dev/sda5,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
root@station:~# xfs_growfs -d /dev/sda5
xfs_growfs: /dev/sda5 is not a mounted XFS filesystem
root@station:~#
-------------------------------------------------------


What to do now? I've lost all of my data?
Thank you so much,

Andrea
 
Old 10-30-2008, 05:29 AM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
From what I can understand, when you used fdisk, you did loose all your data because with fdisk you first delete the partition and then you create a new one.

Probably you had to grow your partition first. I am not acquated with xfs, so I cannot tell you how to do it, but you need to check if the partition ought to be mounted or not at that stage.

Chris
 
Old 10-30-2008, 06:24 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
No, deleting a partition merely deletes the definition of the partition - doesn't affect the underlying filesystem. I do it reasonably often. Redefining a logical partition could cause issues - if the start wasn't handled appropriately. I don't use xfs, but I do what Karimo did without problem on ext3.
Dunno - maybe see if testdisk will retrieve things. Seems to support xfs according to the site.
 
Old 10-30-2008, 06:40 AM   #4
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
What syg00 wrote make sense to me.
I suppose that redifining the file system exactly how it was before should restore the data.
I am very sceptical about retaining data from a enlarged partition with fdisk.
 
Old 11-16-2009, 08:07 PM   #5
drunkard
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
Unhappy I ran into same problem

lvextend -L +510G /dev/vgfd/fd
xfs_growfs /dev/vgfd/fd

While this appeared:
xfs_growfs: /dev/mapper/vgfd-fd is not a mounted XFS filesystem

I used do:
mount -o remount,rw /dev/vgfd/fd
but still no lucky, I have to stop the work depend on it and umount it, then "mount -a"; then I can't mount it anymore, can not read superblock... then "xfs_repair /dev/vgfd/fd".

Maybe the error info said damage of filesystem's superblock.
 
Old 11-17-2009, 02:41 AM   #6
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
Before playing about disk partitioning, I always experiment on a spare partition on the hard disk or a disposable USB flash drive first. You are bound to make mistakes unless you are following a documented procedure.


Can you send us the following:

# fdisk -l

and

# vgscan
 
Old 11-17-2009, 08:51 PM   #7
drunkard
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
Problem solved. In my case, my filesystem xfs beyond 2TB when I extended it, while this is a 32-bit system, I mirgated to CentOS-5.4-x86_64, data is all good, nothing damaged. Luky!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help growing partition wslyhbb Linux - General 5 01-24-2008 03:55 PM
X utilaziion is growing and growing amirb Linux - Desktop 2 05-28-2007 03:55 AM
My files are growing!!!! Kanon Linux - Newbie 7 11-13-2004 07:26 PM
kdebase not recognizing XFree86-xfs package as xfs mikeyt_333 Linux - Software 1 08-17-2004 01:50 PM
Growing Up... bkeating General 10 06-17-2002 05:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration