SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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,
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.
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.
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.
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.
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.
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!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.