Thanks for the reply
Would it be efficient to copy entire data, is there any way to just copy over the blocks and adjust them according to the newly created filesystem ?
If I knew of any I'd have told you so the first time you asked.
Quote:
Would tar be able to handle the corrupted data like dd can handle since dd does a blind copy.
You can't safely shrink a disk that might be failing -- disk metadata might be corrupted, not just files, making any rearrangement very hazardous to data integrity. You might get a useless hash, or nothing at all. Either make a blind copy, or don't.
There are ways to shrink a blind copy -- compression, or a sparse file -- but none of them leave the resulting image bootable. There's no such thing as a sparse partition, after all, just sparse files. If you're content with having your backup not be bootable, this would work, I wrote sparsecat to help do this. It creates sparse files with a brute-force approach, making sections full of NULLs sparse, meaning it won't screw up because of a trashed sector but might not make everything that COULD be sparse actually sparse. (I don't guarantee its safety or applicability or portability however, it's just a hack I wrote for my own use.)
Is there a way of like creating another sparse image file of 2TB ... then copying over only required data blocks there which will exclude the empty blocks and then resizing the sparse image to 200GB.
If the disk is failing, you can't reliably know which blocks are occupied.
Last edited by Corona688; 10-10-2010 at 02:38 AM..
Hi All,
While my LINUX SERVER installed we didnt' used all the space for partitions. with what tool I can create a new partition or mount point to use the free space.
I tried the command fdisk and diskdruid. They are not working.
Thanks in advance
With Best regards,
Varma. (2 Replies)
Have a solaris x86 running solaris 9.
Root disk - logical - mirrored.
I added 2 more disks today - and I have mirrored them using array configuration utility.
I did a reconfiguration boot - and now I can see the logical disk using format:
I then partitioned this the way I wanted (I hope)... (4 Replies)
I have 3 disks to partition in following file system.
c1t1d0 = 72gb
/prod1
/prod2
/prod3
/prod4
/prod5
I am first time using "format" command to do this. How can i name with specified size.
-Adeel (1 Reply)
hi guys,
I've got a strange issue, may be one of you has experienced this.
SunOS 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V440
everything is mirrored.
My issue is that I have a umpty directory but seems to have data on. Let me show you
# df -h /data
Filesystem size used... (10 Replies)
I want to skip the first cylinder (first 1 MB infact) while I partition my disk using fdisk as it is required that the disk partition to be used (for Oracle RAC Installation) must skip the first 1Mb to avoid overwriting the disk VTOC. The way I am using is:
Command (m for help): n
Command... (2 Replies)
Hi Guys,
when performing a disk partition, can any file system other than root be giving to slice 0 or must slice0 hold only root? I am confused about this.
Any clarification will be greatly appreciated.
Thanks Guys (4 Replies)
Hello,
I am a new member of the forum.
I need an idea on how to partition the disk.
My situation is as follows:
I have two 3TB disks ognuno.In 6TB total then, but I have to do to force a RAID 1 so my space will be 3TB. I'll have to force install RedHat 5.8 and liquids is to be taken in... (4 Replies)
Hello All,
I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows,
/boot - Linux Partition & another is
LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc).
Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Hello,
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 38.2G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 ... (2 Replies)
Discussion started by: centosadmin
2 Replies
LEARN ABOUT ULTRIX
chpt
chpt(8) System Manager's Manual chpt(8)Name
chpt - change a disk partition table
Syntax
/etc/chpt [ -a ] [ -d ] [ -q ] [ -v ] [ [ -px offset size ] ... ] device
Description
The command lets you alter the partition sizes of a disk pack. Using you can tailor your system disks and their partitions to suit your
system's individual needs.
If you want to create a file system on a partition that has been modified, you must use
The standard procedure to change a partition table is:
1. Look at the current partition table using the -q option.
2. If a file system does not exist on the a partition, create one using the command.
If a file system exists on the a partition but does not contain a partition table in its superblock, copy the partition table from the
driver to the superblock using the command with the -a option.
3. Change the partition offsets and sizes using the -px option. You can change all the partitions for one pack on one command line.
The device must be either the a or c partition of the raw device, depending upon where the file system resides. For example, if the file
system resides in the a partition of an RM05 in drive 0, device is rhp0a.
A file system must exist on the a or c partition of the pack. If you do not have a file system there, create one using
Options-a Copies the partition table in the device driver to the disk pack.
-d Copies the default partition table to the disk pack and to the current partition table in the driver. The default partition table is
the table that was built with the disk driver.
-q Runs without modifying the partition tables. This prints the partition table of the specified disk pack. It prints the default par-
tition table in the driver if there is no partition table on the disk pack.
-v Prints verbose messages showing the progress of
-px Changes the parameters of partition x on the disk pack to the specified offset and size. x is the partition you are modifying (a, b,
c, d, e, f, g, or h). Offset is the new beginning sector, and size is the new total number of sectors of the partition being modi-
fied.
Examples
This example shows how to change the partition table on an RM05 disk pack in drive 1. The commands in this example change the the size of
the h partition to include the g partition. Comments are in parenthesis to the right of commands.
% chpt -q /dev/rhp1a (view partition table)
/dev/rhp1a
No partition table found in superblock...
using default table from device driver.
Current partition table:
partition bottom top size overlap
a 0 15883 15884 c
b 16416 49855 33440 c
c 0 500383 500384 a,b,d,e,f,g,h
d 341696 357579 15884 c,g
e 358112 414047 55936 c,g
f 414048 500287 86240 c,g
g 341696 500287 158592 c,d,e,f
h 49856 341201 291346 c
%
In all of the tables generated by bottom is the offset (starting sector), top is the ending sector, and size is the number of sectors in
the partition. The overlap is the other sectors that are partially or entirely included in the partition.
% bc (basic calculator)
500287-49856 (top of g minus bottom of h)
450431
450431+1 (add 1 because it is zero-based)
450432 (size of new h partition)
%
From the query, you can see that there is no partition table in the superblock of the a partition. If this is because there is no file
system in the a partition, run the command to create one.
For this example, assume that there is a file system in the a partition of the disk, but the file system does not contain a partition table
in its superblock. Therefore, run with the -a option to copy the partition table in the driver to the superblock of the a partition.
% chpt -a /dev/rhp1a (add table to a partition)
%
Now you have a partition table to change.
% chpt -v -ph 49856 450432 /dev/rhp1a (change h)
/dev/rhp1a
New partition table:
partition bottom top size overlap
a 0 15883 15884 c
b 16416 49855 33440 c
c 0 500383 500384 a,b,d,e,f,g,h
d 341696 357579 15884 c,g,h
e 358112 414047 55936 c,g,h
f 414048 500287 86240 c,g,h
g 341696 500287 158592 c,d,e,f,h
h 49856 500287 450432 c,d,e,f,g
%
Caution
Changing partition tables indiscriminately can result in losing large amounts of data.
Check for file systems on all the partitions of the disk before using the -p option. If a file system exists whose partition may be
destroyed, copy it to a backup medium. After you have changed the partitions, restore the backed up file system.
Restrictions
You must have superuser privileges to use
You can not shrink or change the offset of a partition with a file system mounted on it or with an open file descriptor on the entire par-
tition.
You can not change the offset of the a partition.
See Alsoioctl(2), disktab(5), fsck(8), mkfs(8), newfs(8)
Guide to System Disk Maintenance
chpt(8)