JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

System Administration Commands - Part 2

luxadm(1M)

mail.local(1M)

makedbm(1M)

makemap(1M)

masfcnv(1M)

mdlogd(1M)

mdmonitord(1M)

mdnsd(1M)

medstat(1M)

metaclear(1M)

metadb(1M)

metadetach(1M)

metadevadm(1M)

metahs(1M)

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2mof(1M)

mibiisa(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkntfs(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_smbfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

ndmpadm(1M)

ndmpd(1M)

ndmpstat(1M)

netadm(1M)

netcfg(1M)

netcfgd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsref(1M)

nfsstat(1M)

nscadm(1M)

nscd(1M)

nscfg(1M)

nsdb-list(1M)

nsdb-nces(1M)

nsdbparams(1M)

nsdb-resolve-fsn(1M)

nsdb-update-nci(1M)

nslookup(1M)

nsupdate(1M)

ntfscat(1M)

ntfsclone(1M)

ntfscluster(1M)

ntfscmp(1M)

ntfscp(1M)

ntfsfix(1M)

ntfsinfo(1M)

ntfslabel(1M)

ntfsls(1M)

ntfsprogs(1M)

ntfsresize(1M)

ntfsundelete(1M)

nulladm(1M)

nwamd(1M)

obpsym(1M)

oplhpd(1M)

pageout(1M)

parted(1M)

pbind(1M)

pcitool(1M)

pfedit(1M)

pginfo(1M)

pgstat(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkg.depotd(1M)

pkgrm(1M)

pkg.sysrepo(1M)

plockstat(1M)

pntadm(1M)

polkit-is-privileged(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

poweradm(1M)

poweroff(1M)

powertop(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

rad(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

reparsed(1M)

repquota(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rmmount(1M)

rmt(1M)

rmvolmgr(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sadc(1M)

sar(1M)

sasinfo(1M)

savecore(1M)

sbdadm(1M)

sched(1M)

sckmd(1M)

scmadm(1M)

sconadm(1M)

sendmail(1M)

sftp-server(1M)

shadowd(1M)

shadowstat(1M)

share(1M)

shareall(1M)

sharectl(1M)

share_nfs(1M)

share_smb(1M)

showmount(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smattrpop(1M)

smbadm(1M)

smbd(1M)

smbiod(1M)

smbiod-svc(1M)

smbios(1M)

smbstat(1M)

smrsh(1M)

smtp-notify(1M)

sndradm(1M)

sndrd(1M)

sndrsyncd(1M)

snmpdx(1M)

snmp-notify(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

srptadm(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmfadm(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

suriadm(1M)

svadm(1M)

svcadm(1M)

svcbundle(1M)

svccfg(1M)

svc.configd(1M)

svc.ipfd(1M)

svc.startd(1M)

swap(1M)

sxadm(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysconfig(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

syslogd(1M)

talkd(1M)

tapes(1M)

telnetd(1M)

tftpd(1M)

th_define(1M)

th_manage(1M)

tic(1M)

tncfg(1M)

tnchkdb(1M)

tnctl(1M)

tnd(1M)

tninfo(1M)

tpmadm(1M)

traceroute(1M)

trapstat(1M)

ttymon(1M)

tunefs(1M)

turnacct(1M)

txzonemgr(1M)

tzreload(1M)

tzselect(1M)

uadmin(1M)

ucodeadm(1M)

ufsdump(1M)

ufsrestore(1M)

umount(1M)

umountall(1M)

System Administration Commands - Part 3

ntfsresize

- resize an NTFS file system without data loss

Synopsis

ntfsresize  [options] --info device
ntfsresize  [options] [--size size[k|M|G]] device

Description

The ntfsresize program safely resizes Windows XP, Windows Server 2003, Windows 2000, Windows NT4 and Longhorn NTFS filesystems without data loss. All NTFS versions used by 32-bit and 64-bit Windows “operating systems” are supported. Defragmentation is not required prior to resizing, because ntfsresize can relocate any data if needed, without risking data integrity.

ntfsresize can be used to shrink or enlarge any NTFS file system located on an unmounted device (usually a disk partition). The new file system will have a size that you specify. The size parameter can have one of the optional modifiers k, M, G, denoting, respectively, kilobytes, megabytes, or gigabytes. ntfsresize conforms to the SI, ATA, an IEEE standards and the disk manufacturers by supporting k=103, M=106 and G=109.

If both ---info and ---size options are omitted then the NTFS file system will be enlarged to the underlying device size.

To resize a file system on a partition, you must resize both the file system and the partition, by editing the partition table on the disk. Similarly to other command-line file system resizers, ntfsresize does not manipulate the size of the partitions. To do that you must use a disk partitioning tool, such as fdisk(1M). Alternatively, you could use one of the many user friendly partitioners that uses ntfsresize internally. Such partitioners include, among others, Mandriva's DiskDrake, QTParted, SUSE/Novell's YaST Partitioner, IBM's EVMS, GParted, or Debian/Ubuntu's Partman.

Back up your data and your partition table before using any partitioning tool. For an NTFS file system, you can use ntfsclone(1M) as a means of backup.

To shrink an NTFS partition, first use ntfsresize to shrink the size of the file system. Then use a utility such as fdisk(1M) to shrink the size of the partition by deleting the partition and recreating it with the smaller size. Do not make the partition smaller than the new size of NTFS; otherwise, you will not be able to boot from that partition. If you mistakenly made a too-small partition, you would have to recreate the partition to be as large as newly sized NTFS file system.

To enlarge an NTFS file system, you must first enlarge the size of the underlying partition. You can use fdisk(1M) to delete the partition and recreate it with a larger size. Make sure the newly sized partition does not overlap with any other partition. Then use ntfsresize to enlarge the file system.

When recreating a partition, make sure you create it at the same starting sector and with the same partition type as was used in the partition you are replacing. Otherwise, you will not be able to access your file system. Use the fdisk u command to switch from the default cylinder unit to the reliable sector unit. Also, if the bootable flag was set in the old partition, make sure to set it in the recreated partiton. Otherwise, you might not be able to boot from the new partition.

Extended Description

There are a handful of very rarely met restrictions in the use of ntfsresize. An example of such a restriction occurs with a file system stored on a disk having unknown bad sectors. Relocation of the first MFT extent and resizing into the middle of a $MFTMirr extent are not supported. These cases are detected and resizing is restricted to a safe size or the closest safe size is displayed.

Upon completion of a resizing, ntfsresize schedules an NTFS consistency check. In Windows, this check is performed by chkdsk. Upon the first subsequent reboot into Windows, you will note chkdsk running in a blue background. This is normal. Windows might force a quick reboot after the consistency check. Depending on your hardware configuration, Windows might alert you to a systems setting change and recommend or require a reboot. Acknowledge the message and reboot a second time.

Options

Supported options are listed below. Most options have both single-letter and full-name forms. Multiple single-letter options that do not take an argument can be combined. For example, -fv is the equivalent of -f -v. A full-name option can be abbreviated to a unique prefix of its name.

-b, --bad-sectors

By default, ntfsresize exits upon encountering bad sectors. This option allows the utility to proceed in spite of such sectors.

Prior using this option, it is strongly recommended that you use ntfsclone(1M) with the --rescue option to make a backup, then, in Windows, run chkdsk /f /r volume: from the command line. If the disk guarantee displays as valid, then replace it, as it is defective. Note that no software can repair bad sector errors. The most that can be done is to work around these defects.

This option has no effect if a disk has no bad sectors.

-f, --force

ntfsresize always marks a file system for consistency check before a real (not using -–no-action) resize operation and it leaves that way for extra safety. Thus, if an NTFS file system was marked by ntfsresize, it is safe to use this option. You must use this option, if you need to resize several times without booting into Windows between each resizing step.

-h, --help

Display usage information and exit.

-i, --info

Used when you want to shrink a file system. Causes ntfsresize to determine the smallest shrunken file system size supported. Most of the time the smallest size is the space already used on the file system. ntfsresize does not shrink a file system to a smaller size than what is returned by this option. Depending on several factors, it might be unable to shrink to this theoretical size. Although the integrity of your data should be never at risk, it is nevertheless strongly recommended to make a test run by using the --no-action option before actual resizing.

Based on testing, the smallest attainable size is approximately space used in the file system plus 20–200 MB. Note also that Windows might need an additional 50–100 MB to boot safely.

This option never causes any changes to the file system; the partition is opened read-only.

-n, --no-action

Use this option to make a test run before doing the resize operation. Volume will be opened read-only and ntfsresize displays what it would do if it were to resize the file system. Proceed with the actual resizing only if the test run passed.

-P, --no-progress-bar

Do not display progress bars during ntfsresize operation.

-s, --size size[k|M|G]]

Resize file system to size bytes. The new file system will have a size that you specify. The size parameter can have one of the optional modifiers k, M, G, denoting, respectively, kilobytes, megabytes, or gigabytes. ntfsresize conforms to the SI, ATA, an IEEE standards and the disk manufacturers by supporting k=103, M=106 and G=109. Before performing an actual resizing, run ntfsresize with the --no-action option, along with this option, first.

-v, --verbose

Display copious output.

-V, --version

Display the version number of ntfsresize.

Exit Status

Display zero on success, non-zero otherwise.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/file-system/ntfsprogs
Interface Stability
Uncommitted

See Also

fdisk(1M), ntfsclone(1M), parted(1M), attributes(5)

http://wiki.linux-ntfs.org

Notes

In Linux version 2.6, with partitions that have been manipulated by parted(1M), use of ntfsresize preceded corruption of partition tables, which resulted in unbootable Windows systems. This occurred even if the NTFS file system was consistent. This problem is independent of NTFS and, thus, ntfsresize. Moreover, ntfsresize never touches the partition table. Under the conditions just described, you can, in the BIOS, change Disk Access Mode to LBA to regain the ability to boot. For further discussion of this condition see the ntfsresize FAQ at: http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html.

Authors

ntfsresize was written by Szabolcs Szakacsits, with contributions from Anton Altaparmakov and Richard Russon.